Dman_14

Untitled

Jan 20th, 2021
940
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// Instead of this:
  2.  
  3. class IdeaService {
  4.   ///create variable instances for use
  5.   CollectionReference _ideaRef = FirebaseFirestore.instance.collection("ideas");
  6. }
  7.  
  8.  
  9.  
  10. /// Do this
  11.  
  12. class IdeaService {
  13.   ///create variable instances for use
  14.   CollectionReference _ideaRef;
  15.    
  16.   initialize() {
  17.       _ideaRef = FirebaseFirestore.instance.collection("ideas");
  18.   }
  19.    
  20. }
RAW Paste Data