getRecords method

  1. @override
Future<List<Map<String, dynamic>>> getRecords(
  1. String tableName
)
override

Implementation

@override
Future<List<Map<String, dynamic>>> getRecords(String tableName) async {
  if (!Hive.isBoxOpen(tableName)) {
    await Hive.openBox(tableName);
  }
  final box = Hive.box(tableName);
  return box.keys.map((key) {
    return {'key': key, 'value': box.get(key)};
  }).toList();
}