lastOrNull method
Emits the stream's last value, or null if the stream closes empty.
Implementation
Future<T?> lastOrNull() async {
T? last;
await for (final value in this) {
last = value;
}
return last;
}
Emits the stream's last value, or null if the stream closes empty.
Future<T?> lastOrNull() async {
T? last;
await for (final value in this) {
last = value;
}
return last;
}