Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_app/screens/contactList.dart';
  3. import 'package:cloud_firestore/cloud_firestore.dart';
  4.  
  5. void main() => runApp(MyApp());
  6.  
  7. class MyApp extends StatelessWidget {
  8. final Firestore _firestore = Firestore.instance;
  9.  
  10. CollectionReference get contacts => _firestore.collection('contacts');
  11.  
  12. // This widget is the root of your application.
  13. @override
  14. Widget build(BuildContext context) {
  15. return MaterialApp(
  16. debugShowCheckedModeBanner: false,
  17. title: 'Flutter Demo',
  18. theme: ThemeData(
  19. // This is the theme of your application.
  20. //
  21. // Try running your application with "flutter run". You'll see the
  22. // application has a blue toolbar. Then, without quitting the app, try
  23. // changing the primarySwatch below to Colors.green and then invoke
  24. // "hot reload" (press "r" in the console where you ran "flutter run",
  25. // or simply save your changes to "hot reload" in a Flutter IDE).
  26. // Notice that the counter didn't reset back to zero; the application
  27. // is not restarted.
  28. primarySwatch: Colors.blue,
  29. ),
  30. home: ContactList(dbContacts: contacts),
  31. );
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement