title: The non-nullable variable '_database' must be initialized
body: <p>I am using flutter to make a Windows app and while using the sqflite and making a database, this error pops up I don't know how to really fix this.</p>
  <pre><code>import 'dart:io';
  
  import 'package:path_provider/path_provider.dart';
  import 'package:path/path.dart';
  import 'package:sqflite/sqflite.dart';
  
  class DatabaseHelper {
    static final _dbName = 'Database.db';
    static final _dbVersion = 1;
    static final _tableName = 'my table';
  
    static final columnId = '_id';
    static final columnName = 'name';
  
    DatabaseHelper._privateConstuctor();
    static final DatabaseHelper instance = DatabaseHelper._privateConstuctor();
  
    static Database _database;
    Future&lt;Database&gt; get database async {
      if (_database == null) {
        _database = await _initiateDatabase();
      }
      return _database;
    }
  
    _initiateDatabase() async {
      Directory directory = await getApplicationDocumentsDirectory();
      String path = join(directory.path, _dbName);
      return await openDatabase(path, version: _dbVersion, onCreate: _onCreate);
    }
  
    Future _onCreate(Database db, int version) async {
      await db.execute(''' 
            CREATE TABLE $_tableName ( 
            $columnId INTEGER PRIMARY KEY,
            $columnName TEXT NOT NULL)
            
            
            ''');
    }
  
    Future&lt;int&gt; insert(Map&lt;String, dynamic&gt; row) async {
      Database db = await instance.database;
      return await db.insert(_tableName, row);
    }
  
    Future&lt;List&lt;Map&lt;String, dynamic&gt;&gt;&gt; queryAll() async {
      Database db = await instance.database;
      return await db.query(_tableName);
    }
  
    Future&lt;int&gt; update(Map&lt;String, dynamic&gt; row) async {
      Database db = await instance.database;
      int id = row[columnId];
      return await db
          .update(_tableName, row, where: '$columnId = ?', whereArgs: [id]);
    }
  
    Future&lt;int&gt; delete(int id) async {
      Database db = await instance.database;
      return await db.delete(_tableName, where: '$columnId = ?', whereArgs: [id]);
    }
  }
  </code></pre>
  <p>This is the code i use for the databasehelper....it shows error in _database  like this:</p>
  <pre class="lang-none prettyprint-override"><code>The non-nullable variable '_database' must be initialized.
  Try adding an initializer expression.
  </code></pre>