readAllCustomers method

Future<List<Customer>> readAllCustomers()

Implementation

Future<List<Customer>> readAllCustomers() async {
  final db = await instance.database;
  final result = await db.query('customers');
  return result.map((json) => Customer.fromMap(json)).toList();
}