Increase the strictness of our requiring explicit types (#7585)

...now that we have generic methods, their types need to be specified too.
This commit is contained in:
Ian Hickson
2017-01-23 01:04:31 -08:00
committed by GitHub
parent 99822088a7
commit 63aa1397a3
63 changed files with 134 additions and 127 deletions

View File

@@ -137,12 +137,12 @@ class CalculationManager {
// the root bundle (see https://github.com/flutter/flutter/issues/3294).
// However, the loading process is asynchronous, so the UI will not block
// while the file is loaded.
rootBundle.loadString('services/data.json').then((String data) {
rootBundle.loadString('services/data.json').then<Null>((String data) {
if (isRunning) {
CalculationMessage message = new CalculationMessage(data, _receivePort.sendPort);
final CalculationMessage message = new CalculationMessage(data, _receivePort.sendPort);
// Spawn an isolate to JSON-parse the file contents. The JSON parsing
// is synchronous, so if done in the main isolate, the UI would block.
Isolate.spawn(_calculate, message).then((Isolate isolate) {
Isolate.spawn(_calculate, message).then<Null>((Isolate isolate) {
if (!isRunning) {
isolate.kill(priority: Isolate.IMMEDIATE);
} else {