Skip to content

Commit

Permalink
Merge pull request #117 from jinyus:v1
Browse files Browse the repository at this point in the history
V1
  • Loading branch information
jinyus authored May 30, 2024
2 parents 30d299a + 7a2d7d1 commit 67ab921
Show file tree
Hide file tree
Showing 41 changed files with 1,221 additions and 59 deletions.
14 changes: 11 additions & 3 deletions examples/auth_flow/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,23 @@ packages:
path: "../../packages/state_beacon"
relative: true
source: path
version: "0.45.0"
version: "1.0.0"
state_beacon_core:
dependency: transitive
description:
name: state_beacon_core
sha256: "7e6b3f157cb822acb77829f6696e562064a4b9a5cd687e4056d203288135c20c"
sha256: c109a5fee4b93f1cf2fcb2e6ea9c74285654e3e8799eb6e33c69581807214f94
url: "https://pub.dev"
source: hosted
version: "0.43.5"
version: "1.0.0"
state_beacon_flutter:
dependency: transitive
description:
name: state_beacon_flutter
sha256: "4429e1efc43ded8d05d34e2d9049cefa5c4d48a1f3cdaa43435015c5d73ec284"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
Expand Down
14 changes: 11 additions & 3 deletions examples/counter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,23 @@ packages:
path: "../../packages/state_beacon"
relative: true
source: path
version: "0.45.0"
version: "1.0.0"
state_beacon_core:
dependency: transitive
description:
name: state_beacon_core
sha256: "7e6b3f157cb822acb77829f6696e562064a4b9a5cd687e4056d203288135c20c"
sha256: c109a5fee4b93f1cf2fcb2e6ea9c74285654e3e8799eb6e33c69581807214f94
url: "https://pub.dev"
source: hosted
version: "0.43.5"
version: "1.0.0"
state_beacon_flutter:
dependency: transitive
description:
name: state_beacon_flutter
sha256: "4429e1efc43ded8d05d34e2d9049cefa5c4d48a1f3cdaa43435015c5d73ec284"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
Expand Down
14 changes: 11 additions & 3 deletions examples/flutter_main/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,23 @@ packages:
path: "../../packages/state_beacon"
relative: true
source: path
version: "0.45.0"
version: "1.0.0"
state_beacon_core:
dependency: transitive
description:
name: state_beacon_core
sha256: "7e6b3f157cb822acb77829f6696e562064a4b9a5cd687e4056d203288135c20c"
sha256: c109a5fee4b93f1cf2fcb2e6ea9c74285654e3e8799eb6e33c69581807214f94
url: "https://pub.dev"
source: hosted
version: "0.43.5"
version: "1.0.0"
state_beacon_flutter:
dependency: transitive
description:
name: state_beacon_flutter
sha256: "4429e1efc43ded8d05d34e2d9049cefa5c4d48a1f3cdaa43435015c5d73ec284"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
state_beacon_lint:
dependency: "direct dev"
description:
Expand Down
14 changes: 11 additions & 3 deletions examples/github_search/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,23 @@ packages:
path: "../../packages/state_beacon"
relative: true
source: path
version: "0.45.1"
version: "1.0.0"
state_beacon_core:
dependency: transitive
description:
name: state_beacon_core
sha256: "7e6b3f157cb822acb77829f6696e562064a4b9a5cd687e4056d203288135c20c"
sha256: c109a5fee4b93f1cf2fcb2e6ea9c74285654e3e8799eb6e33c69581807214f94
url: "https://pub.dev"
source: hosted
version: "0.43.5"
version: "1.0.0"
state_beacon_flutter:
dependency: transitive
description:
name: state_beacon_flutter
sha256: "4429e1efc43ded8d05d34e2d9049cefa5c4d48a1f3cdaa43435015c5d73ec284"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
Expand Down
14 changes: 11 additions & 3 deletions examples/shopping_cart/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,23 @@ packages:
path: "../../packages/state_beacon"
relative: true
source: path
version: "0.45.0"
version: "1.0.0"
state_beacon_core:
dependency: transitive
description:
name: state_beacon_core
sha256: "7e6b3f157cb822acb77829f6696e562064a4b9a5cd687e4056d203288135c20c"
sha256: c109a5fee4b93f1cf2fcb2e6ea9c74285654e3e8799eb6e33c69581807214f94
url: "https://pub.dev"
source: hosted
version: "0.43.5"
version: "1.0.0"
state_beacon_flutter:
dependency: transitive
description:
name: state_beacon_flutter
sha256: "4429e1efc43ded8d05d34e2d9049cefa5c4d48a1f3cdaa43435015c5d73ec284"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
Expand Down
14 changes: 11 additions & 3 deletions examples/skeleton/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,23 @@ packages:
path: "../../packages/state_beacon"
relative: true
source: path
version: "0.45.0"
version: "1.0.0"
state_beacon_core:
dependency: transitive
description:
name: state_beacon_core
sha256: "7e6b3f157cb822acb77829f6696e562064a4b9a5cd687e4056d203288135c20c"
sha256: c109a5fee4b93f1cf2fcb2e6ea9c74285654e3e8799eb6e33c69581807214f94
url: "https://pub.dev"
source: hosted
version: "0.43.5"
version: "1.0.0"
state_beacon_flutter:
dependency: transitive
description:
name: state_beacon_flutter
sha256: "4429e1efc43ded8d05d34e2d9049cefa5c4d48a1f3cdaa43435015c5d73ec284"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
Expand Down
14 changes: 11 additions & 3 deletions examples/vgv_best_practices/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,23 @@ packages:
path: "../../packages/state_beacon"
relative: true
source: path
version: "0.45.0"
version: "1.0.0"
state_beacon_core:
dependency: transitive
description:
name: state_beacon_core
sha256: "7e6b3f157cb822acb77829f6696e562064a4b9a5cd687e4056d203288135c20c"
sha256: c109a5fee4b93f1cf2fcb2e6ea9c74285654e3e8799eb6e33c69581807214f94
url: "https://pub.dev"
source: hosted
version: "0.43.5"
version: "1.0.0"
state_beacon_flutter:
dependency: transitive
description:
name: state_beacon_flutter
sha256: "4429e1efc43ded8d05d34e2d9049cefa5c4d48a1f3cdaa43435015c5d73ec284"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
Expand Down
4 changes: 4 additions & 0 deletions packages/state_beacon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.0

