save method
Implementation
Future<void> save(Role role) async {
final db = await database;
if (role.id == null) { // Save to database
await db.insert(
'roles',
role.toMap(),
conflictAlgorithm: ConflictAlgorithm.replace,
);
}
if (role.id != null) { // update role
await updateRole(role);
}
}