Browse Source

neon: HomePage externalize body

pull/362/head
Nikolas Rimikis 2 years 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(
children: [
if (navigationMode == NavigationMode.drawerAlwaysVisible) ...[
@ -529,40 +565,7 @@ class _HomePageState extends State<HomePage> {
resizeToAvoidBottomInset: false,
drawer: navigationMode == NavigationMode.drawer ? drawer : null,
appBar: appBar,
body: 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),
),
],
],
],
],
),
),
],
),
body: body,
),
),
],

Loading…
Cancel
Save