refactor: runInRoot null safe

This commit is contained in:
Christian Pauly 2021-08-19 10:21:20 +02:00
parent 8621f82333
commit dd48a379ec
1 changed files with 1 additions and 2 deletions

View File

@ -1,4 +1,3 @@
// @dart=2.9
/*
* Famedly Matrix SDK
* Copyright (C) 2020, 2021 Famedly GmbH
@ -21,7 +20,7 @@ import 'dart:async';
import '../../matrix.dart';
Future<T> runInRoot<T>(FutureOr<T> Function() fn) async {
Future<T?> runInRoot<T>(FutureOr<T> Function() fn) async {
return await Zone.root.run(() async {
try {
return await fn();