Browse Source

neon: HomePage externalize body

pull/362/head
Nikolas Rimikis 1 year ago
parent
commit
671107e363
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

@ -518,18 +518,8 @@ class _HomePageState extends State<HomePage> {
], ],
); );
return Row( final body = Builder(
children: [ builder: (final context) => Row(
if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[
drawer,
],
Expanded(
child: Scaffold(
key: _scaffoldKey,
resizeToAvoidBottomInset: false,
drawer: navigationMode == NavigationMode.drawer ? drawer : null,
appBar: appBar,
body: Row(
children: [ children: [
if (navigationMode == NavigationMode.quickBar) ...[ if (navigationMode == NavigationMode.quickBar) ...[
drawer, drawer,
@ -542,8 +532,7 @@ class _HomePageState extends State<HomePage> {
Expanded( Expanded(
child: Center( child: Center(
child: Text( child: Text(
AppLocalizations.of(context) AppLocalizations.of(context).errorNoCompatibleNextcloudAppsFound,
.errorNoCompatibleNextcloudAppsFound,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
@ -563,6 +552,20 @@ 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: body,
), ),
), ),
], ],

Loading…
Cancel
Save