Unverified Commit e30f9a94 authored by Devon Carew's avatar Devon Carew Committed by GitHub

add explicit const keywords (#23652)

parent ec5719a1
...@@ -32,7 +32,7 @@ void main() { ...@@ -32,7 +32,7 @@ void main() {
section('Verify all the debug isolate names are set'); section('Verify all the debug isolate names are set');
runProcess.stdin.write('l'); runProcess.stdin.write('l');
await Future.wait<dynamic>(<Future<dynamic>>[firstNameFound.future, secondNameFound.future]) await Future.wait<dynamic>(<Future<dynamic>>[firstNameFound.future, secondNameFound.future])
.timeout(Duration(seconds: 1), onTimeout: () => throw 'Isolate names not found.'); .timeout(const Duration(seconds: 1), onTimeout: () => throw 'Isolate names not found.');
await _quitRunner(runProcess); await _quitRunner(runProcess);
section('Attach to the second debug isolate'); section('Attach to the second debug isolate');
......
...@@ -21,7 +21,7 @@ class CupertinoPickerDemo extends StatefulWidget { ...@@ -21,7 +21,7 @@ class CupertinoPickerDemo extends StatefulWidget {
class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> { class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> {
int _selectedColorIndex = 0; int _selectedColorIndex = 0;
Duration timer = Duration(); Duration timer = const Duration();
// Value that is shown in the date picker in date mode. // Value that is shown in the date picker in date mode.
DateTime date = DateTime.now(); DateTime date = DateTime.now();
...@@ -276,4 +276,4 @@ class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> { ...@@ -276,4 +276,4 @@ class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> {
), ),
); );
} }
} }
\ No newline at end of file
...@@ -340,7 +340,7 @@ void main() { ...@@ -340,7 +340,7 @@ void main() {
await gesture.up(); await gesture.up();
} }
await longPress(kLongPressTimeout + Duration(seconds: 1)); // To make sure the time for long press has occured await longPress(kLongPressTimeout + const Duration(seconds: 1)); // To make sure the time for long press has occurred
expect(longPressUp, 1); expect(longPressUp, 1);
}); });
} }
...@@ -71,7 +71,7 @@ void main() { ...@@ -71,7 +71,7 @@ void main() {
file.parent.createSync(recursive: true); file.parent.createSync(recursive: true);
file.writeAsBytesSync(<int>[1, 2, 3]); file.writeAsBytesSync(<int>[1, 2, 3]);
final DateTime fiveSecondsAgo = DateTime.now().subtract(Duration(seconds:5)); final DateTime fiveSecondsAgo = DateTime.now().subtract(const Duration(seconds:5));
expect(content.isModifiedAfter(fiveSecondsAgo), isTrue); expect(content.isModifiedAfter(fiveSecondsAgo), isTrue);
expect(content.isModifiedAfter(fiveSecondsAgo), isTrue); expect(content.isModifiedAfter(fiveSecondsAgo), isTrue);
expect(content.isModifiedAfter(null), isTrue); expect(content.isModifiedAfter(null), isTrue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment