From cbc51946916ea064a3a3d6b3d543df05a1d50357 Mon Sep 17 00:00:00 2001 From: Thomas Atkins Date: Sat, 9 Feb 2019 11:59:31 -0600 Subject: [PATCH] DB is looking a lot better now that she has all her data in order... time to try to dynamicly create view for diffrent lots --- flutter_app/lib/main.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flutter_app/lib/main.dart b/flutter_app/lib/main.dart index 7cd49cd..e85a06c 100644 --- a/flutter_app/lib/main.dart +++ b/flutter_app/lib/main.dart @@ -21,17 +21,19 @@ class MyHomePage extends StatefulWidget { } class _MyHomePageState extends State { + final db = Firestore.instance.collection('lots'); + @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Lot 1')), - body: _buildBody(context), + body: _buildBody(context, db), ); } - Widget _buildBody(BuildContext context) { + Widget _buildBody(BuildContext context, CollectionReference stallDB) { return StreamBuilder( - stream: Firestore.instance.collection('Lot1').snapshots(), + stream: stallDB.snapshots(), builder: (context, snapshot) { if (!snapshot.hasData) return LinearProgressIndicator();