add missing type parameter on methods (#22096)
This commit is contained in:
committed by
GitHub
parent
48fb726b01
commit
f62afdcf57
@@ -141,7 +141,7 @@ class CalculationManager {
|
||||
final CalculationMessage message = 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<Null>((Isolate isolate) {
|
||||
Isolate.spawn<CalculationMessage>(_calculate, message).then<Null>((Isolate isolate) {
|
||||
if (!isRunning) {
|
||||
isolate.kill(priority: Isolate.immediate);
|
||||
} else {
|
||||
|
||||
@@ -74,12 +74,12 @@ class AdaptiveContainer extends StatelessWidget {
|
||||
if (MediaQuery.of(context).size.width < _kGridViewBreakpoint) {
|
||||
return ListView(
|
||||
itemExtent: _kListItemExtent,
|
||||
children: names.map((String name) => AdaptedListItem(name: name)).toList(),
|
||||
children: names.map<Widget>((String name) => AdaptedListItem(name: name)).toList(),
|
||||
);
|
||||
} else {
|
||||
return GridView.extent(
|
||||
maxCrossAxisExtent: _kMaxTileWidth,
|
||||
children: names.map((String name) => AdaptedGridItem(name: name)).toList(),
|
||||
children: names.map<Widget>((String name) => AdaptedGridItem(name: name)).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class SectorAppState extends State<SectorApp> {
|
||||
|
||||
List<double> wantedSectorSizes = <double>[];
|
||||
List<double> actualSectorSizes = <double>[];
|
||||
double get currentTheta => wantedSectorSizes.fold(0.0, (double total, double value) => total + value);
|
||||
double get currentTheta => wantedSectorSizes.fold<double>(0.0, (double total, double value) => total + value);
|
||||
|
||||
void addSector() {
|
||||
final double currentTheta = this.currentTheta;
|
||||
|
||||
@@ -20,7 +20,7 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
|
||||
// [["Dave", "Open the pod bay..."] ...]
|
||||
final List<List<String>> _kNameLines = _kDialogText
|
||||
.split('\n')
|
||||
.map((String line) => line.split(':'))
|
||||
.map<List<String>>((String line) => line.split(':'))
|
||||
.toList();
|
||||
|
||||
final TextStyle _kDaveStyle = TextStyle(color: Colors.indigo.shade400, height: 1.8);
|
||||
|
||||
Reference in New Issue
Block a user