Skip to content

Fixed bug in InitBuilder docs #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ AsyncBuilder<String>(
)
```

To avoid rebuilds see [InitBuilder](#InitBuilder)

Note that you cannot provide both a stream and future.

## AsyncBuilder Features
Expand Down Expand Up @@ -93,7 +95,7 @@ InitBuilder, for example:
```dart
static Future<int> getNumber() async => ...;

build(context) => InitBuilder<int>(
build(context) => InitBuilder<Future<int>>(
getter: getNumber,
builder: (context, future) => AsyncBuilder<int>(
future: future,
Expand All @@ -120,4 +122,4 @@ build(context) => InitBuilder.arg<String, String>(
```

The alternate constructors `InitBuilder.arg` to `InitBuilder.arg7` can be used to pass arguments to the `getter`, these
will re-initialize the value if and only if either `getter` or the arguments change.
will re-initialize the value if and only if either `getter` or the arguments change.