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.
|
||||
/// [keys] can be used to rebuild the Future
|
||||
AsyncSnapshot<T?> useMemoFuture<T>(Future<T> Function() valueBuilder,
|
||||
[List<Object> keys = const <Object>[]]) =>
|
||||
useFuture(useMemoized<Future<T>>(valueBuilder, keys),
|
||||
preserveState: false, initialData: null);
|
||||
AsyncSnapshot<T?> useMemoFuture<T>(
|
||||
Future<T> Function() valueBuilder, [
|
||||
List<Object?> keys = const <Object>[],
|
||||
]) =>
|
||||
useFuture(
|
||||
useMemoized<Future<T>>(valueBuilder, keys),
|
||||
preserveState: false,
|
||||
initialData: null,
|
||||
);
|
||||
|
|
14
pubspec.lock
14
pubspec.lock
|
@ -35,7 +35,7 @@ packages:
|
|||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.5.0"
|
||||
version: "2.6.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -409,9 +409,11 @@ packages:
|
|||
lemmy_api_client:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: lemmy_api_client
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
path: "."
|
||||
ref: "lemmy-0.12"
|
||||
resolved-ref: "2e48f6559abb5546dbc4696d39ca2ef50952547c"
|
||||
url: "https://github.com/krawieck/lemmy_api_client"
|
||||
source: git
|
||||
version: "0.15.0"
|
||||
logging:
|
||||
dependency: transitive
|
||||
|
@ -690,7 +692,7 @@ packages:
|
|||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
version: "1.8.1"
|
||||
sqflite:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -753,7 +755,7 @@ packages:
|
|||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.19"
|
||||
version: "0.3.0"
|
||||
timeago:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -43,7 +43,10 @@ dependencies:
|
|||
# utils
|
||||
timeago: ^3.0.2
|
||||
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
|
||||
matrix4_transform: ^2.0.0
|
||||
json_annotation: ^4.0.1
|
||||
|
|
Loading…
Reference in New Issue