insert method

Future<int> insert(
  1. String table,
  2. Map<String, dynamic> values,
  3. {String nullColumnHack,
  4. ConflictAlgorithm conflictAlgorithm}
)

This method helps insert a map of values into the specified table and returns the id of the last inserted row.

   var value = {
     'age': 18,
     'name': 'value'
   };
   int id = await db.insert(
     'table',
     value,
     conflictAlgorithm: ConflictAlgorithm.replace,
   );

Implementation

Future<int> insert(String table, Map<String, dynamic> values,
    {String nullColumnHack, ConflictAlgorithm conflictAlgorithm});