Skip to content

Commit

Permalink
bump to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
letsar committed Mar 25, 2021
1 parent 27c6a4f commit 8cb571c
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 158 deletions.
50 changes: 29 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,28 @@ A view can be interested in some particular states and has to use a logic compon



- [Getting started](#getting-started)
- [Basic usage](#basic-usage)
- [Intermediate usage](#intermediate-usage)
- [Select](#select)
- [Consumer](#consumer)
- [LogicLoader](#logicLoader)
- [Overrides](#overrides)
- [Mocking values in tests](#mocking-values-in-tests)
- [Advanced usage](#advanced-usage)
- [Computed](#computed)
- [Observers](#observers)
- [Undo/Redo](#undoredo)
- [Disposable](#disposable)
- [StateListener](#stateListener)
- [Snippets](#snippets)
- [binder](#binder)
- [The vision](#the-vision)
- [Getting started](#getting-started)
- [Installation](#installation)
- [Basic usage](#basic-usage)
- [Intermediate usage](#intermediate-usage)
- [Select](#select)
- [Consumer](#consumer)
- [LogicLoader](#logicloader)
- [Overrides](#overrides)
- [Reusing a reference under a different scope.](#reusing-a-reference-under-a-different-scope)
- [Mocking values in tests](#mocking-values-in-tests)
- [Advanced usage](#advanced-usage)
- [Computed](#computed)
- [Observers](#observers)
- [Undo/Redo](#undoredo)
- [Disposable](#disposable)
- [StateListener](#statelistener)
- [DartDev Tools](#dartdev-tools)
- [Snippets](#snippets)
- [Sponsoring](#sponsoring)
- [Contributions](#contributions)

## Getting started

Expand Down Expand Up @@ -109,7 +116,7 @@ In any widget under the `BinderScope`, you can call extension methods on `BuildC
```dart
class CounterView extends StatelessWidget {
const CounterView({Key key}) : super(key: key);
const CounterView({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -168,7 +175,7 @@ For example, if we have an app bar title which is only responsible for displayin

```dart
class AppBarTitle extends StatelessWidget {
const AppBarTitle({Key key}) : super(key: key);
const AppBarTitle({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
Expand All @@ -187,7 +194,7 @@ This widget can take a watchable (a `StateRef` or even a selected state of a `St

```dart
class MyAppBar extends StatelessWidget {
const MyAppBar({Key key}) : super(key: key);
const MyAppBar({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -238,7 +245,7 @@ From the widget side, you'll have to use the `LogicLoader` and provide it the lo
```dart
class Home extends StatelessWidget {
const Home({
Key key,
Key? key,
}) : super(key: key);
@override
Expand All @@ -256,7 +263,7 @@ You can watch the state in a subtree to display a progress indicator when the da
```dart
class UsersView extends StatelessWidget {
const UsersView({
Key key,
Key? key,
}) : super(key: key);
@override
Expand All @@ -278,7 +285,7 @@ Alternatively, you can use the `builder` parameter to achieve the same goal:
```dart
class Home extends StatelessWidget {
const Home({
Key key,
Key? key,
}) : super(key: key);
@override
Expand Down Expand Up @@ -425,6 +432,7 @@ You may encounter a situation where different widgets are interested in a derive
Let's say you have a list of products referenced by `productsRef`, each product has a price, and you can filter these products according to a price range (referenced by `minPriceRef` and `maxPriceRef`).

You could then define the following `Computed` instance:

```dart
final filteredProductsRef = Computed((watch) {
final products = watch(productsRef);
Expand Down
4 changes: 2 additions & 2 deletions examples/architecture/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages:
path: "../../packages/binder"
relative: true
source: path
version: "0.3.1"
version: "0.4.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -638,5 +638,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.12.0-0.0 <3.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"
42 changes: 21 additions & 21 deletions examples/counter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0"
binder:
dependency: "direct main"
description:
path: "../../packages/binder"
relative: true
source: path
version: "0.2.4"
version: "0.4.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
build:
dependency: transitive
description:
Expand Down Expand Up @@ -70,14 +70,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
cli_util:
dependency: transitive
description:
Expand All @@ -91,7 +91,7 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
code_builder:
dependency: transitive
description:
Expand All @@ -105,7 +105,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -147,7 +147,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
fixnum:
dependency: transitive
description:
Expand Down Expand Up @@ -199,14 +199,14 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
mockito:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -241,7 +241,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0"
pedantic:
dependency: transitive
description:
Expand Down Expand Up @@ -281,56 +281,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
watcher:
dependency: transitive
description:
Expand All @@ -346,5 +346,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.17.0 <2.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"
Loading

0 comments on commit 8cb571c

Please sign in to comment.