From bdbe53be01e3c7d2f650617db312787f3e229fb9 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 24 Nov 2017 19:13:18 -0800 Subject: [PATCH] remove unused constants (#13199) --- dev/manual_tests/lib/color_testing_demo.dart | 2 -- examples/flutter_gallery/lib/demo/animation/sections.dart | 1 - packages/flutter/lib/src/cupertino/slider.dart | 1 - packages/flutter/lib/src/material/bottom_navigation_bar.dart | 2 -- packages/flutter/lib/src/material/bottom_sheet.dart | 2 -- packages/flutter/lib/src/material/checkbox.dart | 1 - packages/flutter/lib/src/material/material.dart | 2 -- packages/flutter/lib/src/material/snack_bar.dart | 2 -- packages/flutter/lib/src/material/tabs.dart | 1 - packages/flutter/lib/src/material/text_field.dart | 3 --- packages/flutter/lib/src/rendering/editable.dart | 2 -- packages/flutter_test/lib/src/test_text_input.dart | 2 -- 12 files changed, 21 deletions(-) diff --git a/dev/manual_tests/lib/color_testing_demo.dart b/dev/manual_tests/lib/color_testing_demo.dart index 89a58c275c7..dc492fbd611 100644 --- a/dev/manual_tests/lib/color_testing_demo.dart +++ b/dev/manual_tests/lib/color_testing_demo.dart @@ -14,8 +14,6 @@ class ColorTestingDemo extends StatelessWidget { Widget build(BuildContext context) => new ColorDemoHome(); } -const double _kPageMaxWidth = 500.0; - class ColorDemoHome extends StatelessWidget { @override Widget build(BuildContext context) { diff --git a/examples/flutter_gallery/lib/demo/animation/sections.dart b/examples/flutter_gallery/lib/demo/animation/sections.dart index 5c194ffe91b..a57d4554f01 100644 --- a/examples/flutter_gallery/lib/demo/animation/sections.dart +++ b/examples/flutter_gallery/lib/demo/animation/sections.dart @@ -10,7 +10,6 @@ const Color _mariner = const Color(0xFF3B5F8F); const Color _mediumPurple = const Color(0xFF8266D4); const Color _tomato = const Color(0xFFF95B57); const Color _mySin = const Color(0xFFF3A646); -const Color _deepCerise = const Color(0xFFD93F9B); const String _kGalleryAssetsPackage = 'flutter_gallery_assets'; diff --git a/packages/flutter/lib/src/cupertino/slider.dart b/packages/flutter/lib/src/cupertino/slider.dart index a331f6afa1f..92f5db48993 100644 --- a/packages/flutter/lib/src/cupertino/slider.dart +++ b/packages/flutter/lib/src/cupertino/slider.dart @@ -179,7 +179,6 @@ class _CupertinoSliderRenderObjectWidget extends LeafRenderObjectWidget { } const double _kPadding = 8.0; -const double _kTrackHeight = 2.0; const Color _kTrackColor = const Color(0xFFB5B5B5); const double _kSliderHeight = 2.0 * (CupertinoThumbPainter.radius + _kPadding); const double _kSliderWidth = 176.0; // Matches Material Design slider. diff --git a/packages/flutter/lib/src/material/bottom_navigation_bar.dart b/packages/flutter/lib/src/material/bottom_navigation_bar.dart index 805f97eaffb..f9aeb39fbc4 100644 --- a/packages/flutter/lib/src/material/bottom_navigation_bar.dart +++ b/packages/flutter/lib/src/material/bottom_navigation_bar.dart @@ -16,8 +16,6 @@ import 'material.dart'; import 'theme.dart'; import 'typography.dart'; -const double _kActiveMaxWidth = 168.0; -const double _kInactiveMaxWidth = 96.0; const double _kActiveFontSize = 14.0; const double _kInactiveFontSize = 12.0; const double _kTopMargin = 6.0; diff --git a/packages/flutter/lib/src/material/bottom_sheet.dart b/packages/flutter/lib/src/material/bottom_sheet.dart index f5a0fa6150f..ba233551cb5 100644 --- a/packages/flutter/lib/src/material/bottom_sheet.dart +++ b/packages/flutter/lib/src/material/bottom_sheet.dart @@ -14,8 +14,6 @@ import 'theme.dart'; const Duration _kBottomSheetDuration = const Duration(milliseconds: 200); const double _kMinFlingVelocity = 700.0; const double _kCloseProgressThreshold = 0.5; -const Color _kTransparent = const Color(0x00000000); -const Color _kBarrierColor = Colors.black54; /// A material design bottom sheet. /// diff --git a/packages/flutter/lib/src/material/checkbox.dart b/packages/flutter/lib/src/material/checkbox.dart index db7f88fb294..5f65e0c8c0e 100644 --- a/packages/flutter/lib/src/material/checkbox.dart +++ b/packages/flutter/lib/src/material/checkbox.dart @@ -151,7 +151,6 @@ class _CheckboxRenderObjectWidget extends LeafRenderObjectWidget { } } -const double _kMidpoint = 0.5; const double _kEdgeSize = Checkbox.width; const Radius _kEdgeRadius = const Radius.circular(1.0); const double _kStrokeWidth = 2.0; diff --git a/packages/flutter/lib/src/material/material.dart b/packages/flutter/lib/src/material/material.dart index 24d5aa56a71..f79bf36bf58 100644 --- a/packages/flutter/lib/src/material/material.dart +++ b/packages/flutter/lib/src/material/material.dart @@ -277,8 +277,6 @@ class _MaterialState extends State with TickerProviderStateMixin { } } -const Duration _kHighlightFadeDuration = const Duration(milliseconds: 200); - class _RenderInkFeatures extends RenderProxyBox implements MaterialInkController { _RenderInkFeatures({ RenderBox child, diff --git a/packages/flutter/lib/src/material/snack_bar.dart b/packages/flutter/lib/src/material/snack_bar.dart index c0a98bf4a41..119956574e6 100644 --- a/packages/flutter/lib/src/material/snack_bar.dart +++ b/packages/flutter/lib/src/material/snack_bar.dart @@ -15,8 +15,6 @@ import 'theme_data.dart'; // https://material.google.com/components/snackbars-toasts.html#snackbars-toasts-specs const double _kSnackBarPadding = 24.0; const double _kSingleLineVerticalPadding = 14.0; -const double _kMultiLineVerticalTopPadding = 24.0; -const double _kMultiLineVerticalSpaceBetweenTextAndButtons = 10.0; const Color _kSnackBackground = const Color(0xFF323232); // TODO(ianh): We should check if the given text and actions are going to fit on diff --git a/packages/flutter/lib/src/material/tabs.dart b/packages/flutter/lib/src/material/tabs.dart index ebe1e3c174d..5e13e1097d5 100644 --- a/packages/flutter/lib/src/material/tabs.dart +++ b/packages/flutter/lib/src/material/tabs.dart @@ -22,7 +22,6 @@ import 'theme.dart'; const double _kTabHeight = 46.0; const double _kTextAndIconTabHeight = 72.0; const double _kMinTabWidth = 72.0; -const double _kMaxTabWidth = 264.0; /// A material design [TabBar] tab. If both [icon] and [text] are /// provided, the text is displayed below the icon. diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index dcda8431e8b..12f5d2992d3 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -14,9 +14,6 @@ import 'theme.dart'; export 'package:flutter/services.dart' show TextInputType; -const Duration _kTransitionDuration = const Duration(milliseconds: 200); -const Curve _kTransitionCurve = Curves.fastOutSlowIn; - /// A material design text field. /// /// A text field lets the user enter text, either with hardware keyboard or with diff --git a/packages/flutter/lib/src/rendering/editable.dart b/packages/flutter/lib/src/rendering/editable.dart index 61930b389b1..7e3d7fb843c 100644 --- a/packages/flutter/lib/src/rendering/editable.dart +++ b/packages/flutter/lib/src/rendering/editable.dart @@ -18,8 +18,6 @@ const double _kCaretGap = 1.0; // pixels const double _kCaretHeightOffset = 2.0; // pixels const double _kCaretWidth = 1.0; // pixels -final String _kZeroWidthSpace = new String.fromCharCode(0x200B); - /// Signature for the callback that reports when the user changes the selection /// (including the cursor location). /// diff --git a/packages/flutter_test/lib/src/test_text_input.dart b/packages/flutter_test/lib/src/test_text_input.dart index 353180c8e1a..065264de75c 100644 --- a/packages/flutter_test/lib/src/test_text_input.dart +++ b/packages/flutter_test/lib/src/test_text_input.dart @@ -9,8 +9,6 @@ import 'package:flutter/services.dart'; import 'widget_tester.dart'; -const String _kTextInputClientChannel = 'flutter/textinputclient'; - /// A testing stub for the system's onscreen keyboard. /// /// Typical app tests will not need to use this class directly.