Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. child: Container(
  2. child: Column(
  3. children: <Widget>[
  4. new FutureBuilder(
  5. future: Firestore.instance
  6. .collection('images')
  7. .getDocuments(),
  8. builder: (BuildContext context, AsyncSnapshot snapshot) {
  9. if (snapshot.hasData) {
  10. if (snapshot.data != null) {
  11. print(snapshot.data['homescreen_bannersrc']);
  12. return CachedNetworkImage(
  13. imageUrl: (snapshot.data['homescreen_bannersrc']),
  14. placeholder: (context, url) => new Center(
  15. child: Center(
  16. child: LinearProgressIndicator()),
  17. ),
  18. errorWidget: (context, url, error) =>
  19. new Icon(Icons.error),
  20. fit: BoxFit.fitWidth,
  21. );
  22. }
  23. }
  24. },
  25. ),
  26. ],
  27. ),
  28. ),
  29. ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement