title: How to convert Boolean Value to Int value using Sqlite in Flutter?
body: <p>Using <code>flutter</code> I have this model</p>
  <pre><code>  class Task {
    String color;
    String env;
    String id;
    String name;
    String description;
    bool isBuyIt;
    bool isOnBacklog;
   }
  </code></pre>
  <p>I am using <code>SwitchListTile</code> in order to change the boolean value of <code>isBuyIt</code> and <code>isOnBacklog</code></p>
  <pre><code>SwitchListTile(
                activeColor: HexColor(task.color),
                title: Text(&quot;Do you have it?&quot;),
                value: task.isBuyIt,
                onChanged: (bool value) {
                  setState(() {
                    task.isBuyIt = value;
                  });
                },
                secondary: IconButton(
                  icon: Icon(Icons.shopping_cart),
                  onPressed: null,
                  color: HexColor(task.color),
                ),
              ) 
  </code></pre>
  <p>I am using <code>sqflite: ^1.3.0</code> and as you know it does not <a href="https://sqlite.org/datatype3.html" rel="noreferrer">support bool value</a>. I made the table like this way:</p>
  <pre><code>  Future _onCreate(Database db, int version) async {
      await db.execute('''
            CREATE TABLE $table (
              $columnId TEXT PRIMARY KEY,
              $columnName TEXT NOT NULL,
              $columnColor TEXT NOT NULL,
              $columnEnv TEXT NOT NULL,
              $columnDescription TEXT NOT NULL,
              $columnisBuyIt INTEGER NOT NULL,
              $columnisOnBacklog INTEGER NOT NULL
            )
            ''');
    }
  </code></pre>
  <p>But I dont know how to convert <code>Boolean</code> value into <code>Integer</code> value. I dont want to change the model fields to <code>Integer</code> because <code>SwitchListTile</code>doesnt works with <code>INT</code> value</p>
  <p>I guess <code>Check Constraint</code> would work.</p>