From bf2c46e263d08da4e9c39f09d2220d5a334f4089 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Tue, 15 Nov 2016 16:52:58 -0800 Subject: [PATCH] Fix the ignore identifiers (#6876) I used the wrong identifiers here. --- packages/flutter/lib/src/gestures/drag.dart | 14 +++++++------- packages/flutter/lib/src/gestures/long_press.dart | 2 +- 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_test/lib/src/controller.dart | 2 +- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/flutter/lib/src/gestures/drag.dart b/packages/flutter/lib/src/gestures/drag.dart index e91ba9940d..c3f1f2a0e3 100644 --- a/packages/flutter/lib/src/gestures/drag.dart +++ b/packages/flutter/lib/src/gestures/drag.dart @@ -182,7 +182,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { _initialPosition = event.position; _pendingDragOffset = Offset.zero; if (onDown != null) - invokeCallback/**/('onDown', () => onDown(new DragDownDetails(globalPosition: _initialPosition))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onDown', () => onDown(new DragDownDetails(globalPosition: _initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } } @@ -196,7 +196,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { Offset delta = event.delta; if (_state == _DragState.accepted) { if (onUpdate != null) { - invokeCallback/**/('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 delta: _getDeltaForDetails(delta), primaryDelta: _getPrimaryDeltaForDetails(delta), globalPosition: event.position @@ -218,9 +218,9 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { Offset delta = _pendingDragOffset; _pendingDragOffset = Offset.zero; if (onStart != null) - invokeCallback/**/('onStart', () => onStart(new DragStartDetails(globalPosition: _initialPosition))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onStart', () => onStart(new DragStartDetails(globalPosition: _initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 if (delta != Offset.zero && onUpdate != null) { - invokeCallback/**/('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 delta: _getDeltaForDetails(delta), primaryDelta: _getPrimaryDeltaForDetails(delta) ))); @@ -239,7 +239,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { resolve(GestureDisposition.rejected); _state = _DragState.ready; if (onCancel != null) - invokeCallback/**/('onCancel', onCancel); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onCancel', onCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 return; } bool wasAccepted = (_state == _DragState.accepted); @@ -253,9 +253,9 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { final Offset pixelsPerSecond = velocity.pixelsPerSecond; if (pixelsPerSecond.distanceSquared > kMaxFlingVelocity * kMaxFlingVelocity) velocity = new Velocity(pixelsPerSecond: (pixelsPerSecond / pixelsPerSecond.distance) * kMaxFlingVelocity); - invokeCallback/**/('onEnd', () => onEnd(new DragEndDetails(velocity: velocity))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onEnd', () => onEnd(new DragEndDetails(velocity: velocity))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } else { - invokeCallback/**/('onEnd', () => onEnd(new DragEndDetails(velocity: Velocity.zero))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onEnd', () => onEnd(new DragEndDetails(velocity: Velocity.zero))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } } _velocityTrackers.clear(); diff --git a/packages/flutter/lib/src/gestures/long_press.dart b/packages/flutter/lib/src/gestures/long_press.dart index c6c12bd059..7f3640c29e 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: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onLongPress', onLongPress); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } @override diff --git a/packages/flutter/lib/src/gestures/multitap.dart b/packages/flutter/lib/src/gestures/multitap.dart index d1496e70ed..45e50263bb 100644 --- a/packages/flutter/lib/src/gestures/multitap.dart +++ b/packages/flutter/lib/src/gestures/multitap.dart @@ -191,7 +191,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer { _freezeTracker(tracker); _trackers.remove(tracker.pointer); if (onDoubleTap != null) - invokeCallback/**/('onDoubleTap', onDoubleTap); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onDoubleTap', onDoubleTap); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } @@ -359,7 +359,7 @@ class MultiTapGestureRecognizer extends GestureRecognizer { longTapDelay: longTapDelay ); if (onTapDown != null) - invokeCallback/**/('onTapDown', () => onTapDown(event.pointer, new TapDownDetails(globalPosition: event.position))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + 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 } @override @@ -380,19 +380,19 @@ class MultiTapGestureRecognizer extends GestureRecognizer { _gestureMap.remove(pointer); if (resolution == _TapResolution.tap) { if (onTapUp != null) - invokeCallback/**/('onTapUp', () => onTapUp(pointer, new TapUpDetails(globalPosition: globalPosition))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTapUp', () => onTapUp(pointer, new TapUpDetails(globalPosition: globalPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 if (onTap != null) - invokeCallback/**/('onTap', () => onTap(pointer)); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTap', () => onTap(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } else { if (onTapCancel != null) - invokeCallback/**/('onTapCancel', () => onTapCancel(pointer)); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTapCancel', () => onTapCancel(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } } void _handleLongTap(int pointer, Point lastPosition) { assert(_gestureMap.containsKey(pointer)); if (onLongTapDown != null) - invokeCallback/**/('onLongTapDown', () => onLongTapDown(pointer, new TapDownDetails(globalPosition: lastPosition))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onLongTapDown', () => onLongTapDown(pointer, new TapDownDetails(globalPosition: lastPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } @override diff --git a/packages/flutter/lib/src/gestures/scale.dart b/packages/flutter/lib/src/gestures/scale.dart index 7095f79d76..7464c10864 100644 --- a/packages/flutter/lib/src/gestures/scale.dart +++ b/packages/flutter/lib/src/gestures/scale.dart @@ -180,9 +180,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: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onEnd', () => onEnd(new ScaleEndDetails(velocity: velocity))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } else { - invokeCallback/**/('onEnd', () => onEnd(new ScaleEndDetails(velocity: Velocity.zero))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onEnd', () => onEnd(new ScaleEndDetails(velocity: Velocity.zero))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } } _state = ScaleState.accepted; @@ -200,11 +200,11 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer { if (_state == ScaleState.accepted && !configChanged) { _state = ScaleState.started; if (onStart != null) - invokeCallback/**/('onStart', () => onStart(new ScaleStartDetails(focalPoint: focalPoint))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onStart', () => onStart(new ScaleStartDetails(focalPoint: focalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } if (_state == ScaleState.started && onUpdate != null) - invokeCallback/**/('onUpdate', () => onUpdate(new ScaleUpdateDetails(scale: _scaleFactor, focalPoint: focalPoint))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onUpdate', () => onUpdate(new ScaleUpdateDetails(scale: _scaleFactor, focalPoint: focalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } @override diff --git a/packages/flutter/lib/src/gestures/tap.dart b/packages/flutter/lib/src/gestures/tap.dart index accc2c381b..a1b6708190 100644 --- a/packages/flutter/lib/src/gestures/tap.dart +++ b/packages/flutter/lib/src/gestures/tap.dart @@ -99,7 +99,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { void resolve(GestureDisposition disposition) { if (_wonArenaForPrimaryPointer && disposition == GestureDisposition.rejected) { if (onTapCancel != null) - invokeCallback/**/('onTapCancel', onTapCancel); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTapCancel', onTapCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } super.resolve(disposition); @@ -126,7 +126,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { if (pointer == primaryPointer) { assert(state == GestureRecognizerState.defunct); if (onTapCancel != null) - invokeCallback/**/('onTapCancel', onTapCancel); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTapCancel', onTapCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } } @@ -134,7 +134,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { void _checkDown() { if (!_sentTapDown) { if (onTapDown != null) - invokeCallback/**/('onTapDown', () => onTapDown(new TapDownDetails(globalPosition: initialPosition))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTapDown', () => onTapDown(new TapDownDetails(globalPosition: initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _sentTapDown = true; } } @@ -143,9 +143,9 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { if (_wonArenaForPrimaryPointer && _finalPosition != null) { resolve(GestureDisposition.accepted); if (onTapUp != null) - invokeCallback/**/('onTapUp', () => onTapUp(new TapUpDetails(globalPosition: _finalPosition))); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTapUp', () => onTapUp(new TapUpDetails(globalPosition: _finalPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 if (onTap != null) - invokeCallback/**/('onTap', onTap); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback/**/('onTap', onTap); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } } diff --git a/packages/flutter_test/lib/src/controller.dart b/packages/flutter_test/lib/src/controller.dart index b2201f3fe5..74df4e29ac 100644 --- a/packages/flutter_test/lib/src/controller.dart +++ b/packages/flutter_test/lib/src/controller.dart @@ -134,7 +134,7 @@ class WidgetController { TestAsyncUtils.guardSync(); return allElements .where((Element element) => element is StatefulElement) - .map((StatefulElement element) => element.state); // ignore: INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27827 + .map((StatefulElement element) => element.state); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27827 } /// The matching state in the widget tree.