feat: implement consumer and Provider.of test things

This commit is contained in:
Liat Ben-Haim 2024-04-02 15:31:23 +02:00
parent 77418d216f
commit 333c89d841
3 changed files with 54 additions and 18 deletions

View file

@ -13,6 +13,11 @@ class _NavigatorPageState extends State<NavigatorPage> {
@override
Widget build(BuildContext context) {
var pages = <Widget>[
const DataEntryPage(),
const Placeholder(),
];
return Scaffold(
appBar: AppBar(
title: const Text("Migraine Tracker"),
@ -35,10 +40,7 @@ class _NavigatorPageState extends State<NavigatorPage> {
});
},
),
body: <Widget>[
const DataEntryPage(),
const Placeholder(),
][currentPageIndex],
body: pages[currentPageIndex],
);
}
}