Skip to content

Commit

Permalink
Add some ignores for nullable vlues into non-nullable Futures. (flutt…
Browse files Browse the repository at this point in the history
  • Loading branch information
srawlins authored and derekxu16 committed Dec 14, 2023
1 parent 9950214 commit c43e600
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Future<T> allowedError<T>(Future<T> future, {bool logError = true}) {
_log.shout('[${error.runtimeType}] ${errorLines.first}');
_log.shout(errorLines.skip(1).join('\n'));
}
// TODO(srawlins): This is an illegal return value (`null`) for all `T`.
// This function must return an actual `T`.
// ignore: null_argument_to_non_null_type
return Future<T>.value();
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Future<T> allowedError<T>(Future<T> future, {bool logError = true}) {
console.log(errorLines.skip(1).join('\n').toJS);
console.groupEnd();
}
// TODO(srawlins): This is an illegal return value (`null`) for all `T`.
// This function must return an actual `T`.
// ignore: null_argument_to_non_null_type
return Future<T>.value();
});
}

0 comments on commit c43e600

Please sign in to comment.