Skip to content

Commit 58454e9

Browse files
authored
Remove dead code (#126266)
Dead code was flagged by `unreachable_from_main` lint, which is still experimental and not ready to be enabled yet.
1 parent 5b87e4f commit 58454e9

File tree

9 files changed

+1
-30
lines changed

9 files changed

+1
-30
lines changed

dev/integration_tests/web_e2e_tests/lib/scroll_wheel_main.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ class _MyHomePageState extends State<MyHomePage> {
7474
}
7575

7676
abstract class DeltaMode {
77-
static const int kPixel = 0x00;
7877
static const int kLine = 0x01;
79-
static const int kPage = 0x02;
8078
}
8179

8280
void dispatchMouseWheelEvent(int mouseX, int mouseY,

examples/api/lib/material/color_scheme/dynamic_content_color.0.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:flutter/material.dart';
88
99
const Widget divider = SizedBox(height: 10);
1010
const double narrowScreenWidthThreshold = 400;
11-
const double imageSize = 150;
1211

1312
void main() => runApp(DynamicColorExample());
1413

examples/api/lib/widgets/magnifier/magnifier.0.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ void main() => runApp(const MagnifierExampleApp());
88

99
class MagnifierExampleApp extends StatefulWidget {
1010
const MagnifierExampleApp({super.key});
11-
static const Size loupeSize = Size(200, 200);
1211

1312
@override
1413
State<MagnifierExampleApp> createState() => _MagnifierExampleAppState();

examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class TextMagnifierExampleApp extends StatelessWidget {
1717
final TextDirection textDirection;
1818
final String text;
1919

20-
static const Size loupeSize = Size(200, 200);
21-
2220
@override
2321
Widget build(BuildContext context) {
2422
return MaterialApp(

packages/flutter/test/gestures/gesture_binding_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void main() {
6464
);
6565

6666
final List<PointerEvent> events = <PointerEvent>[];
67-
binding.onHandleEvent = events.add;
67+
TestGestureFlutterBinding.instance.onHandleEvent = events.add;
6868

6969
GestureBinding.instance.platformDispatcher.onPointerDataPacket?.call(packet);
7070
expect(events.length, 2);

packages/flutter/test/widgets/app_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class TestIntent extends Intent {
1414
class TestAction extends Action<Intent> {
1515
TestAction();
1616

17-
static const LocalKey key = ValueKey<Type>(TestAction);
18-
1917
int calls = 0;
2018

2119
@override

packages/flutter/test/widgets/render_object_element_test.dart

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ class SwapperWithProperOverrides extends Swapper {
5151
SwapperElement createElement() => SwapperElementWithProperOverrides(this);
5252
}
5353

54-
class SwapperWithNoOverrides extends Swapper {
55-
const SwapperWithNoOverrides({
56-
super.key,
57-
super.stable,
58-
super.swapper,
59-
});
60-
61-
@override
62-
SwapperElement createElement() => SwapperElementWithNoOverrides(this);
63-
}
64-
6554
abstract class SwapperElement extends RenderObjectElement {
6655
SwapperElement(Swapper super.widget);
6756

@@ -147,10 +136,6 @@ class SwapperElementWithProperOverrides extends SwapperElement {
147136
}
148137
}
149138

150-
class SwapperElementWithNoOverrides extends SwapperElement {
151-
SwapperElementWithNoOverrides(super.widget);
152-
}
153-
154139
class RenderSwapper extends RenderBox {
155140
RenderBox? _stable;
156141
RenderBox? get stable => _stable;

packages/flutter/test/widgets/shortcuts_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,8 +1909,6 @@ class TestAction extends CallbackAction<Intent> {
19091909
TestAction({
19101910
required super.onInvoke,
19111911
});
1912-
1913-
static const LocalKey key = ValueKey<Type>(TestAction);
19141912
}
19151913

19161914
/// An activator that accepts down events that has [key] as the logical key.

packages/flutter_localizations/test/widgets/translations_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:io';
6-
75
import 'package:flutter/widgets.dart';
86
import 'package:flutter_localizations/flutter_localizations.dart';
97
import 'package:flutter_test/flutter_test.dart';
108

11-
final String rootDirectoryPath = Directory.current.path;
12-
139
void main() {
1410
for (final String language in kWidgetsSupportedLanguages) {
1511
testWidgets('translations exist for $language', (WidgetTester tester) async {

0 commit comments

Comments
 (0)