-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] enable always_specify_types lint #27406
Conversation
| // request instead. | ||
| runZonedGuarded(() async { | ||
| var process = await startBrowser(); | ||
| Process process = await startBrowser(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is unrelated to your PR, but could this become final?
| Process process = await startBrowser(); | |
| final Process process = await startBrowser(); |
| // For example this happens with Chrome Headless. | ||
| // See SDK issue: https://github.com/dart-lang/sdk/issues/31264 | ||
| for (var stream in _ioSubscriptions) { | ||
| for (StreamSubscription<void> stream in _ioSubscriptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| for (StreamSubscription<void> stream in _ioSubscriptions) { | |
| for (final StreamSubscription<void> stream in _ioSubscriptions) { |
| if (!_closed && exitCode != 0) { | ||
| var outputString = utf8.decode(output); | ||
| var message = '$name failed with exit code $exitCode.'; | ||
| String outputString = utf8.decode(output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| String outputString = utf8.decode(output); | |
| final String outputString = utf8.decode(output); |
| factory Chrome(Uri url, {bool debug = false}) { | ||
| String version = ChromeArgParser.instance.version; | ||
| var remoteDebuggerCompleter = Completer<Uri>.sync(); | ||
| Completer<Uri> remoteDebuggerCompleter = Completer<Uri>.sync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Completer<Uri> remoteDebuggerCompleter = Completer<Uri>.sync(); | |
| final Completer<Uri> remoteDebuggerCompleter = Completer<Uri>.sync(); |
| Platform.environment['CHROME_NO_SANDBOX'] == 'true'; | ||
| final String dir = environment.webUiDartToolDir.createTempSync('test_chrome_user_data_').resolveSymbolicLinksSync(); | ||
| var args = [ | ||
| List<String> args = <String>[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| List<String> args = <String>[ | |
| final List<String> args = <String>[ |
| for (StrokeCap cap in strokeCaps) { | ||
| var joints = [StrokeJoin.miter, StrokeJoin.bevel, StrokeJoin.round]; | ||
| var colors = [Color(0xFFF44336), Color(0xFF4CAF50), Color(0xFF2196F3)]; // red, green, blue | ||
| List<StrokeJoin> joints = <StrokeJoin>[StrokeJoin.miter, StrokeJoin.bevel, StrokeJoin.round]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| List<StrokeJoin> joints = <StrokeJoin>[StrokeJoin.miter, StrokeJoin.bevel, StrokeJoin.round]; | |
| final List<StrokeJoin> joints = <StrokeJoin>[StrokeJoin.miter, StrokeJoin.bevel, StrokeJoin.round]; |
| var joints = [StrokeJoin.miter, StrokeJoin.bevel, StrokeJoin.round]; | ||
| var colors = [Color(0xFFF44336), Color(0xFF4CAF50), Color(0xFF2196F3)]; // red, green, blue | ||
| List<StrokeJoin> joints = <StrokeJoin>[StrokeJoin.miter, StrokeJoin.bevel, StrokeJoin.round]; | ||
| List<Color> colors = <Color>[Color(0xFFF44336), Color(0xFF4CAF50), Color(0xFF2196F3)]; // red, green, blue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| List<Color> colors = <Color>[Color(0xFFF44336), Color(0xFF4CAF50), Color(0xFF2196F3)]; // red, green, blue | |
| final List<Color> colors = <Color>[Color(0xFFF44336), Color(0xFF4CAF50), Color(0xFF2196F3)]; // red, green, blue |
| StrokeJoin join = joints[i]; | ||
| Color color = colors[i % colors.length]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| StrokeJoin join = joints[i]; | |
| Color color = colors[i % colors.length]; | |
| final StrokeJoin join = joints[i]; | |
| final Color color = colors[i % colors.length]; |
| html.ImageElement imageElement = html.ImageElement(); | ||
| Completer<HtmlImage> completer = Completer(); | ||
| imageElement.onLoad.listen((event) { | ||
| Completer<HtmlImage> completer = Completer<HtmlImage>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Completer<HtmlImage> completer = Completer<HtmlImage>(); | |
| final Completer<HtmlImage> completer = Completer<HtmlImage>(); |
| }); | ||
| bool preventedDefault = false; | ||
| final onPreventDefault = () { preventedDefault = true; }; | ||
| final Null Function() onPreventDefault = () { preventedDefault = true; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why you didn't use VoidCallback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
I will address |
* a7b5522 refactor and simplify CI dart analysis (flutter/engine#27370) * 137009b Switch test_suites to yaml. (flutter/engine#27368) * a22a3ca [web] fix a few analysis lints (flutter/engine#27375) * a02c017 make it work on <API 24 (flutter/engine#27398) * 0220256 Make FlutterFragment usable without requiring it to be attached to an Android Activity. (Attempt 2) (flutter/engine#27397) * 51e07a5 [fuchsia] Use FFI to get System clockMonotonic (flutter/engine#27353) * 4015d8b Roll Skia from 224e3e257d06 to 773a0b8c7e74 (44 revisions) (flutter/engine#27399) * 7db1a96 [ci.yaml] Add Linux Android Scenarios postsubmit (flutter/engine#27400) * a02f6bc remove the use of package:isolate (flutter/engine#27401) * 3237f4f Roll Skia from 773a0b8c7e74 to 36c1804e8f5c (1 revision) (flutter/engine#27402) * 75af7c8 Roll Dart SDK from ab009483f343 to 746879714c96 (5 revisions) (flutter/engine#27403) * be21e40 [ci.yaml] Add linux benchmarks, add enabled branches (flutter/engine#27405) * c8d7a97 Roll Fuchsia Mac SDK from wUg-tGGCL... to uhahzGJ6H... (flutter/engine#27408) * 3649200 Roll Skia from 36c1804e8f5c to 947a2eb3c043 (7 revisions) (flutter/engine#27410) * f04d941 [web] enable always_specify_types lint (flutter/engine#27406) * bdaaa4f [fuchsia] fix race in DefaultSessionConnection (flutter/engine#27377) * 84247f2 Update the Fuchsia runner to use fpromise instead of fit::promise (flutter/engine#27416) * 39119d2 Roll Skia from 947a2eb3c043 to 9081276b2907 (6 revisions) (flutter/engine#27426) * 9002bc7 Roll Skia from 9081276b2907 to 0547b914f691 (2 revisions) (flutter/engine#27430) * 58e0688 Roll Fuchsia Linux SDK from hykYtaK7D... to s2vrjrfuS... (flutter/engine#27431) * 1dca887 Roll Dart SDK from 746879714c96 to d53eb1066384 (2 revisions) (flutter/engine#27432) * c9008f3 Use python to run firebase testlab, do not expect recipe to know location of APK (flutter/engine#27434) * 8f7c529 Roll Skia from 0547b914f691 to 7d336c9557bd (3 revisions) (flutter/engine#27436) * 534404e Roll Fuchsia Mac SDK from uhahzGJ6H... to TWPguQ-ow... (flutter/engine#27438) * 9f13308 Roll Dart SDK from d53eb1066384 to fcbaa0a90b4b (1 revision) (flutter/engine#27439) * e5e7b94 Roll Skia from 7d336c9557bd to 7dc26fadc90b (2 revisions) (flutter/engine#27440) * bf3d265 Roll Skia from 7dc26fadc90b to dd561d021470 (1 revision) (flutter/engine#27442) * 6e62915 [ci.yaml] Add xcode property to ci.yaml (flutter/engine#27415) * 33c17a1 Roll Skia from dd561d021470 to 0e99fbe5da5c (1 revision) (flutter/engine#27443) * 0bc2479 Adjust web_sdk rule deps (flutter/engine#27435) * 7a8969a [web] enable prefer_final_locals lint (flutter/engine#27420) * 590902b Roll Dart SDK from fcbaa0a90b4b to 207232b5abe0 (1 revision) (flutter/engine#27446) * 283a42f fuchsia: Log vsync stats in inspect (flutter/engine#27433) * 4af14b9 Deeplink URI fragment on Android and iOS (flutter/engine#26185) * 47899db Remove unused generate_dart_ui target (flutter/engine#27445) * fb265c2 Roll Skia from 0e99fbe5da5c to a2d22b2e085e (3 revisions) (flutter/engine#27447) * 8bb5760 [ci.yaml] Mark Linux Android Scenarios as flaky (flutter/engine#27422)
Specify types everywhere and enable the lint.