Skip to content

Commit

Permalink
fixed missing param on removeListener function
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin-morocho committed Feb 28, 2024
1 parent 5f3075f commit 69f02b1
Show file tree
Hide file tree
Showing 18 changed files with 148 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions examples/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -353,7 +353,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -402,7 +402,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
6 changes: 3 additions & 3 deletions examples/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ packages:
path: "../../packages/flutter_meedu"
relative: true
source: path
version: "9.0.8"
version: "9.0.10"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -422,10 +422,10 @@ packages:
dependency: transitive
description:
name: meedu
sha256: "826f7e22a06685c8a4106351605e32e1875bd20127dafcec671ac45d7cf08587"
sha256: c69a7af0d295bb817e34f44335a3ba37553d19e17da55d9888d21ae1f0d5d633
url: "https://pub.dev"
source: hosted
version: "9.0.2"
version: "9.0.3"
meedu_lints:
dependency: "direct dev"
description:
Expand Down
4 changes: 4 additions & 0 deletions examples/with_go_router/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

analyzer:
plugins:
- custom_lint

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter_meedu/notifiers.dart';
import 'package:flutter_meedu/providers.dart';

final colorProvider = StateNotifierArgumentsProvider<ColorNotifier, int, int>(
final colorProvider = Provider.stateArgumentsTag<ColorNotifier, int, int>(
(ref) => ColorNotifier(ref.arguments),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class ColorPage extends StatelessWidget {
super.key,
required this.isPrimary,
required this.colorIndex,
}) : tagName = '$isPrimary-$colorIndex'{

print(tagName);
}) : tagName = '$isPrimary-$colorIndex' {
colorProvider.setArguments(
colorIndex,
tag: tagName,
Expand Down
108 changes: 106 additions & 2 deletions examples/with_go_router/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.2.0"
analyzer_plugin:
dependency: transitive
description:
name: analyzer_plugin
sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161"
url: "https://pub.dev"
source: hosted
version: "0.11.3"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -121,6 +129,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.3"
ci:
dependency: transitive
description:
name: ci
sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13"
url: "https://pub.dev"
source: hosted
version: "0.1.0"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
url: "https://pub.dev"
source: hosted
version: "0.4.1"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -169,6 +193,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.6"
custom_lint:
dependency: transitive
description:
name: custom_lint
sha256: "22bd87a362f433ba6aae127a7bac2838645270737f3721b180916d7c5946cb5d"
url: "https://pub.dev"
source: hosted
version: "0.5.11"
custom_lint_builder:
dependency: transitive
description:
name: custom_lint_builder
sha256: "0d48e002438950f9582e574ef806b2bea5719d8d14c0f9f754fbad729bcf3b19"
url: "https://pub.dev"
source: hosted
version: "0.5.14"
custom_lint_core:
dependency: transitive
description:
name: custom_lint_core
sha256: "2952837953022de610dacb464f045594854ced6506ac7f76af28d4a6490e189b"
url: "https://pub.dev"
source: hosted
version: "0.5.14"
dart_style:
dependency: transitive
description:
Expand Down Expand Up @@ -218,10 +266,10 @@ packages:
dependency: "direct main"
description:
name: flutter_meedu
sha256: "8e9eb1f4b2e081954e66ea5b012d09654e28c8fba5007a804a5e71a6e8ca475e"
sha256: "2e164f57996ff677e24103fa61be9a9c7bddc198e38f6dcc31a9383af3bc3f66"
url: "https://pub.dev"
source: hosted
version: "9.0.2"
version: "9.1.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -280,6 +328,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.1"
hotreloader:
dependency: transitive
description:
name: hotreloader
sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e
url: "https://pub.dev"
source: hosted
version: "4.2.0"
http_multi_server:
dependency: transitive
description:
Expand Down Expand Up @@ -352,6 +408,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.5.0"
meedu:
dependency: transitive
description:
name: meedu
sha256: cb8082a0b48bad1b824a25f5c925fdd0db074e60e63adacdffa7a112cbb32d21
url: "https://pub.dev"
source: hosted
version: "9.1.0"
meedu_lints:
dependency: "direct dev"
description:
name: meedu_lints
sha256: "1519c0c29ae729fa2393584f331ca297569686e8087115ad70652289e976a74d"
url: "https://pub.dev"
source: hosted
version: "0.0.6"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -408,6 +480,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.3"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
url: "https://pub.dev"
source: hosted
version: "0.27.7"
shelf:
dependency: transitive
description:
Expand Down Expand Up @@ -445,6 +525,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.10.0"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -509,6 +597,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.2"
uuid:
dependency: transitive
description:
name: uuid
sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
url: "https://pub.dev"
source: hosted
version: "4.3.3"
vector_math:
dependency: transitive
description:
Expand All @@ -517,6 +613,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: a2662fb1f114f4296cf3f5a50786a2d888268d7776cf681aa17d660ffa23b246
url: "https://pub.dev"
source: hosted
version: "14.0.0"
watcher:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion examples/with_go_router/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies:
sdk: flutter
go_router: ^11.1.4
freezed_annotation: ^2.0.1
flutter_meedu: ^9.0.2
flutter_meedu: ^9.1.0


# The following adds the Cupertino Icons font to your application.
Expand All @@ -50,6 +50,7 @@ dev_dependencies:
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.3
meedu_lints: ^0.0.6

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
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 @@
## [9.1.0]
- Updated to meedu: ^9.1.0

## [9.0.10]
- Prevent dispose provider when didChangeDependencies is called on ConsumerWidget.

Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_meedu/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ packages:
dependency: "direct main"
description:
name: meedu
sha256: c69a7af0d295bb817e34f44335a3ba37553d19e17da55d9888d21ae1f0d5d633
sha256: cb8082a0b48bad1b824a25f5c925fdd0db074e60e63adacdffa7a112cbb32d21
url: "https://pub.dev"
source: hosted
version: "9.0.3"
version: "9.1.0"
meta:
dependency: "direct main"
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 powerful State Management, Dependency Injection, Reactive programming and Navigation for Flutter apps.
version: 9.0.10
version: 9.1.0
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
meta: ^1.9.1
meedu: ^9.0.3
meedu: ^9.1.0

dev_dependencies:
equatable: ^2.0.5
Expand Down
6 changes: 6 additions & 0 deletions packages/hooks_meedu/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.0
- Upgrade to
flutter_meedu: ^9.1.0
flutter_hooks: ^0.20.5


## 0.1.6
- Upgrade to
flutter_meedu: ^9.0.9
Expand Down
6 changes: 3 additions & 3 deletions packages/hooks_meedu/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: hooks_meedu
description: A way to use both flutter_hooks and flutter_meedu together.
version: 0.1.6
version: 0.2.0
homepage: https://github.com/darwin-morocho/flutter-meedu/tree/master/packages/hooks_meedu
documentation: https://flutter.meedu.app

Expand All @@ -11,8 +11,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_hooks: ^0.20.2
flutter_meedu: ^9.0.9
flutter_hooks: ^0.20.5
flutter_meedu: ^9.1.0

dev_dependencies:
flutter_test:
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 @@
## [9.1.0]
- Fixed removeListener missing param.

## [9.0.3]
- Improve PersistentStateMixin.

Expand Down
7 changes: 5 additions & 2 deletions packages/meedu/lib/notifiers/base_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ mixin ListeneableNotifier<T> {
}

/// remove a listener from the notifier
void removeListener(ListenerCallback<T> listener) {
void removeListener(
ListenerCallback<T> listener, {
bool ignoreAutoDispose = false,
}) {
if (_listeners.isNotEmpty) {
_listeners.remove(listener);

if (!hasListeners) {
if (!hasListeners && !ignoreAutoDispose) {
_disposableCallback?.call();
}
}
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: 9.0.3
version: 9.1.0
homepage: https://github.com/darwin-morocho/flutter-meedu/tree/master/packages/meedu
documentation: https://flutter.meedu.app

Expand Down
2 changes: 1 addition & 1 deletion website/docs/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ First add [hooks_meedu](https://pub.dev/packages/hooks_meedu) to your `pubspec.y
```yaml
dependencies:
flutter_hooks: lastest_version
hooks_meedu: ^0.1.6
hooks_meedu: ^0.2.0
```
Expand Down
Loading

0 comments on commit 69f02b1

Please sign in to comment.