Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. import 'package:prepmilecookingfeed/model/activity_feed.dart';
  2. import 'package:cloud_firestore/cloud_firestore.dart';
  3.  
  4. class Activity_Home_Mobile {
  5. final DocumentReference reference;
  6. final List<String> activity_feed;
  7. final String title;
  8.  
  9.  
  10. Activity_Home_Mobile.fromMap(Map<String, dynamic> map, {this.reference})
  11. : assert(map['title'] != null),
  12. assert(map['activity_feed'] != null),
  13. title = map['title'],
  14. activity_feed = map['activity_feed'];
  15.  
  16.  
  17. Activity_Home_Mobile.fromSnapshot(DocumentSnapshot snapshot)
  18. : this.fromMap(snapshot.data, reference: snapshot.reference);
  19.  
  20. // @override
  21. // String toString() => "Record<$name:$votes>";
  22.  
  23. }
  24.  
  25. class Article {
  26. final String name;
  27. final String desc;
  28. final String likes;
  29. final String picture_id;
  30. final String quick_desc;
  31. final String steps;
  32. final DocumentReference reference;
  33.  
  34. Article.fromMap(Map<String, dynamic> map, {this.reference})
  35. : assert(map['name'] != null),
  36. assert(map['votes'] != null),
  37. name = map['name'],
  38. likes = map['name'],
  39. desc = map['name'],
  40. picture_id = map['name'],
  41. quick_desc = map['name'],
  42. steps = map['votes'];
  43.  
  44. Article.fromSnapshot(DocumentSnapshot snapshot)
  45. : this.fromMap(snapshot.data, reference: snapshot.reference);
  46.  
  47. // @override
  48. // String toString() => "Record<$name:$votes>";
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement