isar / isar/hive

Parametrize BoxEvent

Open
#941 2 comments 0 reactions 0 assignees View on GitHub
problem
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

Dear Hive developers! I tried to listen for box changes.

1) Please update the docs on site and on pub.dev. It's stated, that there is some listenable() method, returning ValueListenable(), but it actually has watch() method.

2) Currently, watch() returns a Stream of dull BoxEvents with dynamic data.
Please add a generic parameter (`BoxEvent`), so I can indicate an AsyncSnapshot type when listening.

![image](https://user-images.githubusercontent.com/12999702/160363152-7a6734ad-a55c-4aaa-a078-a4e991d9e17e.png)

(data is dynamic here)

Also, it leads to ugly manual construction of BoxEvent, when initialdata needed:
![image](https://user-images.githubusercontent.com/12999702/160365485-422ee8a8-433a-4559-8945-c698cbd40a45.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.