mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-15 22:42:50 +00:00
Changed general modals
This commit is contained in:
parent
5d45829937
commit
3e206027de
4 changed files with 277 additions and 233 deletions
|
@ -227,6 +227,8 @@ class _HomeState extends State<Home> {
|
|||
),
|
||||
|
||||
TopItemsLists(order: appConfigProvider.homeTopItemsOrder),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
),
|
||||
if (statusProvider.loadStatus == LoadStatus.error) SliverFillRemaining(
|
||||
|
|
|
@ -228,37 +228,37 @@ class TopItemsSection extends StatelessWidget {
|
|||
children: [
|
||||
TextButton(
|
||||
onPressed: () => {
|
||||
showGeneralDialog(
|
||||
context: context,
|
||||
barrierColor: !(width > 700 || !(Platform.isAndroid | Platform.isIOS))
|
||||
?Colors.transparent
|
||||
: Colors.black54,
|
||||
transitionBuilder: (context, anim1, anim2, child) {
|
||||
return SlideTransition(
|
||||
position: Tween(
|
||||
begin: const Offset(0, 1),
|
||||
end: const Offset(0, 0)
|
||||
).animate(
|
||||
CurvedAnimation(
|
||||
parent: anim1,
|
||||
curve: Curves.easeInOutCubicEmphasized
|
||||
)
|
||||
),
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
pageBuilder: (context, animation, secondaryAnimation) => TopItemsScreen(
|
||||
type: type,
|
||||
title: label,
|
||||
isClient: type == HomeTopItems.recurrentClients,
|
||||
data: data,
|
||||
withProgressBar: withProgressBar,
|
||||
buildValue: buildValue,
|
||||
options: menuOptions,
|
||||
onTapEntry: onTapEntry,
|
||||
isFullscreen: !(width > 700 || !(Platform.isAndroid | Platform.isIOS)),
|
||||
if (width > 700) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => TopItemsScreen(
|
||||
type: type,
|
||||
title: label,
|
||||
isClient: type == HomeTopItems.recurrentClients,
|
||||
data: data,
|
||||
withProgressBar: withProgressBar,
|
||||
buildValue: buildValue,
|
||||
options: menuOptions,
|
||||
onTapEntry: onTapEntry,
|
||||
isFullscreen: !(width > 700 || !(Platform.isAndroid | Platform.isIOS)),
|
||||
),
|
||||
)
|
||||
)
|
||||
}
|
||||
else {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context) => TopItemsScreen(
|
||||
type: type,
|
||||
title: label,
|
||||
isClient: type == HomeTopItems.recurrentClients,
|
||||
data: data,
|
||||
withProgressBar: withProgressBar,
|
||||
buildValue: buildValue,
|
||||
options: menuOptions,
|
||||
onTapEntry: onTapEntry,
|
||||
isFullscreen: !(width > 700 || !(Platform.isAndroid | Platform.isIOS)),
|
||||
),
|
||||
))
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue