Add default values for optional parameters. (#27197)
diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index f0e9f87..4c2928c 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart
@@ -2595,7 +2595,7 @@ } @override - String toString({ DiagnosticLevel minLevel }) => toStringShort(); + String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) => toStringShort(); /// Returns a description of the tree rooted at this node. /// If the prefix argument is provided, then every line in the output @@ -2631,7 +2631,7 @@ /// [toStringDeep], but does not recurse to any children. @override String toStringShallow({ - String joiner = '; ', + String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug, }) { RenderObject debugPreviousActiveLayout;
diff --git a/packages/flutter/test/painting/decoration_test.dart b/packages/flutter/test/painting/decoration_test.dart index 86b87a5..7a7b0a3 100644 --- a/packages/flutter/test/painting/decoration_test.dart +++ b/packages/flutter/test/painting/decoration_test.dart
@@ -85,7 +85,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart index 40c89a4..bc3f30a 100644 --- a/packages/flutter/test/painting/image_stream_test.dart +++ b/packages/flutter/test/painting/image_stream_test.dart
@@ -40,7 +40,7 @@ void dispose() {} @override - Future<ByteData> toByteData({ImageByteFormat format}) async { + Future<ByteData> toByteData({ImageByteFormat format = ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/painting/paint_image_test.dart b/packages/flutter/test/painting/paint_image_test.dart index 0c9bf82..5451867 100644 --- a/packages/flutter/test/painting/paint_image_test.dart +++ b/packages/flutter/test/painting/paint_image_test.dart
@@ -23,7 +23,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/painting/shape_decoration_test.dart b/packages/flutter/test/painting/shape_decoration_test.dart index 3969963..13c0a5d 100644 --- a/packages/flutter/test/painting/shape_decoration_test.dart +++ b/packages/flutter/test/painting/shape_decoration_test.dart
@@ -125,7 +125,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/rendering/image_test.dart b/packages/flutter/test/rendering/image_test.dart index fef1f8d..c365c6e 100644 --- a/packages/flutter/test/rendering/image_test.dart +++ b/packages/flutter/test/rendering/image_test.dart
@@ -19,7 +19,7 @@ int get height => 10; @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } @@ -38,7 +38,7 @@ int get height => 10; @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } @@ -57,7 +57,7 @@ int get height => 20; @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); }
diff --git a/packages/flutter/test/rendering/recording_canvas.dart b/packages/flutter/test/rendering/recording_canvas.dart index d8cae83..da33a6d 100644 --- a/packages/flutter/test/rendering/recording_canvas.dart +++ b/packages/flutter/test/rendering/recording_canvas.dart
@@ -103,7 +103,7 @@ } @override - void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.antiAlias}) { + void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.hardEdge}) { clipRectAndPaint(clipRect.shift(offset), clipBehavior, clipRect.shift(offset), () => painter(this, offset)); }
diff --git a/packages/flutter/test/widgets/image_resolution_test.dart b/packages/flutter/test/widgets/image_resolution_test.dart index 040d573..123cf79 100644 --- a/packages/flutter/test/widgets/image_resolution_test.dart +++ b/packages/flutter/test/widgets/image_resolution_test.dart
@@ -26,7 +26,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/widgets/image_rtl_test.dart b/packages/flutter/test/widgets/image_rtl_test.dart index f613f40..511c742 100644 --- a/packages/flutter/test/widgets/image_rtl_test.dart +++ b/packages/flutter/test/widgets/image_rtl_test.dart
@@ -37,7 +37,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/widgets/image_test.dart b/packages/flutter/test/widgets/image_test.dart index 6f87234..6ffc035 100644 --- a/packages/flutter/test/widgets/image_test.dart +++ b/packages/flutter/test/widgets/image_test.dart
@@ -926,7 +926,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format}) async { + Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { throw UnsupportedError('Cannot encode test image'); }
diff --git a/packages/flutter/test/widgets/list_view_test.dart b/packages/flutter/test/widgets/list_view_test.dart index c6f0527..d6b5a18 100644 --- a/packages/flutter/test/widgets/list_view_test.dart +++ b/packages/flutter/test/widgets/list_view_test.dart
@@ -27,7 +27,7 @@ AliveState createState() => AliveState(); @override - String toString({DiagnosticLevel minLevel}) => '$index $alive'; + String toString({DiagnosticLevel minLevel = DiagnosticLevel.debug}) => '$index $alive'; } class AliveState extends State<Alive> with AutomaticKeepAliveClientMixin {
diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index 06bbb5a..4b8f91b 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart
@@ -720,7 +720,7 @@ @override Future<T> runAsync<T>(Future<T> callback(), { - Duration additionalTime = const Duration(milliseconds: 1000), + Duration additionalTime = const Duration(milliseconds: 250), }) { assert(additionalTime != null); assert(() {
diff --git a/packages/flutter_tools/lib/src/build_runner/build_kernel_compiler.dart b/packages/flutter_tools/lib/src/build_runner/build_kernel_compiler.dart index af9b8f7..d60bc8c 100644 --- a/packages/flutter_tools/lib/src/build_runner/build_kernel_compiler.dart +++ b/packages/flutter_tools/lib/src/build_runner/build_kernel_compiler.dart
@@ -33,7 +33,7 @@ List<String> fileSystemRoots, String fileSystemScheme, String depFilePath, - TargetModel targetModel, + TargetModel targetModel = TargetModel.flutter, }) async { if (fileSystemRoots != null || fileSystemScheme != null || depFilePath != null || targetModel != null || sdkRoot != null || packagesPath != null) { printTrace('fileSystemRoots, fileSystemScheme, depFilePath, targetModel,'
diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart index de597b3..b73f41f 100644 --- a/packages/flutter_tools/lib/src/commands/daemon.dart +++ b/packages/flutter_tools/lib/src/commands/daemon.dart
@@ -784,7 +784,7 @@ String message, { @required Duration timeout, String progressId, - bool multilineOutput, + bool multilineOutput = false, int progressIndicatorPadding = kDefaultStatusPadding, }) { assert(timeout != null); @@ -961,8 +961,8 @@ String message, { @required Duration timeout, String progressId, - bool multilineOutput, - int progressIndicatorPadding = 52, + bool multilineOutput = false, + int progressIndicatorPadding = kDefaultStatusPadding, }) { assert(timeout != null); final int id = _nextProgressId++;
diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart index 84bc1ba..7ed0462 100644 --- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart +++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
@@ -185,7 +185,7 @@ Map<String, dynamic> platformArgs, bool prebuiltApplication = false, bool applicationNeedsRebuild = false, - bool usesTerminalUi = false, + bool usesTerminalUi = true, bool ipv6 = false, }) => Future<void>.error('unimplemented');
diff --git a/packages/flutter_tools/test/base/build_test.dart b/packages/flutter_tools/test/base/build_test.dart index f2f79fc..ca110fa 100644 --- a/packages/flutter_tools/test/base/build_test.dart +++ b/packages/flutter_tools/test/base/build_test.dart
@@ -55,7 +55,7 @@ String packagesPath, String depfilePath, IOSArch iosArch, - Iterable<String> additionalArgs, + Iterable<String> additionalArgs = const <String>[], }) async { _callCount += 1; _snapshotType = snapshotType;
diff --git a/packages/flutter_tools/test/crash_reporting_test.dart b/packages/flutter_tools/test/crash_reporting_test.dart index 7152ba5..f3255c6 100644 --- a/packages/flutter_tools/test/crash_reporting_test.dart +++ b/packages/flutter_tools/test/crash_reporting_test.dart
@@ -216,10 +216,10 @@ void write(_) {} @override - void writeAll(_, [__]) {} + void writeAll(_, [__ = '']) {} @override - void writeln([_]) {} + void writeln([_ = '']) {} @override void writeCharCode(_) {}
diff --git a/packages/flutter_tools/test/emulator_test.dart b/packages/flutter_tools/test/emulator_test.dart index 59b276d..7a7c5b4 100644 --- a/packages/flutter_tools/test/emulator_test.dart +++ b/packages/flutter_tools/test/emulator_test.dart
@@ -203,8 +203,8 @@ Map<String, String> environment, bool includeParentEnvironment = true, bool runInShell = false, - Encoding stdoutEncoding, - Encoding stderrEncoding + Encoding stdoutEncoding = systemEncoding, + Encoding stderrEncoding = systemEncoding }) { final String program = command[0]; final List<String> args = command.sublist(1);