- Stable release

# 0.45.2

- [Fix] Edge case for Subscriptions
Expand Down
3 changes: 2 additions & 1 deletion packages/state_beacon/lib/src/extensions/scoped_ref.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
part of 'extensions.dart';
import 'package:flutter/widgets.dart';
import 'package:state_beacon/state_beacon.dart';

/// A function that takes a [BeaconController] and returns 1 of its beacon.
typedef BeaconSelector<T, C> = ReadableBeacon<T> Function(C);
Expand Down
7 changes: 2 additions & 5 deletions packages/state_beacon/lib/state_beacon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
library;

export 'package:lite_ref/lite_ref.dart';
export 'package:state_beacon_core/state_beacon_core.dart' hide BeaconScheduler;
export 'src/controller/controller.dart';
export 'src/extensions/extensions.dart' hide hasNotifier;
export 'src/notifier/text_editing_controller.dart';
export 'src/scheduler.dart';
export 'package:state_beacon_flutter/state_beacon_flutter.dart';
export 'src/extensions/scoped_ref.dart';
4 changes: 2 additions & 2 deletions packages/state_beacon/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: state_beacon
description: A reactive primitive and simple state managerment solution for dart and flutter
version: 0.45.2
version: 1.0.0
repository: https://github.com/jinyus/dart_beacon

environment:
Expand All @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter
lite_ref: ^0.8.1
state_beacon_core: ^0.43.6
state_beacon_flutter: ^1.0.0

dev_dependencies:
flutter_lints: ^3.0.0
Expand Down
4 changes: 4 additions & 0 deletions packages/state_beacon_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.0

- Stable release

# 0.43.6

- [Fix] Edge case for Subscriptions
Expand Down
2 changes: 1 addition & 1 deletion packages/state_beacon_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: state_beacon_core
description: A reactive primitive and simple state managerment solution for dart.
version: 0.43.6
version: 1.0.0
repository: https://github.com/jinyus/dart_beacon

environment:
Expand Down
15 changes: 3 additions & 12 deletions packages/state_beacon_core/test/src/beacons/family_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ void main() {
});

test('should remove from cache when disposed', () {
final family = Beacon.family(
(int arg) => Beacon.writable('$arg'),
cache: true,
);
final family = Beacon.family((int arg) => Beacon.writable('$arg'));
final beacon1 = family(1);

beacon1.dispose();
Expand All @@ -97,10 +94,7 @@ void main() {
});

test('should clear the cache and dispose beacons', () {
final family = Beacon.family(
(int arg) => Beacon.writable('$arg'),
cache: true,
);
final family = Beacon.family((int arg) => Beacon.writable('$arg'));

final beacon1 = family(1);

Expand All @@ -114,10 +108,7 @@ void main() {
});

test('should not clear beacons individually when clearing', () {
final family = Beacon.family(
(int arg) => Beacon.writable('$arg'),
cache: true,
);
final family = Beacon.family((int arg) => Beacon.writable('$arg'));

var ran = 0;

Expand Down
10 changes: 10 additions & 0 deletions packages/state_beacon_flutter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/

# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock

build/
coverage/
Loading

0 comments on commit 67ab921

Please sign in to comment.