From a57a12a805295d1f37e53951b6eeee25f46c4763 Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 25 Nov 2024 11:03:38 -0500 Subject: [PATCH] Add package to override hive --- overrides/hive/example/lib/main.dart | 8 ++++++++ overrides/hive/example/pubspec.yaml | 11 +++++++++++ overrides/hive/lib/hive.dart | 1 + overrides/hive/pubspec.yaml | 7 +++++++ 4 files changed, 27 insertions(+) create mode 100644 overrides/hive/example/lib/main.dart create mode 100644 overrides/hive/example/pubspec.yaml create mode 100644 overrides/hive/lib/hive.dart create mode 100644 overrides/hive/pubspec.yaml diff --git a/overrides/hive/example/lib/main.dart b/overrides/hive/example/lib/main.dart new file mode 100644 index 0000000..f8f43e9 --- /dev/null +++ b/overrides/hive/example/lib/main.dart @@ -0,0 +1,8 @@ +import 'package:hive/hive.dart'; + +void main() async { + Hive.init('test'); + final box = await Hive.openBox('test'); + box.put('key', 'value'); + print(box.get('key')); +} diff --git a/overrides/hive/example/pubspec.yaml b/overrides/hive/example/pubspec.yaml new file mode 100644 index 0000000..01f1f4c --- /dev/null +++ b/overrides/hive/example/pubspec.yaml @@ -0,0 +1,11 @@ +name: hive_override_example + +environment: + sdk: ^3.4.0 + +dependencies: + hive: any + +dependency_overrides: + hive: + path: ../ diff --git a/overrides/hive/lib/hive.dart b/overrides/hive/lib/hive.dart new file mode 100644 index 0000000..7d28b0a --- /dev/null +++ b/overrides/hive/lib/hive.dart @@ -0,0 +1 @@ +export 'package:hive_ce/hive.dart'; diff --git a/overrides/hive/pubspec.yaml b/overrides/hive/pubspec.yaml new file mode 100644 index 0000000..fb81b56 --- /dev/null +++ b/overrides/hive/pubspec.yaml @@ -0,0 +1,7 @@ +name: hive + +environment: + sdk: ^3.4.0 + +dependencies: + hive_ce: any