Unverified Commit 58454e9e authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Remove dead code (#126266)

Dead code was flagged by `unreachable_from_main` lint, which is still experimental and not ready to be enabled yet.
parent 5b87e4fb
...@@ -74,9 +74,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -74,9 +74,7 @@ class _MyHomePageState extends State<MyHomePage> {
} }
abstract class DeltaMode { abstract class DeltaMode {
static const int kPixel = 0x00;
static const int kLine = 0x01; static const int kLine = 0x01;
static const int kPage = 0x02;
} }
void dispatchMouseWheelEvent(int mouseX, int mouseY, void dispatchMouseWheelEvent(int mouseX, int mouseY,
......
...@@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; ...@@ -8,7 +8,6 @@ import 'package:flutter/material.dart';
const Widget divider = SizedBox(height: 10); const Widget divider = SizedBox(height: 10);
const double narrowScreenWidthThreshold = 400; const double narrowScreenWidthThreshold = 400;
const double imageSize = 150;
void main() => runApp(DynamicColorExample()); void main() => runApp(DynamicColorExample());
......
...@@ -8,7 +8,6 @@ void main() => runApp(const MagnifierExampleApp()); ...@@ -8,7 +8,6 @@ void main() => runApp(const MagnifierExampleApp());
class MagnifierExampleApp extends StatefulWidget { class MagnifierExampleApp extends StatefulWidget {
const MagnifierExampleApp({super.key}); const MagnifierExampleApp({super.key});
static const Size loupeSize = Size(200, 200);
@override @override
State<MagnifierExampleApp> createState() => _MagnifierExampleAppState(); State<MagnifierExampleApp> createState() => _MagnifierExampleAppState();
......
...@@ -17,8 +17,6 @@ class TextMagnifierExampleApp extends StatelessWidget { ...@@ -17,8 +17,6 @@ class TextMagnifierExampleApp extends StatelessWidget {
final TextDirection textDirection; final TextDirection textDirection;
final String text; final String text;
static const Size loupeSize = Size(200, 200);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
......
...@@ -64,7 +64,7 @@ void main() { ...@@ -64,7 +64,7 @@ void main() {
); );
final List<PointerEvent> events = <PointerEvent>[]; final List<PointerEvent> events = <PointerEvent>[];
binding.onHandleEvent = events.add; TestGestureFlutterBinding.instance.onHandleEvent = events.add;
GestureBinding.instance.platformDispatcher.onPointerDataPacket?.call(packet); GestureBinding.instance.platformDispatcher.onPointerDataPacket?.call(packet);
expect(events.length, 2); expect(events.length, 2);
......
...@@ -14,8 +14,6 @@ class TestIntent extends Intent { ...@@ -14,8 +14,6 @@ class TestIntent extends Intent {
class TestAction extends Action<Intent> { class TestAction extends Action<Intent> {
TestAction(); TestAction();
static const LocalKey key = ValueKey<Type>(TestAction);
int calls = 0; int calls = 0;
@override @override
......
...@@ -51,17 +51,6 @@ class SwapperWithProperOverrides extends Swapper { ...@@ -51,17 +51,6 @@ class SwapperWithProperOverrides extends Swapper {
SwapperElement createElement() => SwapperElementWithProperOverrides(this); SwapperElement createElement() => SwapperElementWithProperOverrides(this);
} }
class SwapperWithNoOverrides extends Swapper {
const SwapperWithNoOverrides({
super.key,
super.stable,
super.swapper,
});
@override
SwapperElement createElement() => SwapperElementWithNoOverrides(this);
}
abstract class SwapperElement extends RenderObjectElement { abstract class SwapperElement extends RenderObjectElement {
SwapperElement(Swapper super.widget); SwapperElement(Swapper super.widget);
...@@ -147,10 +136,6 @@ class SwapperElementWithProperOverrides extends SwapperElement { ...@@ -147,10 +136,6 @@ class SwapperElementWithProperOverrides extends SwapperElement {
} }
} }
class SwapperElementWithNoOverrides extends SwapperElement {
SwapperElementWithNoOverrides(super.widget);
}
class RenderSwapper extends RenderBox { class RenderSwapper extends RenderBox {
RenderBox? _stable; RenderBox? _stable;
RenderBox? get stable => _stable; RenderBox? get stable => _stable;
......
...@@ -1909,8 +1909,6 @@ class TestAction extends CallbackAction<Intent> { ...@@ -1909,8 +1909,6 @@ class TestAction extends CallbackAction<Intent> {
TestAction({ TestAction({
required super.onInvoke, required super.onInvoke,
}); });
static const LocalKey key = ValueKey<Type>(TestAction);
} }
/// An activator that accepts down events that has [key] as the logical key. /// An activator that accepts down events that has [key] as the logical key.
......
...@@ -2,14 +2,10 @@ ...@@ -2,14 +2,10 @@
// 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.
import 'dart:io';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
final String rootDirectoryPath = Directory.current.path;
void main() { void main() {
for (final String language in kWidgetsSupportedLanguages) { for (final String language in kWidgetsSupportedLanguages) {
testWidgets('translations exist for $language', (WidgetTester tester) async { testWidgets('translations exist for $language', (WidgetTester tester) async {
......
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