diff --git a/.gitignore b/.gitignore index 7c9018f..2ade789 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ *.iws .idea/ .fvm/ - +.vscode/ # The .vscode folder contains launch configuration and tasks you configure in # VS Code which you may wish to be included in version control, so this line # is commented out by default. diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index b551717..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Flutter: Run all Tests", - "type": "dart", - "request": "launch", - "program": "./test/" - }, - { - "name": "occam", - "request": "launch", - "type": "dart" - }, - { - "name": "occam (profile mode)", - "request": "launch", - "type": "dart", - "flutterMode": "profile" - }, - { - "name": "example", - "cwd": "example", - "request": "launch", - "type": "dart" - }, - { - "name": "example (profile mode)", - "cwd": "example", - "request": "launch", - "type": "dart", - "flutterMode": "profile" - } - ] -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e3b4c6..b85d747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.0.1 +## 1.0.1 -* TODO: Describe initial release. +- Test added +- `Fix` remove double calling in mixin on listeners. ## 1.0.0 diff --git a/README.md b/README.md index 903878e..2eded62 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ + + # Occam Simple state manager based on native fluter stateful for my personal use. Credits to: @roipeker - ## Index - [Why another state manager?](#why) diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 0000000..ec70dab --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,221 @@ +SF:lib/src/lyfe_cicle/state_parent.dart +DA:5,0 +DA:9,0 +DA:10,0 +DA:11,0 +DA:13,0 +DA:15,0 +DA:16,0 +DA:17,0 +DA:24,0 +DA:25,0 +DA:30,0 +DA:32,0 +DA:33,0 +DA:36,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:42,0 +DA:45,0 +DA:47,0 +DA:49,0 +DA:52,0 +DA:54,0 +DA:55,0 +DA:58,0 +DA:60,0 +DA:61,0 +DA:62,0 +DA:68,0 +LF:29 +LH:0 +end_of_record +SF:lib/src/lyfe_cicle/state_widget.dart +DA:4,1 +DA:8,3 +DA:10,1 +DA:11,1 +DA:18,3 +DA:22,2 +DA:23,3 +DA:26,1 +DA:28,1 +DA:29,1 +DA:32,1 +DA:34,1 +DA:35,1 +DA:38,0 +DA:40,0 +DA:41,0 +DA:44,1 +DA:46,1 +DA:47,1 +DA:48,2 +DA:49,1 +DA:50,1 +DA:51,2 +DA:55,1 +DA:58,1 +DA:59,1 +DA:61,1 +DA:62,2 +LF:28 +LH:25 +end_of_record +SF:lib/src/lyfe_cicle/state_controller.dart +DA:7,0 +DA:11,0 +DA:14,1 +DA:17,1 +DA:18,0 +DA:23,1 +DA:27,0 +DA:28,0 +DA:30,1 +DA:33,0 +DA:34,1 +LF:11 +LH:5 +end_of_record +SF:lib/src/rx/rx_notifier.dart +DA:4,6 +DA:8,4 +DA:12,0 +DA:13,0 +DA:14,0 +DA:16,0 +DA:19,2 +DA:21,2 +DA:23,6 +DA:26,0 +DA:27,0 +DA:36,3 +DA:38,6 +DA:40,3 +DA:43,3 +DA:45,3 +DA:46,6 +DA:49,1 +DA:50,2 +DA:52,0 +DA:53,0 +DA:54,0 +DA:55,0 +DA:59,0 +DA:60,0 +DA:61,0 +DA:65,0 +DA:66,0 +DA:67,0 +DA:71,0 +DA:73,0 +DA:74,0 +DA:75,0 +DA:76,0 +DA:77,0 +DA:80,0 +DA:86,2 +DA:87,4 +DA:89,0 +DA:91,1 +DA:93,1 +DA:94,1 +DA:95,0 +DA:97,2 +DA:98,0 +DA:100,2 +DA:101,1 +LF:47 +LH:21 +end_of_record +SF:lib/src/widgets/rx_widget.dart +DA:7,2 +DA:11,2 +DA:13,2 +DA:14,2 +DA:20,2 +DA:22,2 +DA:23,8 +DA:24,8 +DA:27,0 +DA:29,0 +DA:30,0 +DA:31,0 +DA:33,0 +DA:36,2 +DA:37,8 +DA:39,2 +DA:41,8 +DA:42,2 +DA:45,14 +LF:19 +LH:14 +end_of_record +SF:lib/src/rx/iterables/rx_list.dart +DA:4,2 +DA:6,0 +DA:7,0 +DA:9,0 +DA:11,0 +DA:12,0 +DA:15,1 +DA:17,2 +DA:18,1 +DA:21,1 +DA:23,2 +DA:24,1 +DA:28,0 +DA:30,0 +DA:31,0 +DA:34,1 +DA:36,2 +DA:37,1 +DA:40,0 +DA:42,0 +DA:43,0 +DA:46,0 +DA:47,0 +DA:48,0 +DA:54,1 +DA:55,2 +DA:57,0 +DA:59,0 +DA:60,0 +DA:65,0 +DA:66,0 +DA:67,0 +LF:32 +LH:12 +end_of_record +SF:lib/src/rx/primitives/rx_bool.dart +DA:4,0 +DA:10,0 +DA:16,0 +DA:22,0 +DA:25,0 +DA:27,0 +DA:30,0 +DA:33,0 +DA:34,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:43,0 +DA:44,0 +LF:14 +LH:0 +end_of_record +SF:lib/src/rx/extensions/extensions.dart +DA:4,4 +DA:8,0 +DA:12,2 +LF:3 +LH:2 +end_of_record +SF:lib/src/utils/extension.dart +DA:5,0 +DA:8,0 +LF:2 +LH:0 +end_of_record diff --git a/lib/src/lyfe_cicle/state_parent.dart b/lib/src/lyfe_cicle/state_parent.dart index c5e5477..a2eedff 100644 --- a/lib/src/lyfe_cicle/state_parent.dart +++ b/lib/src/lyfe_cicle/state_parent.dart @@ -45,7 +45,6 @@ class ParentStateElement extends StatelessElement { @override void unmount() { _justMounted = false; - // _otherState.removeDependant(this); super.unmount(); } diff --git a/lib/src/rx/rx_notifier.dart b/lib/src/rx/rx_notifier.dart index 4435c08..7f21152 100644 --- a/lib/src/rx/rx_notifier.dart +++ b/lib/src/rx/rx_notifier.dart @@ -36,7 +36,6 @@ mixin RxMixin on ValueNotifier { @override void addListener(VoidCallback listener) { _listeners.add(listener); - // super._lis super.addListener(listener); } diff --git a/pubspec.lock b/pubspec.lock index aa61145..cd64b14 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -456,6 +456,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + test_cov_console: + dependency: "direct dev" + description: + name: test_cov_console + sha256: "73519e8be3689d73f5cffb652c12c310acacf48379396d834da937094836e65e" + url: "https://pub.dev" + source: hosted + version: "0.2.2" timing: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1a26579..9750a29 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,5 +20,6 @@ dev_dependencies: sdk: flutter flutter_lints: ^1.0.0 build_runner: ^2.4.6 + test_cov_console: ^0.2.2 flutter: diff --git a/test/lyfe_cicle/state_test.dart b/test/lyfe_cicle/state_test.dart index e28c4b6..aa7a244 100644 --- a/test/lyfe_cicle/state_test.dart +++ b/test/lyfe_cicle/state_test.dart @@ -30,7 +30,6 @@ void main() { ); } -// @GenerateNiceMocks([MockSpec()]) class MyPageController extends StateController { final counter = 1.rx;