title: is there any difference in these two class implementation?
body: <p>I am a beginner of programming and dart lang. I have a question about how to write class about database service related to flutter and firestore.</p>
  
  <pre><code>// what is the difference this
  class DbService {
    final Firestore _db;
    DbService() : _db = Firestore.instance;
  
    Future&lt;QuerySnapshot&gt; getDataCollection(String id) {
      return _db.collection(id).getDocuments();
    }
  }
  // and this
  class DbService {
    final Firestore _db = Firestore.instance;
  
    Future&lt;QuerySnapshot&gt; getDataCollection(String id) {
      return _db.collection(id).getDocuments();
    }
  }
  
  
     // when use this class
  _dbService = DbService();
  </code></pre>
  
  <p>What is the best practice. or should I use singleton to instantiate this class? Any comments or help is appreciate.</p>