Finish KeyToken operations

This commit is contained in:
2025-04-18 18:56:17 +02:00
parent 1f0f280286
commit 78c895547e
23 changed files with 1089 additions and 211 deletions

View File

@@ -2,6 +2,8 @@
// Unfortunately Future.value(x) in FutureBuilder always results in one frame were snapshot.connectionState is waiting
// This way we can set the ImmediateFuture.value directly and circumvent that.
import 'dart:async';
class ImmediateFuture<T> {
final Future<T> future;
final T? value;
@@ -20,6 +22,10 @@ class ImmediateFuture<T> {
: future = Future.value(v),
value = v;
ImmediateFuture.ofPending()
: future = Completer<T>().future,
value = null;
T? get() {
return value ?? _futureValue;
}