feat : new injection logic

test : some file :)
chore : upgrade android gradle
This commit is contained in:
2025-08-19 11:22:34 +03:30
parent 9b04c0374b
commit 7c3c1280b2
47 changed files with 1139 additions and 377 deletions

View File

@@ -0,0 +1,18 @@
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_livestock/data/model/local/location/tmp_locations.dart';
class TmpLocalDataSource {
Future<void> addLocations(List<TmpLocations> list) async {
IsolatedBox<TmpLocations> box = await IsolatedHive.openBox<TmpLocations>('TmpBox');
if (await box.isNotEmpty) {
box.clear();
}
box.addAll(list);
}
Future<List<TmpLocations>> getLocations() async {
IsolatedBox<TmpLocations> box = await IsolatedHive.openBox<TmpLocations>('TmpBox');
var res = await box.values;
return res.toList();
}
}