getSize method
Size in KB, matching the spec and the Hive stores -- this returned raw bytes, over-reporting by 1024x.
Implementation
@override
int getSize() {
final pageCount =
_db.raw.select('PRAGMA page_count;').first.values.first as int? ?? 0;
final pageSize =
_db.raw.select('PRAGMA page_size;').first.values.first as int? ?? 0;
return pageCount * pageSize ~/ 1024;
}