Unverified Commit ed0c8d77 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Remove some outdated ignores from framework (#108915)

parent f34b8d1f
......@@ -670,7 +670,7 @@ class FlutterErrorDetails with Diagnosticable {
super.debugFillProperties(properties);
final DiagnosticsNode verb = ErrorDescription('thrown${ context != null ? ErrorDescription(" $context") : ""}');
final Diagnosticable? diagnosticable = _exceptionToDiagnosticable();
if (exception is NullThrownError) { // ignore: deprecated_member_use
if (exception is NullThrownError) {
properties.add(ErrorDescription('The null value was $verb.'));
} else if (exception is num) {
properties.add(ErrorDescription('The number $exception was $verb.'));
......
......@@ -250,8 +250,6 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
/// {@macro flutter.gestures.GestureRecognizer.supportedDevices}
LongPressGestureRecognizer({
Duration? duration,
// TODO(goderbauer): remove ignore when https://github.com/dart-lang/linter/issues/3349 is fixed.
// ignore: avoid_init_to_null
super.postAcceptSlopTolerance = null,
@Deprecated(
'Migrate to supportedDevices. '
......
......@@ -781,7 +781,7 @@ abstract class StatefulWidget extends Widget {
/// [State] objects.
@protected
@factory
State createState(); // ignore: no_logic_in_create_state, this is the original sin
State createState();
}
/// Tracks the lifecycle of [State] objects when asserts are enabled.
......
......@@ -297,7 +297,7 @@ abstract class ImplicitlyAnimatedWidget extends StatefulWidget {
final VoidCallback? onEnd;
@override
ImplicitlyAnimatedWidgetState<ImplicitlyAnimatedWidget> createState(); // ignore: no_logic_in_create_state, https://github.com/dart-lang/linter/issues/2345
ImplicitlyAnimatedWidgetState<ImplicitlyAnimatedWidget> createState();
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
......
......@@ -28,7 +28,7 @@ abstract class UniqueWidget<T extends State<StatefulWidget>> extends StatefulWid
super(key: key);
@override
T createState(); // ignore: no_logic_in_create_state, https://github.com/dart-lang/linter/issues/2345
T createState();
/// The state for the unique inflated instance of this widget.
///
......
......@@ -978,7 +978,7 @@ mixin WidgetInspectorService {
bool enabled = false;
assert(() {
// TODO(kenz): add support for structured errors on the web.
enabled = const bool.fromEnvironment('flutter.inspector.structuredErrors', defaultValue: !kIsWeb); // ignore: avoid_redundant_argument_values
enabled = const bool.fromEnvironment('flutter.inspector.structuredErrors', defaultValue: !kIsWeb);
return true;
}());
return enabled;
......
......@@ -16,7 +16,7 @@ void main() async {
try {
await compute(throwNull, null);
} catch (e) {
if (e is! NullThrownError) { // ignore: deprecated_member_use
if (e is! NullThrownError) {
throw Exception('compute returned bad result');
}
}
......
......@@ -60,7 +60,7 @@ void main() {
);
expect(
FlutterErrorDetails(
exception: NullThrownError(), // ignore: deprecated_member_use
exception: NullThrownError(),
library: 'LIBRARY',
context: ErrorDescription('CONTEXTING'),
informationCollector: () sync* {
......@@ -113,7 +113,6 @@ void main() {
'═════════════════════════════════════════════════════════════════\n',
);
expect(
// ignore: deprecated_member_use
FlutterErrorDetails(exception: NullThrownError()).toString(),
'══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞══════════════════════\n'
'The null value was thrown.\n'
......
......@@ -148,11 +148,9 @@ void main() {
viewportDimension: 100.0,
axisDirection: AxisDirection.down,
);
// ignore: avoid_dynamic_calls
scrollPainter!.update(metrics, AxisDirection.down);
final TestCanvas canvas = TestCanvas();
// ignore: avoid_dynamic_calls
scrollPainter.paint(canvas, const Size(10.0, 100.0));
// Scrollbar is not supposed to draw anything if there isn't enough content.
......
......@@ -20,7 +20,7 @@ class PaintingBindingSpy extends BindingBase with SchedulerBinding, ServicesBind
}
@override
// ignore: MUST_CALL_SUPER
// ignore: must_call_super
void initLicenses() {
// Do not include any licenses, because we're a test, and the LICENSE file
// doesn't get generated for tests.
......
......@@ -222,7 +222,6 @@ class TestRenderSliverFixedExtentBoxAdaptor extends RenderSliverFixedExtentBoxAd
:super(childManager: TestRenderSliverBoxChildManager(children: <RenderBox>[]));
@override
// ignore: unnecessary_overrides
int getMaxChildIndexForScrollOffset(double scrollOffset, double itemExtent) {
return super.getMaxChildIndexForScrollOffset(scrollOffset, itemExtent);
}
......
......@@ -75,7 +75,6 @@ void main() {
return false;
});
// While ShiftLeft is held (the event of which was skipped), press keyA.
// ignore: prefer_const_declarations
final Map<String, dynamic> rawMessage = kIsWeb ? (
KeyEventSimulator.getKeyData(
LogicalKeyboardKey.keyA,
......
......@@ -1268,7 +1268,7 @@ void main() {
});
testWidgets('scheduleBuild while debugBuildingDirtyElements is true', (WidgetTester tester) async {
/// ignore here is required for testing purpose because changing the flag properly is hard
// ignore here is required for testing purpose because changing the flag properly is hard
// ignore: invalid_use_of_protected_member
tester.binding.debugBuildingDirtyElements = true;
late FlutterError error;
......
......@@ -62,7 +62,7 @@ void main() {
focusNode.requestFocus();
await tester.idle();
await tester.sendKeyEvent(LogicalKeyboardKey.metaLeft, platform: 'web'); // ignore: avoid_redundant_argument_values
await tester.sendKeyEvent(LogicalKeyboardKey.metaLeft, platform: 'web');
await tester.idle();
expect(events.length, 2);
......
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