Closed liruohrh closed 4 months ago
It also calls any registered dispose functions m, so why is it wrong? Am 24. Juli 2024, 14:42 +0100 schrieb liruohrh @.***>:
reset function annotation is wrong, it is not disposes all registered types but clears all registered types You can view, comment on, or merge this pull request online at: https://github.com/fluttercommunity/get_it/pull/368 Commit Summary
• e9385f1 Update README.md
File Changes (1 file)
• M README.md (2)
Patch Links:
• https://github.com/fluttercommunity/get_it/pull/368.patch • https://github.com/fluttercommunity/get_it/pull/368.diff
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
In get_it.dart, annotation of reset is:
/// Clears all registered types in the reverse order in which they were registered.
/// Handy when writing unit tests or when disposing services that depend on each other.
/// If you provided dispose function when registering they will be called
/// [dispose] if `false` it only resets without calling any dispose
/// functions
/// As dispose functions can be async, you should await this function.
Future<void> reset({bool dispose = true});
and annotation of resetScope is also Clears but not Disposes.
But in README.md the annotation is: Disposes all registered types.
,
even in README.md, resetLazySingleton is a little bit above the reset is also Clears but not Disposes.
You are right will correct it in the next release Am 25. Juli 2024, 05:31 +0100 schrieb liruohrh @.***>:
Reason In get_it.dart, annotation of reset is: /// Clears all registered types in the reverse order in which they were registered. /// Handy when writing unit tests or when disposing services that depend on each other. /// If you provided dispose function when registering they will be called /// [dispose] if
false
it only resets without calling any dispose /// functions /// As dispose functions can be async, you should await this function. Futurereset({bool dispose = true}); and annotation of resetScope is also Clears but not Disposes. But in README.md the annotation is: Disposes all registered types., even in README.md, resetLazySingleton is a little bit above the reset is also Clears but not Disposes. My view
- My english is not so good. In my opinion, Clears all registered types and Disposes all registered types is different
- More importantly, I think the annotation should be the same, at least the meaning is the same. But in get_it, for annotation , README.md is different from get_it.dart.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
reset function annotation is wrong, it is not disposes all registered types but clears all registered types