From a5b3139126e613f02c8fada8f1e43b1478ba6e6e Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Mon, 15 Jan 2018 22:05:59 +0100 Subject: [PATCH] Use void as type argument instead of Null where appropriate --- examples/stocks/lib/stock_settings.dart | 2 +- packages/flutter/lib/src/gestures/long_press.dart | 2 +- packages/flutter/lib/src/gestures/monodrag.dart | 14 +++++++------- packages/flutter/lib/src/gestures/multitap.dart | 12 ++++++------ packages/flutter/lib/src/gestures/scale.dart | 8 ++++---- packages/flutter/lib/src/gestures/tap.dart | 10 +++++----- packages/flutter/lib/src/material/dropdown.dart | 2 +- .../flutter/lib/src/material/expansion_tile.dart | 2 +- packages/flutter/lib/src/material/popup_menu.dart | 2 +- .../lib/src/material/refresh_indicator.dart | 4 ++-- packages/flutter/lib/src/material/scaffold.dart | 4 ++-- .../flutter/lib/src/painting/image_provider.dart | 2 +- .../flutter/lib/src/painting/image_resolution.dart | 2 +- .../flutter/lib/src/painting/image_stream.dart | 4 ++-- .../flutter/lib/src/services/asset_bundle.dart | 2 +- .../flutter/lib/src/widgets/animated_list.dart | 4 ++-- packages/flutter/lib/src/widgets/async.dart | 2 +- .../flutter/test/foundation/capture_output.dart | 2 +- .../test/widgets/image_resolution_test.dart | 4 ++-- 19 files changed, 42 insertions(+), 42 deletions(-) diff --git a/examples/stocks/lib/stock_settings.dart b/examples/stocks/lib/stock_settings.dart index a3ccbb82a6..a6f598c516 100644 --- a/examples/stocks/lib/stock_settings.dart +++ b/examples/stocks/lib/stock_settings.dart @@ -85,7 +85,7 @@ class StockSettingsState extends State { ), ] ) - ).then(_handleOptimismChanged); + ).then(_handleOptimismChanged); break; } } diff --git a/packages/flutter/lib/src/gestures/long_press.dart b/packages/flutter/lib/src/gestures/long_press.dart index e0d77c2434..b0ad86f40b 100644 --- a/packages/flutter/lib/src/gestures/long_press.dart +++ b/packages/flutter/lib/src/gestures/long_press.dart @@ -26,7 +26,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer { void didExceedDeadline() { resolve(GestureDisposition.accepted); if (onLongPress != null) - invokeCallback('onLongPress', onLongPress); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onLongPress', onLongPress); } @override diff --git a/packages/flutter/lib/src/gestures/monodrag.dart b/packages/flutter/lib/src/gestures/monodrag.dart index f4efcc90bc..f73d9332cf 100644 --- a/packages/flutter/lib/src/gestures/monodrag.dart +++ b/packages/flutter/lib/src/gestures/monodrag.dart @@ -120,7 +120,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { _pendingDragOffset = Offset.zero; _lastPendingEventTimestamp = event.timeStamp; if (onDown != null) - invokeCallback('onDown', () => onDown(new DragDownDetails(globalPosition: _initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onDown', () => onDown(new DragDownDetails(globalPosition: _initialPosition))); } else if (_state == _DragState.accepted) { resolve(GestureDisposition.accepted); } @@ -140,7 +140,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { final Offset delta = event.delta; if (_state == _DragState.accepted) { if (onUpdate != null) { - invokeCallback('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onUpdate', () => onUpdate(new DragUpdateDetails( sourceTimeStamp: event.timeStamp, delta: _getDeltaForDetails(delta), primaryDelta: _getPrimaryValueFromOffset(delta), @@ -166,13 +166,13 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { _pendingDragOffset = Offset.zero; _lastPendingEventTimestamp = null; if (onStart != null) { - invokeCallback('onStart', () => onStart(new DragStartDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onStart', () => onStart(new DragStartDetails( sourceTimeStamp: timestamp, globalPosition: _initialPosition, ))); } if (delta != Offset.zero && onUpdate != null) { - invokeCallback('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onUpdate', () => onUpdate(new DragUpdateDetails( sourceTimeStamp: timestamp, delta: _getDeltaForDetails(delta), primaryDelta: _getPrimaryValueFromOffset(delta), @@ -193,7 +193,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { resolve(GestureDisposition.rejected); _state = _DragState.ready; if (onCancel != null) - invokeCallback('onCancel', onCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onCancel', onCancel); return; } final bool wasAccepted = (_state == _DragState.accepted); @@ -206,14 +206,14 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { if (estimate != null && _isFlingGesture(estimate)) { final Velocity velocity = new Velocity(pixelsPerSecond: estimate.pixelsPerSecond) .clampMagnitude(minFlingVelocity ?? kMinFlingVelocity, maxFlingVelocity ?? kMaxFlingVelocity); - invokeCallback('onEnd', () => onEnd(new DragEndDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new DragEndDetails( velocity: velocity, primaryVelocity: _getPrimaryValueFromOffset(velocity.pixelsPerSecond), )), debugReport: () { return '$estimate; fling at $velocity.'; }); } else { - invokeCallback('onEnd', () => onEnd(new DragEndDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new DragEndDetails( velocity: Velocity.zero, primaryVelocity: 0.0, )), debugReport: () { diff --git a/packages/flutter/lib/src/gestures/multitap.dart b/packages/flutter/lib/src/gestures/multitap.dart index a40129e73f..dbf120a437 100644 --- a/packages/flutter/lib/src/gestures/multitap.dart +++ b/packages/flutter/lib/src/gestures/multitap.dart @@ -194,7 +194,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer { _freezeTracker(tracker); _trackers.remove(tracker.pointer); if (onDoubleTap != null) - invokeCallback('onDoubleTap', onDoubleTap); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onDoubleTap', onDoubleTap); _reset(); } @@ -353,7 +353,7 @@ class MultiTapGestureRecognizer extends GestureRecognizer { longTapDelay: longTapDelay ); if (onTapDown != null) - invokeCallback('onTapDown', () => onTapDown(event.pointer, new TapDownDetails(globalPosition: event.position))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapDown', () => onTapDown(event.pointer, new TapDownDetails(globalPosition: event.position))); } @override @@ -373,22 +373,22 @@ class MultiTapGestureRecognizer extends GestureRecognizer { assert(_gestureMap.containsKey(pointer)); _gestureMap.remove(pointer); if (onTapCancel != null) - invokeCallback('onTapCancel', () => onTapCancel(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapCancel', () => onTapCancel(pointer)); } void _dispatchTap(int pointer, Offset globalPosition) { assert(_gestureMap.containsKey(pointer)); _gestureMap.remove(pointer); if (onTapUp != null) - invokeCallback('onTapUp', () => onTapUp(pointer, new TapUpDetails(globalPosition: globalPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapUp', () => onTapUp(pointer, new TapUpDetails(globalPosition: globalPosition))); if (onTap != null) - invokeCallback('onTap', () => onTap(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTap', () => onTap(pointer)); } void _dispatchLongTap(int pointer, Offset lastPosition) { assert(_gestureMap.containsKey(pointer)); if (onLongTapDown != null) - invokeCallback('onLongTapDown', () => onLongTapDown(pointer, new TapDownDetails(globalPosition: lastPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onLongTapDown', () => onLongTapDown(pointer, new TapDownDetails(globalPosition: lastPosition))); } @override diff --git a/packages/flutter/lib/src/gestures/scale.dart b/packages/flutter/lib/src/gestures/scale.dart index c6b5d9182d..27fc50147c 100644 --- a/packages/flutter/lib/src/gestures/scale.dart +++ b/packages/flutter/lib/src/gestures/scale.dart @@ -200,9 +200,9 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer { final Offset pixelsPerSecond = velocity.pixelsPerSecond; if (pixelsPerSecond.distanceSquared > kMaxFlingVelocity * kMaxFlingVelocity) velocity = new Velocity(pixelsPerSecond: (pixelsPerSecond / pixelsPerSecond.distance) * kMaxFlingVelocity); - invokeCallback('onEnd', () => onEnd(new ScaleEndDetails(velocity: velocity))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new ScaleEndDetails(velocity: velocity))); } else { - invokeCallback('onEnd', () => onEnd(new ScaleEndDetails(velocity: Velocity.zero))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new ScaleEndDetails(velocity: Velocity.zero))); } } _state = _ScaleState.accepted; @@ -230,13 +230,13 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer { } if (_state == _ScaleState.started && onUpdate != null) - invokeCallback('onUpdate', () => onUpdate(new ScaleUpdateDetails(scale: _scaleFactor, focalPoint: _currentFocalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onUpdate', () => onUpdate(new ScaleUpdateDetails(scale: _scaleFactor, focalPoint: _currentFocalPoint))); } void _dispatchOnStartCallbackIfNeeded() { assert(_state == _ScaleState.started); if (onStart != null) - invokeCallback('onStart', () => onStart(new ScaleStartDetails(focalPoint: _currentFocalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onStart', () => onStart(new ScaleStartDetails(focalPoint: _currentFocalPoint))); } @override diff --git a/packages/flutter/lib/src/gestures/tap.dart b/packages/flutter/lib/src/gestures/tap.dart index 5cb0afad9b..b2c748bdc3 100644 --- a/packages/flutter/lib/src/gestures/tap.dart +++ b/packages/flutter/lib/src/gestures/tap.dart @@ -103,7 +103,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { // This can happen if the superclass decides the primary pointer // exceeded the touch slop, or if the recognizer is disposed. if (onTapCancel != null) - invokeCallback('spontaneous onTapCancel', onTapCancel); + invokeCallback('spontaneous onTapCancel', onTapCancel); _reset(); } super.resolve(disposition); @@ -131,7 +131,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { // Another gesture won the arena. assert(state != GestureRecognizerState.possible); if (onTapCancel != null) - invokeCallback('forced onTapCancel', onTapCancel); + invokeCallback('forced onTapCancel', onTapCancel); _reset(); } } @@ -139,7 +139,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { void _checkDown() { if (!_sentTapDown) { if (onTapDown != null) - invokeCallback('onTapDown', () { onTapDown(new TapDownDetails(globalPosition: initialPosition)); }); + invokeCallback('onTapDown', () { onTapDown(new TapDownDetails(globalPosition: initialPosition)); }); _sentTapDown = true; } } @@ -156,9 +156,9 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { return; } if (onTapUp != null) - invokeCallback('onTapUp', () { onTapUp(new TapUpDetails(globalPosition: _finalPosition)); }); + invokeCallback('onTapUp', () { onTapUp(new TapUpDetails(globalPosition: _finalPosition)); }); if (onTap != null) - invokeCallback('onTap', onTap); + invokeCallback('onTap', onTap); _reset(); } } diff --git a/packages/flutter/lib/src/material/dropdown.dart b/packages/flutter/lib/src/material/dropdown.dart index 33f07b0bed..35077889f6 100644 --- a/packages/flutter/lib/src/material/dropdown.dart +++ b/packages/flutter/lib/src/material/dropdown.dart @@ -578,7 +578,7 @@ class _DropdownButtonState extends State> with WidgetsBindi barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, ); - Navigator.push(context, _dropdownRoute).then((_DropdownRouteResult newValue) { + Navigator.push(context, _dropdownRoute).then((_DropdownRouteResult newValue) { _dropdownRoute = null; if (!mounted || newValue == null) return null; diff --git a/packages/flutter/lib/src/material/expansion_tile.dart b/packages/flutter/lib/src/material/expansion_tile.dart index a9fdb4217a..eb44dbfb1c 100644 --- a/packages/flutter/lib/src/material/expansion_tile.dart +++ b/packages/flutter/lib/src/material/expansion_tile.dart @@ -120,7 +120,7 @@ class _ExpansionTileState extends State with SingleTickerProvider if (_isExpanded) _controller.forward(); else - _controller.reverse().then((Null value) { + _controller.reverse().then((Null value) { setState(() { // Rebuild without widget.children. }); diff --git a/packages/flutter/lib/src/material/popup_menu.dart b/packages/flutter/lib/src/material/popup_menu.dart index 09045745f9..442a22695d 100644 --- a/packages/flutter/lib/src/material/popup_menu.dart +++ b/packages/flutter/lib/src/material/popup_menu.dart @@ -813,7 +813,7 @@ class _PopupMenuButtonState extends State> { initialValue: widget.initialValue, position: position, ) - .then((T newValue) { + .then((T newValue) { if (!mounted || newValue == null) return null; if (widget.onSelected != null) diff --git a/packages/flutter/lib/src/material/refresh_indicator.dart b/packages/flutter/lib/src/material/refresh_indicator.dart index e83accd87e..391c46fb9f 100644 --- a/packages/flutter/lib/src/material/refresh_indicator.dart +++ b/packages/flutter/lib/src/material/refresh_indicator.dart @@ -119,7 +119,7 @@ class RefreshIndicator extends StatefulWidget { /// The progress indicator's background color. The current theme's /// [ThemeData.canvasColor] by default. final Color backgroundColor; - + /// A check that specifies whether a [ScrollNotification] should be /// handled by this widget. /// @@ -322,7 +322,7 @@ class RefreshIndicatorState extends State with TickerProviderS _mode = _RefreshIndicatorMode.snap; _positionController .animateTo(1.0 / _kDragSizeFactorLimit, duration: _kIndicatorSnapDuration) - .then((Null value) { + .then((Null value) { if (mounted && _mode == _RefreshIndicatorMode.snap) { assert(widget.onRefresh != null); setState(() { diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index dffbbbe067..7c1e04163f 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -369,7 +369,7 @@ class Scaffold extends StatefulWidget { /// A panel displayed to the side of the [body], often hidden on mobile /// devices. Swipes in from either left-to-right ([TextDirection.ltr]) or /// right-to-left ([TextDirection.rtl]) - /// + /// /// In the uncommon case that you wish to open the drawer manually, use the /// [ScaffoldState.openDrawer] function. /// @@ -678,7 +678,7 @@ class ScaffoldState extends State with TickerProviderStateMixin { if (_snackBars.isEmpty || _snackBarController.status == AnimationStatus.dismissed) return; final Completer completer = _snackBars.first._completer; - _snackBarController.reverse().then((Null _) { + _snackBarController.reverse().then((Null _) { assert(mounted); if (!completer.isCompleted) completer.complete(reason); diff --git a/packages/flutter/lib/src/painting/image_provider.dart b/packages/flutter/lib/src/painting/image_provider.dart index 92a00d0931..47b41ea26b 100644 --- a/packages/flutter/lib/src/painting/image_provider.dart +++ b/packages/flutter/lib/src/painting/image_provider.dart @@ -261,7 +261,7 @@ abstract class ImageProvider { assert(configuration != null); final ImageStream stream = new ImageStream(); T obtainedKey; - obtainKey(configuration).then((T key) { + obtainKey(configuration).then((T key) { obtainedKey = key; stream.setCompleter(PaintingBinding.instance.imageCache.putIfAbsent(key, () => load(key))); }).catchError( diff --git a/packages/flutter/lib/src/painting/image_resolution.dart b/packages/flutter/lib/src/painting/image_resolution.dart index 7c354a001e..b38738f878 100644 --- a/packages/flutter/lib/src/painting/image_resolution.dart +++ b/packages/flutter/lib/src/painting/image_resolution.dart @@ -166,7 +166,7 @@ class AssetImage extends AssetBundleImageProvider { final AssetBundle chosenBundle = bundle ?? configuration.bundle ?? rootBundle; Completer completer; Future result; - chosenBundle.loadStructuredData>>(_kAssetManifestFileName, _manifestParser).then( + chosenBundle.loadStructuredData>>(_kAssetManifestFileName, _manifestParser).then( (Map> manifest) { final String chosenName = _chooseVariant( keyName, diff --git a/packages/flutter/lib/src/painting/image_stream.dart b/packages/flutter/lib/src/painting/image_stream.dart index 4b093efc39..decef4a631 100644 --- a/packages/flutter/lib/src/painting/image_stream.dart +++ b/packages/flutter/lib/src/painting/image_stream.dart @@ -270,7 +270,7 @@ class OneFrameImageStreamCompleter extends ImageStreamCompleter { /// FlutterErrorDetails]). OneFrameImageStreamCompleter(Future image, { InformationCollector informationCollector }) : assert(image != null) { - image.then(setImage, onError: (dynamic error, StackTrace stack) { + image.then(setImage, onError: (dynamic error, StackTrace stack) { FlutterError.reportError(new FlutterErrorDetails( exception: error, stack: stack, @@ -333,7 +333,7 @@ class MultiFrameImageStreamCompleter extends ImageStreamCompleter { _scale = scale, _framesEmitted = 0, _timer = null { - codec.then(_handleCodecReady, onError: (dynamic error, StackTrace stack) { + codec.then(_handleCodecReady, onError: (dynamic error, StackTrace stack) { FlutterError.reportError(new FlutterErrorDetails( exception: error, stack: stack, diff --git a/packages/flutter/lib/src/services/asset_bundle.dart b/packages/flutter/lib/src/services/asset_bundle.dart index a1809d1b87..5e38f9bf38 100644 --- a/packages/flutter/lib/src/services/asset_bundle.dart +++ b/packages/flutter/lib/src/services/asset_bundle.dart @@ -181,7 +181,7 @@ abstract class CachingAssetBundle extends AssetBundle { return _structuredDataCache[key]; Completer completer; Future result; - loadString(key, cache: false).then(parser).then((T value) { + loadString(key, cache: false).then(parser).then((T value) { result = new SynchronousFuture(value); _structuredDataCache[key] = result; if (completer != null) { diff --git a/packages/flutter/lib/src/widgets/animated_list.dart b/packages/flutter/lib/src/widgets/animated_list.dart index 572b4ae955..25ae7609fc 100644 --- a/packages/flutter/lib/src/widgets/animated_list.dart +++ b/packages/flutter/lib/src/widgets/animated_list.dart @@ -298,7 +298,7 @@ class AnimatedListState extends State with TickerProviderStateMixi _itemsCount += 1; }); - controller.forward().then((Null value) { + controller.forward().then((Null value) { _removeActiveItemAt(_incomingItems, incomingItem.itemIndex).controller.dispose(); }); } @@ -333,7 +333,7 @@ class AnimatedListState extends State with TickerProviderStateMixi ..sort(); }); - controller.reverse().then((Null value) { + controller.reverse().then((Null value) { _removeActiveItemAt(_outgoingItems, outgoingItem.itemIndex).controller.dispose(); // Decrement the incoming and outgoing item indices to account diff --git a/packages/flutter/lib/src/widgets/async.dart b/packages/flutter/lib/src/widgets/async.dart index 9689500b8b..5e497fdb6a 100644 --- a/packages/flutter/lib/src/widgets/async.dart +++ b/packages/flutter/lib/src/widgets/async.dart @@ -513,7 +513,7 @@ class _FutureBuilderState extends State> { if (widget.future != null) { final Object callbackIdentity = new Object(); _activeCallbackIdentity = callbackIdentity; - widget.future.then((T data) { + widget.future.then((T data) { if (_activeCallbackIdentity == callbackIdentity) { setState(() { _snapshot = new AsyncSnapshot.withData(ConnectionState.done, data); diff --git a/packages/flutter/test/foundation/capture_output.dart b/packages/flutter/test/foundation/capture_output.dart index fc8c309d67..5bcfac3a70 100644 --- a/packages/flutter/test/foundation/capture_output.dart +++ b/packages/flutter/test/foundation/capture_output.dart @@ -8,7 +8,7 @@ import 'dart:ui' show VoidCallback; List captureOutput(VoidCallback fn) { final List log = []; - runZoned(fn, zoneSpecification: new ZoneSpecification( + runZoned(fn, zoneSpecification: new ZoneSpecification( print: (Zone self, ZoneDelegate parent, Zone zone, diff --git a/packages/flutter/test/widgets/image_resolution_test.dart b/packages/flutter/test/widgets/image_resolution_test.dart index 301d221eae..dc7138d3d9 100644 --- a/packages/flutter/test/widgets/image_resolution_test.dart +++ b/packages/flutter/test/widgets/image_resolution_test.dart @@ -90,7 +90,7 @@ class TestAssetBundle extends CachingAssetBundle { class FakeImageStreamCompleter extends ImageStreamCompleter { FakeImageStreamCompleter(Future image) { - image.then(setImage); + image.then(setImage); } } @@ -100,7 +100,7 @@ class TestAssetImage extends AssetImage { @override ImageStreamCompleter load(AssetBundleImageKey key) { ImageInfo imageInfo; - key.bundle.load(key.name).then((ByteData data) { + key.bundle.load(key.name).then((ByteData data) { final TestByteData testData = data; final ui.Image image = new TestImage(testData.scale); imageInfo = new ImageInfo(image: image, scale: key.scale);