insert method

Future<List<Map<String, dynamic>>> insert()

Implementation

Future<List<Map<String, dynamic>>> insert() async {
  List<Map<String, dynamic>> result = [];
  final res = database != null ? await database!.insert(data: _data, tableName: table) : await DatabaseConfig.insert(data: _data, tableName: table);

  if (res) {
    result.add({'status': 'success', 'message': 'data has been Added'});
  }
  return result;
}