Skip to content

Commit efbde44

Browse files
authored
Clean up ignores that are not ignoring anything (flutter#78484)
1 parent 51dbc76 commit efbde44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+50
-106
lines changed

packages/flutter/lib/src/animation/curves.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,6 @@ class ElasticInOutCurve extends Curve {
13041304
class Curves {
13051305
// This class is not meant to be instatiated or extended; this constructor
13061306
// prevents instantiation and extension.
1307-
// ignore: unused_element
13081307
Curves._();
13091308

13101309
/// A linear animation curve.

packages/flutter/lib/src/cupertino/colors.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import 'theme.dart';
2020
class CupertinoColors {
2121
// This class is not meant to be instantiated or extended; this constructor
2222
// prevents instantiation and extension.
23-
// ignore: unused_element
2423
CupertinoColors._();
2524

2625
/// iOS 13's default blue color. Used to indicate active elements such as

packages/flutter/lib/src/cupertino/icons.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import 'package:flutter/widgets.dart';
3333
class CupertinoIcons {
3434
// This class is not meant to be instantiated or extended; this constructor
3535
// prevents instantiation and extension.
36-
// ignore: unused_element
3736
CupertinoIcons._();
3837

3938
/// The icon font used for Cupertino icons.

packages/flutter/lib/src/cupertino/route.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,7 @@ mixin CupertinoRouteTransitionMixin<T> on PageRoute<T> {
211211
child: child,
212212
);
213213
assert(() {
214-
// `child` has a non-nullable return type, but might be null when
215-
// running with weak checking, so we need to null check it anyway (and
216-
// ignore the warning that the null-handling logic is dead code).
217-
if (child == null) { // ignore: dead_code
214+
if (child == null) {
218215
throw FlutterError.fromParts(<DiagnosticsNode>[
219216
ErrorSummary('The builder for route "${settings.name}" returned null.'),
220217
ErrorDescription('Route builders must never return null.'),

packages/flutter/lib/src/cupertino/text_selection_toolbar.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,7 @@ class _CupertinoTextSelectionToolbarContent extends StatefulWidget {
358358
required this.toolbarBuilder,
359359
required this.children,
360360
}) : assert(children != null),
361-
// This ignore is used because .isNotEmpty isn't compatible with const.
362-
assert(children.length > 0), // ignore: prefer_is_empty
361+
assert(children.length > 0),
363362
super(key: key);
364363

365364
final Offset anchor;

packages/flutter/lib/src/foundation/isolates.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,4 @@ typedef _ComputeImpl = Future<R> Function<Q, R>(ComputeCallback<Q, R> callback,
4444
///
4545
/// The `debugLabel` argument can be specified to provide a name to add to the
4646
/// [Timeline]. This is useful when profiling an application.
47-
// Remove when https://github.com/dart-lang/sdk/issues/37149 is fixed.
48-
// ignore: prefer_const_declarations
49-
final _ComputeImpl compute = _isolates.compute;
47+
const _ComputeImpl compute = _isolates.compute;

packages/flutter/lib/src/foundation/licenses.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ class LicenseEntryWithLineBreaks extends LicenseEntry {
288288
class LicenseRegistry {
289289
// This class is not meant to be instantiated or extended; this constructor
290290
// prevents instantiation and extension.
291-
// ignore: unused_element
292291
LicenseRegistry._();
293292

294293
static List<LicenseEntryCollector>? _collectors;

packages/flutter/lib/src/foundation/unicode.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
class Unicode {
1414
// This class is not meant to be instantiated or extended; this constructor
1515
// prevents instantiation and extension.
16-
// ignore: unused_element
1716
Unicode._();
1817
/// `U+202A LEFT-TO-RIGHT EMBEDDING`
1918
///

packages/flutter/lib/src/gestures/converter.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ int _synthesiseDownButtons(int buttons, PointerDeviceKind kind) {
3535
class PointerEventConverter {
3636
// This class is not meant to be instantiated or extended; this constructor
3737
// prevents instantiation and extension.
38-
// ignore: unused_element
3938
PointerEventConverter._();
4039

4140
/// Expand the given packet of pointer data into a sequence of framework

packages/flutter/lib/src/material/chip.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const Icon _kDefaultDeleteIcon = Icon(Icons.cancel, size: _kDeleteIconSize);
6262
abstract class ChipAttributes {
6363
// This class is intended to be used as an interface, and should not be
6464
// extended directly; this constructor prevents instantiation and extension.
65-
// ignore: unused_element
6665
ChipAttributes._();
6766

6867
/// The primary content of the chip.
@@ -203,7 +202,6 @@ abstract class ChipAttributes {
203202
abstract class DeletableChipAttributes {
204203
// This class is intended to be used as an interface, and should not be
205204
// extended directly; this constructor prevents instantiation and extension.
206-
// ignore: unused_element
207205
DeletableChipAttributes._();
208206

209207
/// The icon displayed when [onDeleted] is set.
@@ -315,7 +313,6 @@ abstract class DeletableChipAttributes {
315313
abstract class CheckmarkableChipAttributes {
316314
// This class is intended to be used as an interface, and should not be
317315
// extended directly; this constructor prevents instantiation and extension.
318-
// ignore: unused_element
319316
CheckmarkableChipAttributes._();
320317

321318
/// Whether or not to show a check mark when
@@ -351,7 +348,6 @@ abstract class CheckmarkableChipAttributes {
351348
abstract class SelectableChipAttributes {
352349
// This class is intended to be used as an interface, and should not be
353350
// extended directly; this constructor prevents instantiation and extension.
354-
// ignore: unused_element
355351
SelectableChipAttributes._();
356352

357353
/// Whether or not this chip is selected.
@@ -462,7 +458,6 @@ abstract class SelectableChipAttributes {
462458
abstract class DisabledChipAttributes {
463459
// This class is intended to be used as an interface, and should not be
464460
// extended directly; this constructor prevents instantiation and extension.
465-
// ignore: unused_element
466461
DisabledChipAttributes._();
467462

468463
/// Whether or not this chip is enabled for input.
@@ -510,7 +505,6 @@ abstract class DisabledChipAttributes {
510505
abstract class TappableChipAttributes {
511506
// This class is intended to be used as an interface, and should not be
512507
// extended directly; this constructor prevents instantiation and extension.
513-
// ignore: unused_element
514508
TappableChipAttributes._();
515509

516510
/// Called when the user taps the chip.

0 commit comments

Comments
 (0)