title: Firestore Collection (with Subcollection) to Sqflite Item in Flutter
body: <p>My application is using firestore database. I design <em>categories and its subcategories</em> of the content by using subcollection. </p>
  
  <p>To make offline mode feature; 
  I want to save this firestore data to sqflite database.</p>
  
  <p>I learned that I convert firebase data map to text for sqlite </p>
  
  <p>But I counl't find a way to locate the <strong>subcollections</strong>.</p>
  
  <pre><code> var catagorySnapshots =
          await _firestore.collection("categories").getDocuments();
      List _list = [];
      catagorySnapshots.documents.forEach((_snapshot) {
        CategoryInformation categoryInformation = CategoryInformation();
        CategoryItem curCategory =
            CategoryItem.fromCollection(_snapshot.documentID, _snapshot.data);
        categoryInformation.categoryList.add(curCategory);
        print(curCategory.title);
        //
        // sub collections
        //
      });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Zv4Up.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zv4Up.png" alt="enter image description here"></a></p>