title: how to delete all from Moor?
body: <p>I tried to delete all when signout.</p>
  
  <pre><code>onPressed: () {
         _categoryBloc.deleteEntry();
   }
  </code></pre>
  
  <p>But error is coming</p>
  
  <blockquote>
    <p>Unhandled Exception: NoSuchMethodError: The method 'deleteEntry' was
    called on null. E/flutter ( 9255): Receiver: null E/flutter ( 9255):
    Tried calling: deleteEntry()</p>
  </blockquote>
  
  <p><strong>initial bloc</strong></p>
  
  <pre><code> CategoryBloc _categoryBloc;
  </code></pre>
  
  <p><strong>MyBloc class</strong></p>
  
  <pre><code>class CategoryBloc {
  ...
        void deleteEntry() {
          _categoryRepository.deleteCategory();
        }
  ...
  }
  </code></pre>
  
  <p><strong>my repo class</strong></p>
  
  <pre><code>deleteCategory() async {
      try{
        await _categoryDao.deleteEntry();
      }catch (e){
        print('Caught in delete ${e.body}');
        rethrow;
      }
    }
  </code></pre>
  
  <p><strong>dao class</strong></p>
  
  <pre><code>  Future deleteEntry() {
      return delete(categories).delete(Categorie());
    }
  </code></pre>
  
  <p><strong>data class</strong></p>
  
  <pre><code>class Categorie extends DataClass implements Insertable&lt;Categorie&gt; {
    final String id;
    final bool isActive;
    final String categoryName;
    final int displayOrder;
    Categorie(
        {@required this.id,
        @required this.isActive,
        @required this.categoryName,
        @required this.displayOrder});
    factory Categorie.fromData(Map&lt;String, dynamic&gt; data, GeneratedDatabase db,
  .....
  </code></pre>