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. 71
      packages/neon/neon/lib/src/pages/home.dart

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

@ -518,6 +518,42 @@ class _HomePageState extends State<HomePage> {
], ],
); );
final body = Builder(
builder: (final context) => Row(
children: [
if (navigationMode == NavigationMode.quickBar) ...[
drawer,
],
Expanded(
child: Column(
children: [
if (appImplementations.data != null) ...[
if (appImplementations.data!.isEmpty) ...[
Expanded(
child: Center(
child: Text(
AppLocalizations.of(context).errorNoCompatibleNextcloudAppsFound,
textAlign: TextAlign.center,
),
),
),
] else ...[
if (activeAppIDSnapshot.hasData) ...[
Expanded(
child: appImplementations.data!
.find(activeAppIDSnapshot.data!)!
.buildPage(context, _appsBloc),
),
],
],
],
],
),
),
],
),
);
return Row( return Row(
children: [ children: [
if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[ if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[
@ -529,40 +565,7 @@ class _HomePageState extends State<HomePage> {
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
drawer: navigationMode == NavigationMode.drawer ? drawer : null, drawer: navigationMode == NavigationMode.drawer ? drawer : null,
appBar: appBar, appBar: appBar,
body: Row( body: body,
children: [
if (navigationMode == NavigationMode.quickBar) ...[
drawer,
],
Expanded(
child: Column(
children: [
if (appImplementations.data != null) ...[
if (appImplementations.data!.isEmpty) ...[
Expanded(
child: Center(
child: Text(
AppLocalizations.of(context)
.errorNoCompatibleNextcloudAppsFound,
textAlign: TextAlign.center,
),
),
),
] else ...[
if (activeAppIDSnapshot.hasData) ...[
Expanded(
child: appImplementations.data!
.find(activeAppIDSnapshot.data!)!
.buildPage(context, _appsBloc),
),
],
],
],
],
),
),
],
),
), ),
), ),
], ],

Loading…
Cancel
Save