Browse Source

neon: Homepage externalize appBar

pull/362/head
Nikolas Rimikis 1 year ago
parent
commit
abf4df9ffc
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 31
      packages/neon/neon/lib/src/pages/home.dart

31
packages/neon/neon/lib/src/pages/home.dart

@ -418,18 +418,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
); );
final appBar = AppBar(
return Row(
children: [
if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[
drawer,
],
Expanded(
child: Scaffold(
key: _scaffoldKey,
resizeToAvoidBottomInset: false,
drawer: navigationMode == NavigationMode.drawer ? drawer : null,
appBar: AppBar(
scrolledUnderElevation: navigationMode != NavigationMode.drawer ? 0 : null, scrolledUnderElevation: navigationMode != NavigationMode.drawer ? 0 : null,
automaticallyImplyLeading: navigationMode == NavigationMode.drawer, automaticallyImplyLeading: navigationMode == NavigationMode.drawer,
leadingWidth: isQuickBar ? kQuickBarWidth : null, leadingWidth: isQuickBar ? kQuickBarWidth : null,
@ -452,9 +441,7 @@ class _HomePageState extends State<HomePage> {
if (appImplementations.data != null && activeAppIDSnapshot.hasData) ...[ if (appImplementations.data != null && activeAppIDSnapshot.hasData) ...[
Flexible( Flexible(
child: Text( child: Text(
appImplementations.data! appImplementations.data!.find(activeAppIDSnapshot.data!)!.name(context),
.find(activeAppIDSnapshot.data!)!
.name(context),
), ),
), ),
], ],
@ -529,7 +516,19 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
], ],
), );
return Row(
children: [
if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[
drawer,
],
Expanded(
child: Scaffold(
key: _scaffoldKey,
resizeToAvoidBottomInset: false,
drawer: navigationMode == NavigationMode.drawer ? drawer : null,
appBar: appBar,
body: Row( body: Row(
children: [ children: [
if (navigationMode == NavigationMode.quickBar) ...[ if (navigationMode == NavigationMode.quickBar) ...[

Loading…
Cancel
Save