hive_listener 1.2.1 copy "hive_listener: ^1.2.1" to clipboard
hive_listener: ^1.2.1 copied to clipboard

A tiny widget to listen hive box changes, using the ValueListenableBuilder with removing unnecessary parts of it, like context and child widget of it.

hive_listener #

A tiny widget to listen hive box changes

How to use #

HiveListener(
  box: Hive.box('settings'),
  keys: ['dark_theme'], // keys is optional to specify listening value changes
  builder: (box) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: box.get('dark_theme', defaultValue: false) ? ThemeData.dark() : ThemeData.light(),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  },
)
copied to clipboard
  • note: if you want to use without null safety, you can select 0.1.0 version
20
likes
150
points
577
downloads

Publisher

verified publisherdershub.com

Weekly Downloads

2024.09.16 - 2025.03.31

A tiny widget to listen hive box changes, using the ValueListenableBuilder with removing unnecessary parts of it, like context and child widget of it.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, hive, hive_flutter

More

Packages that depend on hive_listener