getById method

  1. @override
Future<Map<String, dynamic>> getById(
  1. String table,
  2. String primaryColumn,
  3. int id
)
override

Return data that is referenced by the given Id in the table.

Implementation

@override
Future<Map<String, dynamic>> getById(
  String table,
  String primaryColumn,
  int id,
) async {
  return _ref(table).firstWhere((item) => item[primaryColumn] == id);
}