Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ You have to pass a factory function `func` that returns an instance of an implem
If you try to register a type more than once you will get an assertion in debug mode because normally this is not needed and not advised and probably a bug.
If you really have to overwrite a registration, then you can by setting the property `allowReassignment==true`` .

### Remove a registered item
You can remove registered itens using `unregister` function passing type `T` to remove a type register, or passing `instanceName` to remove a named register.
Additionally you can execute a function of your instance to dispose resources, passing a function to `disposingFunction` parameter.

```Dart
void unregister<T>({String instanceName, Function(T) disposingFunction})
```

### Resetting GetIt

```Dart
Expand Down