Unverified Commit 6d20ff24 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Remove all obsolete "// ignore:" (#27271)

parent dc38a260
...@@ -124,7 +124,7 @@ Future<Map<String, double>> _readJsonResults(Process process) { ...@@ -124,7 +124,7 @@ Future<Map<String, double>> _readJsonResults(Process process) {
process.stdin.write('q'); process.stdin.write('q');
await process.stdin.flush(); await process.stdin.flush();
// Also send a kill signal in case the `q` above didn't work. // Also send a kill signal in case the `q` above didn't work.
process.kill(ProcessSignal.sigint); // ignore: deprecated_member_use process.kill(ProcessSignal.sigint);
try { try {
completer.complete(Map<String, double>.from(json.decode(jsonOutput))); completer.complete(Map<String, double>.from(json.decode(jsonOutput)));
} catch (ex) { } catch (ex) {
......
...@@ -53,7 +53,7 @@ class SyntaxHighlighterStyle { ...@@ -53,7 +53,7 @@ class SyntaxHighlighterStyle {
final TextStyle constantStyle; final TextStyle constantStyle;
} }
abstract class SyntaxHighlighter { // ignore: one_member_abstracts abstract class SyntaxHighlighter {
TextSpan format(String src); TextSpan format(String src);
} }
......
...@@ -106,10 +106,8 @@ class CupertinoPageRoute<T> extends PageRoute<T> { ...@@ -106,10 +106,8 @@ class CupertinoPageRoute<T> extends PageRoute<T> {
}) : assert(builder != null), }) : assert(builder != null),
assert(maintainState != null), assert(maintainState != null),
assert(fullscreenDialog != null), assert(fullscreenDialog != null),
super(settings: settings, fullscreenDialog: fullscreenDialog) { assert(opaque),
// ignore: prefer_asserts_in_initializer_lists, https://github.com/dart-lang/sdk/issues/31223 super(settings: settings, fullscreenDialog: fullscreenDialog);
assert(opaque); // PageRoute makes it return true.
}
/// Builds the primary contents of the route. /// Builds the primary contents of the route.
final WidgetBuilder builder; final WidgetBuilder builder;
......
...@@ -195,6 +195,7 @@ class ChangeNotifier implements Listenable { ...@@ -195,6 +195,7 @@ class ChangeNotifier implements Listenable {
/// in response to a notification) that has been registered multiple times. /// in response to a notification) that has been registered multiple times.
/// See the discussion at [removeListener]. /// See the discussion at [removeListener].
@protected @protected
@visibleForTesting
void notifyListeners() { void notifyListeners() {
assert(_debugAssertNotDisposed()); assert(_debugAssertNotDisposed());
if (_listeners != null) { if (_listeners != null) {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'events.dart'; import 'events.dart';
/// An object that can hit-test pointers. /// An object that can hit-test pointers.
abstract class HitTestable { // ignore: one_member_abstracts abstract class HitTestable {
// This class is intended to be used as an interface with the implements // This class is intended to be used as an interface with the implements
// keyword, and should not be extended directly. // keyword, and should not be extended directly.
factory HitTestable._() => null; factory HitTestable._() => null;
...@@ -18,7 +18,7 @@ abstract class HitTestable { // ignore: one_member_abstracts ...@@ -18,7 +18,7 @@ abstract class HitTestable { // ignore: one_member_abstracts
} }
/// An object that can dispatch events. /// An object that can dispatch events.
abstract class HitTestDispatcher { // ignore: one_member_abstracts abstract class HitTestDispatcher {
// This class is intended to be used as an interface with the implements // This class is intended to be used as an interface with the implements
// keyword, and should not be extended directly. // keyword, and should not be extended directly.
factory HitTestDispatcher._() => null; factory HitTestDispatcher._() => null;
...@@ -28,7 +28,7 @@ abstract class HitTestDispatcher { // ignore: one_member_abstracts ...@@ -28,7 +28,7 @@ abstract class HitTestDispatcher { // ignore: one_member_abstracts
} }
/// An object that can handle events. /// An object that can handle events.
abstract class HitTestTarget { // ignore: one_member_abstracts abstract class HitTestTarget {
// This class is intended to be used as an interface with the implements // This class is intended to be used as an interface with the implements
// keyword, and should not be extended directly. // keyword, and should not be extended directly.
factory HitTestTarget._() => null; factory HitTestTarget._() => null;
......
...@@ -140,12 +140,11 @@ class ExpansionPanelList extends StatefulWidget { ...@@ -140,12 +140,11 @@ class ExpansionPanelList extends StatefulWidget {
/// of [ExpansionPanelRadio]. /// of [ExpansionPanelRadio].
const ExpansionPanelList.radio({ const ExpansionPanelList.radio({
Key key, Key key,
List<ExpansionPanelRadio> children = const <ExpansionPanelRadio>[], this.children = const <ExpansionPanelRadio>[],
this.expansionCallback, this.expansionCallback,
this.animationDuration = kThemeAnimationDuration, this.animationDuration = kThemeAnimationDuration,
this.initialOpenPanelValue, this.initialOpenPanelValue,
}) : children = children, // ignore: prefer_initializing_formals }) : assert(children != null),
assert(children != null),
assert(animationDuration != null), assert(animationDuration != null),
_allowOnlyOnePanelOpen = true, _allowOnlyOnePanelOpen = true,
super(key: key); super(key: key);
......
...@@ -48,10 +48,8 @@ class MaterialPageRoute<T> extends PageRoute<T> { ...@@ -48,10 +48,8 @@ class MaterialPageRoute<T> extends PageRoute<T> {
}) : assert(builder != null), }) : assert(builder != null),
assert(maintainState != null), assert(maintainState != null),
assert(fullscreenDialog != null), assert(fullscreenDialog != null),
super(settings: settings, fullscreenDialog: fullscreenDialog) { assert(opaque),
// ignore: prefer_asserts_in_initializer_lists , https://github.com/dart-lang/sdk/issues/31223 super(settings: settings, fullscreenDialog: fullscreenDialog);
assert(opaque);
}
/// Builds the primary contents of the route. /// Builds the primary contents of the route.
final WidgetBuilder builder; final WidgetBuilder builder;
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
//ignore: Remove this once Google catches up with dev.4 Dart.
import 'dart:async';
import 'dart:math' as math; import 'dart:math' as math;
import 'dart:ui' as ui show TextBox, lerpDouble; import 'dart:ui' as ui show TextBox, lerpDouble;
......
...@@ -51,7 +51,9 @@ class RenderErrorBox extends RenderBox { ...@@ -51,7 +51,9 @@ class RenderErrorBox extends RenderBox {
); );
_paragraph = builder.build(); _paragraph = builder.build();
} }
} catch (e) { } // ignore: empty_catches } catch (e) {
// Intentionally left empty.
}
} }
/// The message to attempt to display at paint time. /// The message to attempt to display at paint time.
...@@ -114,6 +116,8 @@ class RenderErrorBox extends RenderBox { ...@@ -114,6 +116,8 @@ class RenderErrorBox extends RenderBox {
context.canvas.drawParagraph(_paragraph, offset); context.canvas.drawParagraph(_paragraph, offset);
} }
} catch (e) { } // ignore: empty_catches } catch (e) {
// Intentionally left empty.
}
} }
} }
...@@ -48,6 +48,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin { ...@@ -48,6 +48,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin {
/// Mark that this layer has changed and [addToScene] needs to be called. /// Mark that this layer has changed and [addToScene] needs to be called.
@protected @protected
@visibleForTesting
void markNeedsAddToScene() { void markNeedsAddToScene() {
_needsAddToScene = true; _needsAddToScene = true;
} }
...@@ -90,6 +91,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin { ...@@ -90,6 +91,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin {
/// A subtree needs [addToScene] if any of its layer needs [addToScene]. /// A subtree needs [addToScene] if any of its layer needs [addToScene].
/// The [ContainerLayer] will override this to respect its children. /// The [ContainerLayer] will override this to respect its children.
@protected @protected
@visibleForTesting
void updateSubtreeNeedsAddToScene() { void updateSubtreeNeedsAddToScene() {
_subtreeNeedsAddToScene = _needsAddToScene || alwaysNeedsAddToScene; _subtreeNeedsAddToScene = _needsAddToScene || alwaysNeedsAddToScene;
} }
......
...@@ -225,7 +225,7 @@ class _DismissibleClipper extends CustomClipper<Rect> { ...@@ -225,7 +225,7 @@ class _DismissibleClipper extends CustomClipper<Rect> {
enum _FlingGestureKind { none, forward, reverse } enum _FlingGestureKind { none, forward, reverse }
class _DismissibleState extends State<Dismissible> with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { // ignore: MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES class _DismissibleState extends State<Dismissible> with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
......
...@@ -3626,7 +3626,9 @@ class ErrorWidget extends LeafRenderObjectWidget { ...@@ -3626,7 +3626,9 @@ class ErrorWidget extends LeafRenderObjectWidget {
static String _stringify(Object exception) { static String _stringify(Object exception) {
try { try {
return exception.toString(); return exception.toString();
} catch (e) { } // ignore: empty_catches } catch (e) {
// intentionally left empty.
}
return 'Error'; return 'Error';
} }
...@@ -4922,6 +4924,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement { ...@@ -4922,6 +4924,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement {
/// This list is filtered to hide elements that have been forgotten (using /// This list is filtered to hide elements that have been forgotten (using
/// [forgetChild]). /// [forgetChild]).
@protected @protected
@visibleForTesting
Iterable<Element> get children => _children.where((Element child) => !_forgottenChildren.contains(child)); Iterable<Element> get children => _children.where((Element child) => !_forgottenChildren.contains(child));
List<Element> _children; List<Element> _children;
......
...@@ -1816,7 +1816,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin { ...@@ -1816,7 +1816,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin {
assert(!_debugLocked); assert(!_debugLocked);
assert(oldRoute != null); assert(oldRoute != null);
assert(newRoute != null); assert(newRoute != null);
if (oldRoute == newRoute) // ignore: unrelated_type_equality_checks, https://github.com/dart-lang/sdk/issues/32522 if (oldRoute == newRoute)
return; return;
assert(() { _debugLocked = true; return true; }()); assert(() { _debugLocked = true; return true; }());
assert(oldRoute._navigator == this); assert(oldRoute._navigator == this);
......
...@@ -201,8 +201,7 @@ class UiKitView extends StatefulWidget { ...@@ -201,8 +201,7 @@ class UiKitView extends StatefulWidget {
/// Creates a widget that embeds an iOS view. /// Creates a widget that embeds an iOS view.
/// ///
/// {@macro flutter.widgets.platformViews.constructorParams} /// {@macro flutter.widgets.platformViews.constructorParams}
UiKitView({ // ignore: prefer_const_constructors_in_immutables const UiKitView({
// TODO(aam): Remove lint ignore above once https://dartbug.com/34297 is fixed
Key key, Key key,
@required this.viewType, @required this.viewType,
this.onPlatformViewCreated, this.onPlatformViewCreated,
......
...@@ -609,6 +609,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics { ...@@ -609,6 +609,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
/// ///
/// Call [beginActivity] to change the current activity. /// Call [beginActivity] to change the current activity.
@protected @protected
@visibleForTesting
ScrollActivity get activity => _activity; ScrollActivity get activity => _activity;
ScrollActivity _activity; ScrollActivity _activity;
......
...@@ -160,6 +160,7 @@ class ScrollPositionWithSingleContext extends ScrollPosition implements ScrollAc ...@@ -160,6 +160,7 @@ class ScrollPositionWithSingleContext extends ScrollPosition implements ScrollAc
/// ///
/// If this changes the value, then a [UserScrollNotification] is dispatched. /// If this changes the value, then a [UserScrollNotification] is dispatched.
@protected @protected
@visibleForTesting
void updateUserScrollDirection(ScrollDirection value) { void updateUserScrollDirection(ScrollDirection value) {
assert(value != null); assert(value != null);
if (userScrollDirection == value) if (userScrollDirection == value)
......
...@@ -72,7 +72,7 @@ void main() { ...@@ -72,7 +72,7 @@ void main() {
child: Scaffold( child: Scaffold(
appBar: AppBar(title: const Text('Title')), appBar: AppBar(title: const Text('Title')),
body: Container(key: bodyKey), body: Container(key: bodyKey),
resizeToAvoidBottomPadding: false, // ignore: deprecated_member_use resizeToAvoidBottomPadding: false,
), ),
))); )));
......
...@@ -75,7 +75,7 @@ void main() { ...@@ -75,7 +75,7 @@ void main() {
g.append(j); g.append(j);
a.debugMarkClean(); a.debugMarkClean();
b.markNeedsAddToScene(); // ignore: invalid_use_of_protected_member b.markNeedsAddToScene();
c.debugMarkClean(); c.debugMarkClean();
d.debugMarkClean(); d.debugMarkClean();
e.debugMarkClean(); e.debugMarkClean();
...@@ -83,7 +83,7 @@ void main() { ...@@ -83,7 +83,7 @@ void main() {
g.debugMarkClean(); g.debugMarkClean();
h.debugMarkClean(); h.debugMarkClean();
i.debugMarkClean(); i.debugMarkClean();
j.markNeedsAddToScene(); // ignore: invalid_use_of_protected_member j.markNeedsAddToScene();
a.updateSubtreeNeedsAddToScene(); a.updateSubtreeNeedsAddToScene();
...@@ -114,10 +114,10 @@ void main() { ...@@ -114,10 +114,10 @@ void main() {
void checkNeedsAddToScene(Layer layer, void mutateCallback()) { void checkNeedsAddToScene(Layer layer, void mutateCallback()) {
layer.debugMarkClean(); layer.debugMarkClean();
layer.updateSubtreeNeedsAddToScene(); // ignore: invalid_use_of_protected_member layer.updateSubtreeNeedsAddToScene();
expect(layer.debugSubtreeNeedsAddToScene, false); expect(layer.debugSubtreeNeedsAddToScene, false);
mutateCallback(); mutateCallback();
layer.updateSubtreeNeedsAddToScene(); // ignore: invalid_use_of_protected_member layer.updateSubtreeNeedsAddToScene();
expect(layer.debugSubtreeNeedsAddToScene, true); expect(layer.debugSubtreeNeedsAddToScene, true);
} }
......
...@@ -242,7 +242,7 @@ void main() { ...@@ -242,7 +242,7 @@ void main() {
..restore() ..restore()
); );
debugPaintSizeEnabled = true; debugPaintSizeEnabled = true;
expect(tester.renderObject(find.byType(ClipRect)).debugPaint, paints // ignore: INVALID_USE_OF_PROTECTED_MEMBER expect(tester.renderObject(find.byType(ClipRect)).debugPaint, paints
..rect(rect: Rect.fromLTRB(0.0, 0.0, 800.0, 600.0)) ..rect(rect: Rect.fromLTRB(0.0, 0.0, 800.0, 600.0))
..paragraph() ..paragraph()
); );
......
...@@ -511,7 +511,7 @@ void main() { ...@@ -511,7 +511,7 @@ void main() {
)); ));
final MultiChildRenderObjectElement element = key0.currentContext; final MultiChildRenderObjectElement element = key0.currentContext;
expect( expect(
element.children.map((Element element) => element.widget.key), // ignore: INVALID_USE_OF_PROTECTED_MEMBER element.children.map((Element element) => element.widget.key),
<Key>[null, key1, null, key2, null], <Key>[null, key1, null, key2, null],
); );
}); });
......
...@@ -503,7 +503,7 @@ void main() { ...@@ -503,7 +503,7 @@ void main() {
await tester.pump(); await tester.pump();
expect(buildCount, equals(1)); expect(buildCount, equals(1));
notifier.notifyListeners(); // ignore: invalid_use_of_protected_member notifier.notifyListeners();
await tester.pump(); await tester.pump();
expect(buildCount, equals(2)); expect(buildCount, equals(2));
......
...@@ -817,7 +817,7 @@ void main() { ...@@ -817,7 +817,7 @@ void main() {
viewsController.registerViewType('webview'); viewsController.registerViewType('webview');
await tester.pumpWidget( await tester.pumpWidget(
Center( const Center(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -840,7 +840,7 @@ void main() { ...@@ -840,7 +840,7 @@ void main() {
viewsController.registerViewType('webview'); viewsController.registerViewType('webview');
viewsController.registerViewType('maps'); viewsController.registerViewType('maps');
await tester.pumpWidget( await tester.pumpWidget(
Center( const Center(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -850,7 +850,7 @@ void main() { ...@@ -850,7 +850,7 @@ void main() {
); );
await tester.pumpWidget( await tester.pumpWidget(
Center( const Center(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -871,7 +871,7 @@ void main() { ...@@ -871,7 +871,7 @@ void main() {
final FakeIosPlatformViewsController viewsController = FakeIosPlatformViewsController(); final FakeIosPlatformViewsController viewsController = FakeIosPlatformViewsController();
viewsController.registerViewType('webview'); viewsController.registerViewType('webview');
await tester.pumpWidget( await tester.pumpWidget(
Center( const Center(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -900,7 +900,7 @@ void main() { ...@@ -900,7 +900,7 @@ void main() {
viewsController.registerViewType('webview'); viewsController.registerViewType('webview');
viewsController.creationDelay = Completer<void>(); viewsController.creationDelay = Completer<void>();
await tester.pumpWidget( await tester.pumpWidget(
Center( const Center(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -967,7 +967,7 @@ void main() { ...@@ -967,7 +967,7 @@ void main() {
viewsController.registerViewType('webview'); viewsController.registerViewType('webview');
await tester.pumpWidget( await tester.pumpWidget(
Center( const Center(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -975,7 +975,7 @@ void main() { ...@@ -975,7 +975,7 @@ void main() {
viewType: 'webview', viewType: 'webview',
layoutDirection: TextDirection.ltr, layoutDirection: TextDirection.ltr,
creationParams: 'creation parameters', creationParams: 'creation parameters',
creationParamsCodec: const StringCodec(), creationParamsCodec: StringCodec(),
), ),
), ),
), ),
...@@ -1005,7 +1005,7 @@ void main() { ...@@ -1005,7 +1005,7 @@ void main() {
viewsController.registerViewType('webview'); viewsController.registerViewType('webview');
await tester.pumpWidget( await tester.pumpWidget(
Align( const Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
...@@ -1044,7 +1044,7 @@ void main() { ...@@ -1044,7 +1044,7 @@ void main() {
numPointerDownsOnParent++; numPointerDownsOnParent++;
}, },
), ),
Positioned( const Positioned(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -1089,7 +1089,7 @@ void main() { ...@@ -1089,7 +1089,7 @@ void main() {
numPointerDownsOnParent++; numPointerDownsOnParent++;
}, },
), ),
Positioned( const Positioned(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -1134,7 +1134,7 @@ void main() { ...@@ -1134,7 +1134,7 @@ void main() {
numPointerDownsOnParent++; numPointerDownsOnParent++;
}, },
), ),
Positioned( const Positioned(
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
...@@ -1176,7 +1176,7 @@ void main() { ...@@ -1176,7 +1176,7 @@ void main() {
onVerticalDragStart: (DragStartDetails d) { onVerticalDragStart: (DragStartDetails d) {
verticalDragAcceptedByParent = true; verticalDragAcceptedByParent = true;
}, },
child: SizedBox( child: const SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
child: UiKitView(viewType: 'webview', layoutDirection: TextDirection.ltr), child: UiKitView(viewType: 'webview', layoutDirection: TextDirection.ltr),
...@@ -1256,7 +1256,7 @@ void main() { ...@@ -1256,7 +1256,7 @@ void main() {
verticalDragAcceptedByParent = true; verticalDragAcceptedByParent = true;
}, },
onLongPress: () {}, onLongPress: () {},
child: SizedBox( child: const SizedBox(
width: 200.0, width: 200.0,
height: 100.0, height: 100.0,
child: UiKitView( child: UiKitView(
...@@ -1286,7 +1286,7 @@ void main() { ...@@ -1286,7 +1286,7 @@ void main() {
final FakeIosPlatformViewsController viewsController = FakeIosPlatformViewsController(); final FakeIosPlatformViewsController viewsController = FakeIosPlatformViewsController();
viewsController.registerViewType('webview'); viewsController.registerViewType('webview');
await tester.pumpWidget( await tester.pumpWidget(
Align( const Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
...@@ -1307,7 +1307,7 @@ void main() { ...@@ -1307,7 +1307,7 @@ void main() {
await gesture.moveBy(const Offset(0.0, 100.0)); await gesture.moveBy(const Offset(0.0, 100.0));
await tester.pumpWidget( await tester.pumpWidget(
Align( const Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: SizedBox( child: SizedBox(
width: 200.0, width: 200.0,
......
...@@ -30,8 +30,7 @@ double getScrollOffset(WidgetTester tester) { ...@@ -30,8 +30,7 @@ double getScrollOffset(WidgetTester tester) {
double getScrollVelocity(WidgetTester tester) { double getScrollVelocity(WidgetTester tester) {
final RenderViewport viewport = tester.renderObject(find.byType(Viewport)); final RenderViewport viewport = tester.renderObject(find.byType(Viewport));
final ScrollPosition position = viewport.offset; final ScrollPosition position = viewport.offset;
// Access for test only. return position.activity.velocity;
return position.activity.velocity; // ignore: INVALID_USE_OF_PROTECTED_MEMBER
} }
void resetScrollOffset(WidgetTester tester) { void resetScrollOffset(WidgetTester tester) {
......
...@@ -187,7 +187,7 @@ void main() { ...@@ -187,7 +187,7 @@ void main() {
verifyPaintPosition(key3, const Offset(0.0, 0.0), true); verifyPaintPosition(key3, const Offset(0.0, 0.0), true);
position.animateTo(bigHeight + delegate.maxExtent * 1.9, curve: Curves.linear, duration: const Duration(minutes: 1)); position.animateTo(bigHeight + delegate.maxExtent * 1.9, curve: Curves.linear, duration: const Duration(minutes: 1));
position.updateUserScrollDirection(ScrollDirection.forward); // ignore: invalid_use_of_protected_member position.updateUserScrollDirection(ScrollDirection.forward);
await tester.pumpAndSettle(const Duration(milliseconds: 1000)); await tester.pumpAndSettle(const Duration(milliseconds: 1000));
verifyPaintPosition(key1, const Offset(0.0, 0.0), false); verifyPaintPosition(key1, const Offset(0.0, 0.0), false);
verifyPaintPosition(key2, const Offset(0.0, 0.0), true); verifyPaintPosition(key2, const Offset(0.0, 0.0), true);
......
...@@ -46,7 +46,7 @@ abstract class Command { ...@@ -46,7 +46,7 @@ abstract class Command {
/// An object sent from a Flutter application back to the Flutter Driver in /// An object sent from a Flutter application back to the Flutter Driver in
/// response to a command. /// response to a command.
abstract class Result { // ignore: one_member_abstracts abstract class Result {
/// Serializes this message to a JSON map. /// Serializes this message to a JSON map.
Map<String, dynamic> toJson(); Map<String, dynamic> toJson();
} }
...@@ -467,6 +467,7 @@ abstract class Status { ...@@ -467,6 +467,7 @@ abstract class Status {
final Stopwatch _stopwatch = Stopwatch(); final Stopwatch _stopwatch = Stopwatch();
@protected @protected
@visibleForTesting
bool get seemsSlow => timeout != null && _stopwatch.elapsed > timeout; bool get seemsSlow => timeout != null && _stopwatch.elapsed > timeout;
@protected @protected
......
...@@ -187,9 +187,7 @@ abstract class Domain { ...@@ -187,9 +187,7 @@ abstract class Domain {
String toString() => name; String toString() => name;
void handleCommand(String command, dynamic id, Map<String, dynamic> args) { void handleCommand(String command, dynamic id, Map<String, dynamic> args) {
// Remove 'new' once Google catches up to dev4.0 Dart SDK. Future<dynamic>.sync(() {
//ignore: unnecessary_new
new Future<dynamic>.sync(() {
if (_handlers.containsKey(command)) if (_handlers.containsKey(command))
return _handlers[command](args); return _handlers[command](args);
throw 'command not understood: $name.$command'; throw 'command not understood: $name.$command';
......
...@@ -163,7 +163,7 @@ class Xcode { ...@@ -163,7 +163,7 @@ class Xcode {
try { try {
_xcodeSelectPath = processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path']).stdout.trim(); _xcodeSelectPath = processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path']).stdout.trim();
} on ProcessException { } on ProcessException {
// Ignore: return null below. // Ignored, return null below.
} }
} }
return _xcodeSelectPath; return _xcodeSelectPath;
......
...@@ -120,7 +120,7 @@ class XcodeProjectInterpreter { ...@@ -120,7 +120,7 @@ class XcodeProjectInterpreter {
_majorVersion = int.parse(components[0]); _majorVersion = int.parse(components[0]);
_minorVersion = components.length == 1 ? 0 : int.parse(components[1]); _minorVersion = components.length == 1 ? 0 : int.parse(components[1]);
} on ProcessException { } on ProcessException {
// Ignore: leave values null. // Ignored, leave values null.
} }
} }
......
...@@ -436,7 +436,7 @@ class HotRunner extends ResidentRunner { ...@@ -436,7 +436,7 @@ class HotRunner extends ResidentRunner {
for (FlutterView view in device.views) for (FlutterView view in device.views)
futures.add(view.runFromSource(entryUri, packagesUri, assetsDirectoryUri)); futures.add(view.runFromSource(entryUri, packagesUri, assetsDirectoryUri));
final Completer<void> completer = Completer<void>(); final Completer<void> completer = Completer<void>();
Future.wait(futures).whenComplete(() { completer.complete(null); }); // ignore: unawaited_futures Future.wait(futures).whenComplete(() { completer.complete(null); });
return completer.future; return completer.future;
} }
......
...@@ -497,7 +497,7 @@ class _FlutterPlatform extends PlatformPlugin { ...@@ -497,7 +497,7 @@ class _FlutterPlatform extends PlatformPlugin {
// Callback can't throw since it's just setting a variable. // Callback can't throw since it's just setting a variable.
controller.sink.done.whenComplete(() { // ignore: unawaited_futures controller.sink.done.whenComplete(() { // ignore: unawaited_futures
controllerSinkClosed = true; controllerSinkClosed = true;
}); // ignore: unawaited_futures });
// Prepare our WebSocket server to talk to the engine subproces. // Prepare our WebSocket server to talk to the engine subproces.
final HttpServer server = await HttpServer.bind(host, port); final HttpServer server = await HttpServer.bind(host, port);
......
...@@ -35,9 +35,6 @@ class Usage { ...@@ -35,9 +35,6 @@ class Usage {
final FlutterVersion flutterVersion = FlutterVersion.instance; final FlutterVersion flutterVersion = FlutterVersion.instance;
final String version = versionOverride ?? flutterVersion.getVersionString(redactUnknownBranches: true); final String version = versionOverride ?? flutterVersion.getVersionString(redactUnknownBranches: true);
_analytics = AnalyticsIO(_kFlutterUA, settingsName, version, _analytics = AnalyticsIO(_kFlutterUA, settingsName, version,
// Analyzer doesn't recognize that [Directory] objects match up due to a
// conditional import.
// ignore: argument_type_not_assignable
documentDirectory: configDirOverride != null ? fs.directory(configDirOverride) : null); documentDirectory: configDirOverride != null ? fs.directory(configDirOverride) : null);
// Report a more detailed OS version string than package:usage does by default. // Report a more detailed OS version string than package:usage does by default.
......
...@@ -1384,7 +1384,7 @@ class ServiceMap extends ServiceObject implements Map<String, dynamic> { ...@@ -1384,7 +1384,7 @@ class ServiceMap extends ServiceObject implements Map<String, dynamic> {
Iterable<MapEntry<String, dynamic>> get entries => _map.entries; Iterable<MapEntry<String, dynamic>> get entries => _map.entries;
@override @override
void updateAll(dynamic update(String key, dynamic value)) => _map.updateAll(update); void updateAll(dynamic update(String key, dynamic value)) => _map.updateAll(update);
Map<RK, RV> retype<RK, RV>() => _map.cast<RK, RV>(); // ignore: annotate_overrides Map<RK, RV> retype<RK, RV>() => _map.cast<RK, RV>();
@override @override
dynamic update(String key, dynamic update(dynamic value), {dynamic ifAbsent()}) => _map.update(key, update, ifAbsent: ifAbsent); dynamic update(String key, dynamic update(dynamic value), {dynamic ifAbsent()}) => _map.update(key, update, ifAbsent: ifAbsent);
} }
......
...@@ -137,11 +137,11 @@ void main() { ...@@ -137,11 +137,11 @@ void main() {
timeout: const Duration(milliseconds: 10), timeout: const Duration(milliseconds: 10),
)..start(); )..start();
doWhileAsync(time, () => ansiSpinner.ticks < 10); // one second doWhileAsync(time, () => ansiSpinner.ticks < 10); // one second
expect(ansiSpinner.seemsSlow, isFalse); // ignore: invalid_use_of_protected_member expect(ansiSpinner.seemsSlow, isFalse);
expect(outputStdout().join('\n'), isNot(contains('This is taking an unexpectedly long time.'))); expect(outputStdout().join('\n'), isNot(contains('This is taking an unexpectedly long time.')));
await tenMillisecondsLater; await tenMillisecondsLater;
doWhileAsync(time, () => ansiSpinner.ticks < 30); // three seconds doWhileAsync(time, () => ansiSpinner.ticks < 30); // three seconds
expect(ansiSpinner.seemsSlow, isTrue); // ignore: invalid_use_of_protected_member expect(ansiSpinner.seemsSlow, isTrue);
expect(outputStdout().join('\n'), contains('This is taking an unexpectedly long time.')); expect(outputStdout().join('\n'), contains('This is taking an unexpectedly long time.'));
ansiSpinner.stop(); ansiSpinner.stop();
expect(outputStdout().join('\n'), isNot(contains('(!)'))); expect(outputStdout().join('\n'), isNot(contains('(!)')));
...@@ -231,12 +231,12 @@ void main() { ...@@ -231,12 +231,12 @@ void main() {
await FakeAsync().run((FakeAsync time) async { await FakeAsync().run((FakeAsync time) async {
ansiStatus.start(); ansiStatus.start();
doWhileAsync(time, () => ansiStatus.ticks < 10); // one second doWhileAsync(time, () => ansiStatus.ticks < 10); // one second
expect(ansiStatus.seemsSlow, isFalse); // ignore: invalid_use_of_protected_member expect(ansiStatus.seemsSlow, isFalse);
expect(outputStdout().join('\n'), isNot(contains('This is taking an unexpectedly long time.'))); expect(outputStdout().join('\n'), isNot(contains('This is taking an unexpectedly long time.')));
expect(outputStdout().join('\n'), isNot(contains('(!)'))); expect(outputStdout().join('\n'), isNot(contains('(!)')));
await tenMillisecondsLater; await tenMillisecondsLater;
doWhileAsync(time, () => ansiStatus.ticks < 30); // three seconds doWhileAsync(time, () => ansiStatus.ticks < 30); // three seconds
expect(ansiStatus.seemsSlow, isTrue); // ignore: invalid_use_of_protected_member expect(ansiStatus.seemsSlow, isTrue);
expect(outputStdout().join('\n'), contains('This is taking an unexpectedly long time.')); expect(outputStdout().join('\n'), contains('This is taking an unexpectedly long time.'));
ansiStatus.stop(); ansiStatus.stop();
expect(outputStdout().join('\n'), contains('(!)')); expect(outputStdout().join('\n'), contains('(!)'));
......
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