diff --git a/packages/neon/neon/lib/src/pages/home.dart b/packages/neon/neon/lib/src/pages/home.dart index 444220a1..324ef912 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -132,25 +132,30 @@ class _HomePageState extends State { final List accounts, final Account account, ) async { + final page = Scaffold( + resizeToAvoidBottomInset: false, + appBar: AppBar( + title: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(app.name(context)), + if (accounts.length > 1) ...[ + Text( + account.client.humanReadableID, + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ], + ), + ), + body: app.page, + ); + await Navigator.of(context).push( MaterialPageRoute( - builder: (final context) => Scaffold( - resizeToAvoidBottomInset: false, - appBar: AppBar( - title: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(app.name(context)), - if (accounts.length > 1) ...[ - Text( - account.client.humanReadableID, - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ], - ), - ), - body: app.page, + builder: (final context) => Provider( + create: (final context) => app.getBloc(account), + child: page, ), ), ); diff --git a/packages/neon/neon_notifications/lib/pages/main.dart b/packages/neon/neon_notifications/lib/pages/main.dart index f647a860..de3f073e 100644 --- a/packages/neon/neon_notifications/lib/pages/main.dart +++ b/packages/neon/neon_notifications/lib/pages/main.dart @@ -16,7 +16,7 @@ class _NotificationsMainPageState extends State { void initState() { super.initState(); - bloc = Provider.of(context, listen: false); + bloc = Provider.of(context, listen: false) as NotificationsBloc; bloc.errors.listen((final error) { NeonException.showSnackbar(context, error);