|
|
@ -183,18 +183,7 @@ class _HomePageState extends State<HomePage> { |
|
|
|
) => |
|
|
|
) => |
|
|
|
OptionBuilder<NavigationMode>( |
|
|
|
OptionBuilder<NavigationMode>( |
|
|
|
option: _globalOptions.navigationMode, |
|
|
|
option: _globalOptions.navigationMode, |
|
|
|
builder: (final context, final navigationMode) => WillPopScope( |
|
|
|
builder: (final context, final navigationMode) { |
|
|
|
onWillPop: () async { |
|
|
|
|
|
|
|
if (_scaffoldKey.currentState!.isDrawerOpen) { |
|
|
|
|
|
|
|
Navigator.pop(context); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_scaffoldKey.currentState!.openDrawer(); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Builder( |
|
|
|
|
|
|
|
builder: (final context) { |
|
|
|
|
|
|
|
if (accountsSnapshot.hasData) { |
|
|
|
if (accountsSnapshot.hasData) { |
|
|
|
final accounts = accountsSnapshot.data!; |
|
|
|
final accounts = accountsSnapshot.data!; |
|
|
|
final account = accounts.find(_account.id); |
|
|
|
final account = accounts.find(_account.id); |
|
|
@ -263,18 +252,15 @@ class _HomePageState extends State<HomePage> { |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
if (capabilities.data != null) ...[ |
|
|
|
if (capabilities.data != null) ...[ |
|
|
|
if (capabilities.data!.capabilities.theming?.name != |
|
|
|
if (capabilities.data!.capabilities.theming?.name != null) ...[ |
|
|
|
null) ...[ |
|
|
|
|
|
|
|
Text( |
|
|
|
Text( |
|
|
|
capabilities.data!.capabilities.theming!.name!, |
|
|
|
capabilities.data!.capabilities.theming!.name!, |
|
|
|
style: DefaultTextStyle.of(context).style.copyWith( |
|
|
|
style: DefaultTextStyle.of(context).style.copyWith( |
|
|
|
color: |
|
|
|
color: Theme.of(context).appBarTheme.foregroundColor, |
|
|
|
Theme.of(context).appBarTheme.foregroundColor, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
if (capabilities.data!.capabilities.theming?.logo != |
|
|
|
if (capabilities.data!.capabilities.theming?.logo != null) ...[ |
|
|
|
null) ...[ |
|
|
|
|
|
|
|
Flexible( |
|
|
|
Flexible( |
|
|
|
child: NeonCachedUrlImage( |
|
|
|
child: NeonCachedUrlImage( |
|
|
|
url: capabilities.data!.capabilities.theming!.logo!, |
|
|
|
url: capabilities.data!.capabilities.theming!.logo!, |
|
|
@ -305,9 +291,8 @@ class _HomePageState extends State<HomePage> { |
|
|
|
child: NeonAccountTile( |
|
|
|
child: NeonAccountTile( |
|
|
|
account: account, |
|
|
|
account: account, |
|
|
|
dense: true, |
|
|
|
dense: true, |
|
|
|
textColor: Theme.of(context) |
|
|
|
textColor: |
|
|
|
.appBarTheme |
|
|
|
Theme.of(context).appBarTheme.foregroundColor, |
|
|
|
.foregroundColor, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
@ -554,7 +539,17 @@ class _HomePageState extends State<HomePage> { |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
return Row( |
|
|
|
return WillPopScope( |
|
|
|
|
|
|
|
onWillPop: () async { |
|
|
|
|
|
|
|
if (_scaffoldKey.currentState!.isDrawerOpen) { |
|
|
|
|
|
|
|
Navigator.pop(context); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_scaffoldKey.currentState!.openDrawer(); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[ |
|
|
|
if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[ |
|
|
|
drawer, |
|
|
|
drawer, |
|
|
@ -569,6 +564,7 @@ class _HomePageState extends State<HomePage> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -579,7 +575,5 @@ class _HomePageState extends State<HomePage> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|