Skip to content

chore: upgrade dependencies #21

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 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions packages/remote_state/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
Expand All @@ -28,7 +28,7 @@ packages:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -73,14 +73,14 @@ packages:
name: freezed_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.0-nullsafety.0"
version: "0.14.3"
json_annotation:
dependency: transitive
description:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "4.3.0"
matcher:
dependency: transitive
description:
Expand All @@ -94,7 +94,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.7.0"
path:
dependency: transitive
description:
Expand All @@ -108,7 +108,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.5.0"
version: "2.0.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -120,7 +120,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -155,7 +155,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19"
version: "0.4.2"
typed_data:
dependency: transitive
description:
Expand All @@ -171,4 +171,4 @@ packages:
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
12 changes: 8 additions & 4 deletions packages/remote_state/lib/remote_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,23 @@ class RemoteState<T> with _$RemoteState<T> {

/// State-checking predicate. Returns true if we haven't asked for data yet.
/// Returns true only if [RemoteState] is [RemoteState.initial]
late bool isInitial = maybeWhen(initial: () => true, orElse: () => false);
late final bool isInitial =
maybeWhen(initial: () => true, orElse: () => false);

/// State-checking predicate. Returns true if we're loading.
/// Returns true only if [RemoteState] is [RemoteState.loading]
late bool isLoading = maybeWhen(loading: () => true, orElse: () => false);
late final bool isLoading =
maybeWhen(loading: () => true, orElse: () => false);

/// State-checking predicate. Returns true if we've successfully loaded some data.
/// Returns true only if [RemoteState] is [RemoteState.success]
late bool isSuccess = maybeWhen(success: (_) => true, orElse: () => false);
late final bool isSuccess =
maybeWhen(success: (_) => true, orElse: () => false);

/// State-checking predicate. Returns true if we've failed to load some data.
/// Returns true only if [RemoteState] is [RemoteState.error]
late bool isError = maybeWhen(error: (_, __) => true, orElse: () => false);
late final bool isError =
maybeWhen(error: (_, __) => true, orElse: () => false);

/// Convert a [Future] to RemoteState.
/// Emits [RemoteState.success] if the future completes
Expand Down
Loading