Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #368

Merged
merged 1 commit into from
Aug 11, 2024
Merged

Update README.md #368

merged 1 commit into from
Aug 11, 2024

Conversation

liruohrh
Copy link
Contributor

reset function annotation is wrong, it is not disposes all registered types but clears all registered types

reset function annotation is wrong
@escamoteur
Copy link
Collaborator

escamoteur commented Jul 24, 2024 via email

@liruohrh
Copy link
Contributor Author

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.
  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.

My view

  1. My english is not so good. In my opinion, Clears all registered types and Disposes all registered types is different
  2. 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.

@escamoteur
Copy link
Collaborator

escamoteur commented Jul 28, 2024 via email

@escamoteur escamoteur merged commit f159175 into fluttercommunity:master Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants