feat: Add connectivity status toast message on Home View

This commit is contained in:
Alberto Ponces
2022-09-12 00:35:41 +01:00
parent 92a84c3bfb
commit 6665095b2e
5 changed files with 21 additions and 7 deletions

View File

@ -17,13 +17,13 @@ class HomeView extends StatelessWidget {
Widget build(BuildContext context) {
return ViewModelBuilder<HomeViewModel>.reactive(
disposeViewModel: false,
onModelReady: (model) => model.initialize(),
onModelReady: (model) => model.initialize(context),
viewModelBuilder: () => locator<HomeViewModel>(),
builder: (context, model, child) => Scaffold(
body: RefreshIndicator(
color: Theme.of(context).colorScheme.secondary,
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
onRefresh: () => model.forceRefresh(),
onRefresh: () => model.forceRefresh(context),
child: CustomScrollView(
slivers: <Widget>[
CustomSliverAppBar(