From ab1b3778ff13e03d2c0d8d2e77f69e454613dda8 Mon Sep 17 00:00:00 2001 From: shilangyu Date: Thu, 26 Aug 2021 00:26:17 +0200 Subject: [PATCH] Fix memo future signature --- lib/hooks/memo_future.dart | 13 +++++++++---- pubspec.lock | 14 ++++++++------ pubspec.yaml | 5 ++++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/lib/hooks/memo_future.dart b/lib/hooks/memo_future.dart index d547ce6..0485e2f 100644 --- a/lib/hooks/memo_future.dart +++ b/lib/hooks/memo_future.dart @@ -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 useMemoFuture(Future Function() valueBuilder, - [List keys = const []]) => - useFuture(useMemoized>(valueBuilder, keys), - preserveState: false, initialData: null); +AsyncSnapshot useMemoFuture( + Future Function() valueBuilder, [ + List keys = const [], +]) => + useFuture( + useMemoized>(valueBuilder, keys), + preserveState: false, + initialData: null, + ); diff --git a/pubspec.lock b/pubspec.lock index abadf45..885a970 100644 --- a/pubspec.lock +++ b/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: diff --git a/pubspec.yaml b/pubspec.yaml index ead31d4..aa537d5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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