forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge the null safety branch into master (flutter#65)
* opt into null safety * allow Future?, add example * update versions * update SDK constraint for null safety * update sdk constraint Co-authored-by: David Morgan <davidmorgan@google.com> Co-authored-by: Kevin Moore <kevmoo@google.com>
- Loading branch information
1 parent
c69d70e
commit 643f247
Showing
5 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:pedantic/pedantic.dart'; | ||
|
||
void main() async { | ||
// Normally, calling a function that returns a Future from an async method | ||
// would require you to ignore the unawaited_futures lint with this analyzer | ||
// syntax: | ||
// | ||
// ignore: unawaited_futures | ||
doSomethingAsync(); | ||
|
||
// Wrapping it in a call to `unawaited` avoids that, since it doesn't | ||
// return a Future. This is more explicit, and harder to get wrong. | ||
unawaited(doSomethingAsync()); | ||
} | ||
|
||
Future<void> doSomethingAsync() async {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
name: pedantic | ||
version: 1.9.2 | ||
version: 1.10.0-nnbd | ||
description: >- | ||
The Dart analyzer settings and best practices used internally at Google. | ||
homepage: https://github.com/dart-lang/pedantic | ||
|
||
environment: | ||
sdk: '>=2.1.1 <3.0.0' | ||
|
||
dependencies: | ||
meta: ^1.2.2 | ||
sdk: '>=2.9.0-18.0 <2.9.0' |