readCustomer method
Implementation
Future<Customer?> readCustomer(int id) async {
final db = await instance.database;
final maps = await db.query(
'customers',
where: 'id = ?',
whereArgs: [id],
);
if (maps.isNotEmpty) {
return Customer.fromMap(maps.first);
} else {
return null;
}
}