Skip to content

Commit

Permalink
Fixed _debugAssertNotDisposed(); on removeListener.
Browse files Browse the repository at this point in the history
  • Loading branch information
the-meedu-app authored and the-meedu-app committed Jan 17, 2021
1 parent c4d0fae commit 05b3e34
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Add the following to your pubspec.yaml

```yaml
dependencies:
meedu: ^0.5.3
flutter_meedu: ^1.1.0
meedu: ^0.5.4
flutter_meedu: ^1.1.1
```
Now you're ready to use **flutter_meedu**
3 changes: 3 additions & 0 deletions packages/flutter_meedu/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.1.1]
- Updated meedu: ^0.5.4.

## [1.1.0]
- Added tag support for Provider.of<...>(...)

Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_meedu/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.1.1"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -94,7 +94,7 @@ packages:
name: meedu
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.3"
version: "0.5.4"
meta:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_meedu/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
equatable: ^1.2.5
flutter_meedu:
path: ../
meedu: ^0.5.3
meedu: ^0.5.4

# meedu:
# path: ../../meedu
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_meedu/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ packages:
name: meedu
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.2+2"
version: "0.5.4"
meta:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_meedu/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_meedu
description: A simple State Managment, Dependency Injection, Reactive programming and Navigation for Flutter apps.
version: 1.1.0
version: 1.1.1
homepage: https://github.com/darwin-morocho/flutter-meedu/tree/master/packages/flutter_meedu
documentation: https://flutter.meedu.app

Expand All @@ -12,7 +12,7 @@ dependencies:
flutter:
sdk: flutter
provider: ^4.3.2+2
meedu: ^0.5.2+2
meedu: ^0.5.4

# meedu:
# path: ../meedu
Expand Down
3 changes: 3 additions & 0 deletions packages/meedu/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [0.5.4]
- Fixed _debugAssertNotDisposed(); on removeListener.

## [0.5.3]
- Removed unused imports.
## [0.5.2+2]
Expand Down
11 changes: 6 additions & 5 deletions packages/meedu/lib/src/state_managment/base_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ abstract class BaseController<T> {

/// remove a listener
void removeListener(ListenerCallback<T> listener) {
_debugAssertNotDisposed();
for (final _ListenerEntry<T> entry in _listeners) {
if (entry.listener == listener) {
entry.unlink();
return;
if (_listeners != null) {
for (final _ListenerEntry<T> entry in _listeners) {
if (entry.listener == listener) {
entry.unlink();
return;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/meedu/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: meedu
description: A simple State Managment, Dependency Injection, Reactive programming for dart Projects.
version: 0.5.3
version: 0.5.4
homepage: https://github.com/darwin-morocho/flutter-meedu/tree/master/packages/meedu
documentation: https://flutter.meedu.app

Expand Down

0 comments on commit 05b3e34

Please sign in to comment.