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
This commit is contained in:
parent
35f6a101fe
commit
cbc5194691
@ -21,17 +21,19 @@ class MyHomePage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
class _MyHomePageState extends State<MyHomePage> {
|
||||||
|
final db = Firestore.instance.collection('lots');
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text('Lot 1')),
|
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<QuerySnapshot>(
|
return StreamBuilder<QuerySnapshot>(
|
||||||
stream: Firestore.instance.collection('Lot1').snapshots(),
|
stream: stallDB.snapshots(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (!snapshot.hasData) return LinearProgressIndicator();
|
if (!snapshot.hasData) return LinearProgressIndicator();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user