mirror of
https://github.com/nrop19/weiman_app.git
synced 2025-08-02 23:05:48 +08:00
18 lines
334 B
Dart
18 lines
334 B
Dart
import 'package:hive/hive.dart';
|
|
|
|
const HistoryOffsetName = 'history';
|
|
|
|
class HistoryOffset {
|
|
static Box box;
|
|
|
|
static double get(String cid) {
|
|
print('get $cid');
|
|
return box.get(cid) ?? 0.0;
|
|
}
|
|
|
|
static Future<void> save(String cid, double offset) {
|
|
print('save $cid $offset');
|
|
return box.put(cid, offset);
|
|
}
|
|
}
|