Fix memo future signature
This commit is contained in:
parent
813fdb11ea
commit
ab1b3778ff
|
@ -3,7 +3,12 @@ import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
|
|
||||||
/// creates an [AsyncSnapshot] from the Future returned from the valueBuilder.
|
/// creates an [AsyncSnapshot] from the Future returned from the valueBuilder.
|
||||||
/// [keys] can be used to rebuild the Future
|
/// [keys] can be used to rebuild the Future
|
||||||
AsyncSnapshot<T?> useMemoFuture<T>(Future<T> Function() valueBuilder,
|
AsyncSnapshot<T?> useMemoFuture<T>(
|
||||||
[List<Object> keys = const <Object>[]]) =>
|
Future<T> Function() valueBuilder, [
|
||||||
useFuture(useMemoized<Future<T>>(valueBuilder, keys),
|
List<Object?> keys = const <Object>[],
|
||||||
preserveState: false, initialData: null);
|
]) =>
|
||||||
|
useFuture(
|
||||||
|
useMemoized<Future<T>>(valueBuilder, keys),
|
||||||
|
preserveState: false,
|
||||||
|
initialData: null,
|
||||||
|
);
|
||||||
|
|
14
pubspec.lock
14
pubspec.lock
|
@ -35,7 +35,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.0"
|
version: "2.6.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -409,9 +409,11 @@ packages:
|
||||||
lemmy_api_client:
|
lemmy_api_client:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: lemmy_api_client
|
path: "."
|
||||||
url: "https://pub.dartlang.org"
|
ref: "lemmy-0.12"
|
||||||
source: hosted
|
resolved-ref: "2e48f6559abb5546dbc4696d39ca2ef50952547c"
|
||||||
|
url: "https://github.com/krawieck/lemmy_api_client"
|
||||||
|
source: git
|
||||||
version: "0.15.0"
|
version: "0.15.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
|
@ -690,7 +692,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
sqflite:
|
sqflite:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -753,7 +755,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.19"
|
version: "0.3.0"
|
||||||
timeago:
|
timeago:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -43,7 +43,10 @@ dependencies:
|
||||||
# utils
|
# utils
|
||||||
timeago: ^3.0.2
|
timeago: ^3.0.2
|
||||||
fuzzy: ^0.4.0-nullsafety.0
|
fuzzy: ^0.4.0-nullsafety.0
|
||||||
lemmy_api_client: ^0.15.0
|
lemmy_api_client:
|
||||||
|
git:
|
||||||
|
url: https://github.com/krawieck/lemmy_api_client
|
||||||
|
ref: lemmy-0.12
|
||||||
intl: ^0.17.0
|
intl: ^0.17.0
|
||||||
matrix4_transform: ^2.0.0
|
matrix4_transform: ^2.0.0
|
||||||
json_annotation: ^4.0.1
|
json_annotation: ^4.0.1
|
||||||
|
|
Loading…
Reference in New Issue