diff --git a/analysis_options.yaml b/analysis_options.yaml index c884b4afffc..6680f5c4f65 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -94,6 +94,7 @@ linter: # - cascade_invocations # doesn't match the typical style of this repo - cast_nullable_to_non_nullable # - close_sinks # not reliable enough + - combinators_ordering # - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142 # - conditional_uri_does_not_exist # not yet tested # - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204 @@ -103,6 +104,7 @@ linter: - deprecated_consistency # - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib) - directives_ordering + # - discarded_futures # not yet tested # - do_not_use_environment # there are appropriate times to use the environment, especially in our tests and build logic - empty_catches - empty_constructor_bodies @@ -113,7 +115,6 @@ linter: - flutter_style_todos - hash_and_equals - implementation_imports - # - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811 - iterable_contains_unrelated_type # - join_return_with_assignment # not required by flutter style - leading_newlines_in_multiline_strings @@ -211,6 +212,7 @@ linter: - unnecessary_late - unnecessary_new - unnecessary_null_aware_assignments + - unnecessary_null_aware_operator_on_extension_on_nullable - unnecessary_null_checks - unnecessary_null_in_if_null_operators - unnecessary_nullable_for_final_variable_declarations @@ -221,6 +223,7 @@ linter: - unnecessary_string_escapes - unnecessary_string_interpolations - unnecessary_this + - unnecessary_to_list_in_spreads - unrelated_type_equality_checks - unsafe_html - use_build_context_synchronously diff --git a/dev/benchmarks/test_apps/stocks/lib/main.dart b/dev/benchmarks/test_apps/stocks/lib/main.dart index e2334f76302..8128be0dc6a 100644 --- a/dev/benchmarks/test_apps/stocks/lib/main.dart +++ b/dev/benchmarks/test_apps/stocks/lib/main.dart @@ -6,10 +6,10 @@ library stocks; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart' show - debugPaintSizeEnabled, debugPaintBaselinesEnabled, debugPaintLayerBordersEnabled, debugPaintPointersEnabled, + debugPaintSizeEnabled, debugRepaintRainbowEnabled; import 'i18n/stock_strings.dart'; diff --git a/dev/benchmarks/test_apps/stocks/lib/stock_home.dart b/dev/benchmarks/test_apps/stocks/lib/stock_home.dart index 72f8f67b5d2..197db62964e 100644 --- a/dev/benchmarks/test_apps/stocks/lib/stock_home.dart +++ b/dev/benchmarks/test_apps/stocks/lib/stock_home.dart @@ -4,7 +4,7 @@ import 'package:flutter/gestures.dart' show DragStartBehavior; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart' show debugDumpRenderTree, debugDumpLayerTree, debugDumpSemanticsTree, DebugSemanticsDumpOrder; +import 'package:flutter/rendering.dart' show DebugSemanticsDumpOrder, debugDumpLayerTree, debugDumpRenderTree, debugDumpSemanticsTree; import 'package:flutter/scheduler.dart' show timeDilation; import 'i18n/stock_strings.dart'; diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index 8e4cb813407..fdd07a945aa 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart @@ -12,7 +12,7 @@ import 'package:crypto/crypto.dart'; import 'package:crypto/src/digest_sink.dart'; import 'package:http/http.dart' as http; import 'package:path/path.dart' as path; -import 'package:platform/platform.dart' show Platform, LocalPlatform; +import 'package:platform/platform.dart' show LocalPlatform, Platform; import 'package:process/process.dart'; const String gobMirror = diff --git a/dev/bots/unpublish_package.dart b/dev/bots/unpublish_package.dart index 92ecf117163..b8c79bc27b8 100644 --- a/dev/bots/unpublish_package.dart +++ b/dev/bots/unpublish_package.dart @@ -17,7 +17,7 @@ import 'dart:io' hide Platform; import 'package:args/args.dart'; import 'package:path/path.dart' as path; -import 'package:platform/platform.dart' show Platform, LocalPlatform; +import 'package:platform/platform.dart' show LocalPlatform, Platform; import 'package:process/process.dart'; const String gsBase = 'gs://flutter_infra_release'; diff --git a/dev/devicelab/lib/framework/browser.dart b/dev/devicelab/lib/framework/browser.dart index 293a3e4469b..03de1085e75 100644 --- a/dev/devicelab/lib/framework/browser.dart +++ b/dev/devicelab/lib/framework/browser.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:convert' show json, utf8, LineSplitter, JsonEncoder; +import 'dart:convert' show JsonEncoder, LineSplitter, json, utf8; import 'dart:io' as io; import 'dart:math' as math; diff --git a/dev/devicelab/lib/tasks/entrypoint_dart_registrant.dart b/dev/devicelab/lib/tasks/entrypoint_dart_registrant.dart index a597b0f9c63..d9a1f3ea8cc 100644 --- a/dev/devicelab/lib/tasks/entrypoint_dart_registrant.dart +++ b/dev/devicelab/lib/tasks/entrypoint_dart_registrant.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io' show Process, ProcessSignal, Directory, File; +import 'dart:io' show Directory, File, Process, ProcessSignal; import '../framework/devices.dart'; import '../framework/framework.dart'; diff --git a/dev/devicelab/lib/tasks/platform_channels_benchmarks.dart b/dev/devicelab/lib/tasks/platform_channels_benchmarks.dart index 48d233c4020..5884297eda4 100644 --- a/dev/devicelab/lib/tasks/platform_channels_benchmarks.dart +++ b/dev/devicelab/lib/tasks/platform_channels_benchmarks.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:io' show Process, Directory; +import 'dart:io' show Directory, Process; import 'package:path/path.dart' as path; diff --git a/dev/tools/examples_smoke_test.dart b/dev/tools/examples_smoke_test.dart index bf974e8550f..cfa2a5e0b07 100644 --- a/dev/tools/examples_smoke_test.dart +++ b/dev/tools/examples_smoke_test.dart @@ -9,7 +9,7 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io' show stdout, stderr, exitCode, Process, ProcessException; +import 'dart:io' show Process, ProcessException, exitCode, stderr, stdout; import 'package:file/file.dart'; import 'package:file/local.dart'; diff --git a/packages/flutter/lib/painting.dart b/packages/flutter/lib/painting.dart index ddd3aee58ce..572391a93d5 100644 --- a/packages/flutter/lib/painting.dart +++ b/packages/flutter/lib/painting.dart @@ -17,7 +17,7 @@ /// painting boxes. library painting; -export 'dart:ui' show Shadow, PlaceholderAlignment, TextHeightBehavior, TextLeadingDistribution; +export 'dart:ui' show PlaceholderAlignment, Shadow, TextHeightBehavior, TextLeadingDistribution; export 'src/painting/alignment.dart'; export 'src/painting/basic_types.dart'; diff --git a/packages/flutter/lib/rendering.dart b/packages/flutter/lib/rendering.dart index 2bda350eba1..b0029c160fc 100644 --- a/packages/flutter/lib/rendering.dart +++ b/packages/flutter/lib/rendering.dart @@ -22,11 +22,11 @@ library rendering; export 'package:flutter/foundation.dart' show - VoidCallback, + DiagnosticLevel, ValueChanged, ValueGetter, ValueSetter, - DiagnosticLevel; + VoidCallback; export 'package:flutter/semantics.dart'; export 'package:vector_math/vector_math_64.dart' show Matrix4; diff --git a/packages/flutter/lib/src/cupertino/colors.dart b/packages/flutter/lib/src/cupertino/colors.dart index 329a39d4bbd..41fe80ea0fd 100644 --- a/packages/flutter/lib/src/cupertino/colors.dart +++ b/packages/flutter/lib/src/cupertino/colors.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' show Color, Brightness; +import 'dart:ui' show Brightness, Color; import '../../foundation.dart'; import '../widgets/basic.dart'; diff --git a/packages/flutter/lib/src/cupertino/context_menu.dart b/packages/flutter/lib/src/cupertino/context_menu.dart index f74ab0b4642..9dc484033ee 100644 --- a/packages/flutter/lib/src/cupertino/context_menu.dart +++ b/packages/flutter/lib/src/cupertino/context_menu.dart @@ -6,7 +6,7 @@ import 'dart:math' as math; import 'dart:ui' as ui; import 'package:flutter/foundation.dart'; -import 'package:flutter/gestures.dart' show kMinFlingVelocity, kLongPressTimeout; +import 'package:flutter/gestures.dart' show kLongPressTimeout, kMinFlingVelocity; import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; diff --git a/packages/flutter/lib/src/cupertino/route.dart b/packages/flutter/lib/src/cupertino/route.dart index f7908506e9a..be5a629da37 100644 --- a/packages/flutter/lib/src/cupertino/route.dart +++ b/packages/flutter/lib/src/cupertino/route.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:math'; -import 'dart:ui' show lerpDouble, ImageFilter; +import 'dart:ui' show ImageFilter, lerpDouble; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/packages/flutter/lib/src/cupertino/search_field.dart b/packages/flutter/lib/src/cupertino/search_field.dart index 83c0a1e79cc..39920234f95 100644 --- a/packages/flutter/lib/src/cupertino/search_field.dart +++ b/packages/flutter/lib/src/cupertino/search_field.dart @@ -11,7 +11,7 @@ import 'icons.dart'; import 'localizations.dart'; import 'text_field.dart'; -export 'package:flutter/services.dart' show SmartQuotesType, SmartDashesType; +export 'package:flutter/services.dart' show SmartDashesType, SmartQuotesType; /// A [CupertinoTextField] that mimics the look and behavior of UIKit's /// `UISearchTextField`. diff --git a/packages/flutter/lib/src/cupertino/text_field.dart b/packages/flutter/lib/src/cupertino/text_field.dart index aeccd24d9f6..24e1c105e3f 100644 --- a/packages/flutter/lib/src/cupertino/text_field.dart +++ b/packages/flutter/lib/src/cupertino/text_field.dart @@ -16,7 +16,7 @@ import 'icons.dart'; import 'text_selection.dart'; import 'theme.dart'; -export 'package:flutter/services.dart' show TextInputType, TextInputAction, TextCapitalization, SmartQuotesType, SmartDashesType; +export 'package:flutter/services.dart' show SmartDashesType, SmartQuotesType, TextCapitalization, TextInputAction, TextInputType; const TextStyle _kDefaultPlaceholderStyle = TextStyle( fontWeight: FontWeight.w400, diff --git a/packages/flutter/lib/src/foundation/binding.dart b/packages/flutter/lib/src/foundation/binding.dart index f536b2daf3e..87e95965f45 100644 --- a/packages/flutter/lib/src/foundation/binding.dart +++ b/packages/flutter/lib/src/foundation/binding.dart @@ -5,7 +5,7 @@ import 'dart:convert' show json; import 'dart:developer' as developer; import 'dart:io' show exit; -import 'dart:ui' as ui show SingletonFlutterWindow, Brightness, PlatformDispatcher, window; +import 'dart:ui' as ui show Brightness, PlatformDispatcher, SingletonFlutterWindow, window; // Before adding any more dart:ui imports, please read the README. import 'package:meta/meta.dart'; diff --git a/packages/flutter/lib/src/gestures/converter.dart b/packages/flutter/lib/src/gestures/converter.dart index 1e00d68207b..1be9daa47c6 100644 --- a/packages/flutter/lib/src/gestures/converter.dart +++ b/packages/flutter/lib/src/gestures/converter.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. -import 'dart:ui' as ui show PointerData, PointerChange, PointerSignalKind; +import 'dart:ui' as ui show PointerChange, PointerData, PointerSignalKind; import 'events.dart'; diff --git a/packages/flutter/lib/src/material/about.dart b/packages/flutter/lib/src/material/about.dart index 4e377d31efe..01a406e74b0 100644 --- a/packages/flutter/lib/src/material/about.dart +++ b/packages/flutter/lib/src/material/about.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:developer' show Timeline, Flow; +import 'dart:developer' show Flow, Timeline; import 'dart:io' show Platform; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/lib/src/material/animated_icons.dart b/packages/flutter/lib/src/material/animated_icons.dart index 2f3c0ae5e13..659c66ba2c6 100644 --- a/packages/flutter/lib/src/material/animated_icons.dart +++ b/packages/flutter/lib/src/material/animated_icons.dart @@ -6,7 +6,7 @@ library material_animated_icons; import 'dart:math' as math show pi; -import 'dart:ui' as ui show Paint, Path, Canvas; +import 'dart:ui' as ui show Canvas, Paint, Path; import 'dart:ui' show lerpDouble; import 'package:flutter/foundation.dart' show clampDouble; diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index 159f4f5cca6..e4b90e0540a 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -21,7 +21,7 @@ import 'selectable_text.dart' show iOSHorizontalOffset; import 'text_selection.dart'; import 'theme.dart'; -export 'package:flutter/services.dart' show TextInputType, TextInputAction, TextCapitalization, SmartQuotesType, SmartDashesType; +export 'package:flutter/services.dart' show SmartDashesType, SmartQuotesType, TextCapitalization, TextInputAction, TextInputType; /// Signature for the [TextField.buildCounter] callback. typedef InputCounterWidgetBuilder = Widget? Function( diff --git a/packages/flutter/lib/src/material/text_form_field.dart b/packages/flutter/lib/src/material/text_form_field.dart index a5332af0419..bf6d9563f18 100644 --- a/packages/flutter/lib/src/material/text_form_field.dart +++ b/packages/flutter/lib/src/material/text_form_field.dart @@ -9,7 +9,7 @@ import 'input_decorator.dart'; import 'text_field.dart'; import 'theme.dart'; -export 'package:flutter/services.dart' show SmartQuotesType, SmartDashesType; +export 'package:flutter/services.dart' show SmartDashesType, SmartQuotesType; /// A [FormField] that contains a [TextField]. /// diff --git a/packages/flutter/lib/src/painting/basic_types.dart b/packages/flutter/lib/src/painting/basic_types.dart index eac98937b5f..02933428b55 100644 --- a/packages/flutter/lib/src/painting/basic_types.dart +++ b/packages/flutter/lib/src/painting/basic_types.dart @@ -23,9 +23,9 @@ export 'dart:ui' show Path, PathFillType, PathOperation, - Radius, RRect, RSTransform, + Radius, Rect, Shader, Size, @@ -43,8 +43,8 @@ export 'dart:ui' show VertexMode, // TODO(werainkhatri): remove these after their deprecation period in engine // https://github.com/flutter/flutter/pull/99505 - hashValues, // ignore: deprecated_member_use - hashList; // ignore: deprecated_member_use + hashList, // ignore: deprecated_member_use + hashValues; // ignore: deprecated_member_use export 'package:flutter/foundation.dart' show VoidCallback; diff --git a/packages/flutter/lib/src/painting/binding.dart b/packages/flutter/lib/src/painting/binding.dart index b58460dee01..28b2b72eb58 100644 --- a/packages/flutter/lib/src/painting/binding.dart +++ b/packages/flutter/lib/src/painting/binding.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show instantiateImageCodec, instantiateImageCodecFromBuffer, Codec, ImmutableBuffer; +import 'dart:ui' as ui show Codec, ImmutableBuffer, instantiateImageCodec, instantiateImageCodecFromBuffer; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart' show ServicesBinding; diff --git a/packages/flutter/lib/src/painting/clip.dart b/packages/flutter/lib/src/painting/clip.dart index 87956f285be..45d36bf5c60 100644 --- a/packages/flutter/lib/src/painting/clip.dart +++ b/packages/flutter/lib/src/painting/clip.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' show Canvas, Clip, Path, Paint, Rect, RRect, VoidCallback; +import 'dart:ui' show Canvas, Clip, Paint, Path, RRect, Rect, VoidCallback; /// Clip utilities used by [PaintingContext]. abstract class ClipContext { diff --git a/packages/flutter/lib/src/painting/debug.dart b/packages/flutter/lib/src/painting/debug.dart index a1b6491c6a5..d158a0e0210 100644 --- a/packages/flutter/lib/src/painting/debug.dart +++ b/packages/flutter/lib/src/painting/debug.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:io'; -import 'dart:ui' show Size, Picture, Image; +import 'dart:ui' show Image, Picture, Size; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/lib/src/painting/edge_insets.dart b/packages/flutter/lib/src/painting/edge_insets.dart index 8072e659f3f..281f8c9da64 100644 --- a/packages/flutter/lib/src/painting/edge_insets.dart +++ b/packages/flutter/lib/src/painting/edge_insets.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show lerpDouble, WindowPadding; +import 'dart:ui' as ui show WindowPadding, lerpDouble; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/lib/src/painting/image_provider.dart b/packages/flutter/lib/src/painting/image_provider.dart index d47110bc7c7..ff0ca9ff55e 100644 --- a/packages/flutter/lib/src/painting/image_provider.dart +++ b/packages/flutter/lib/src/painting/image_provider.dart @@ -5,7 +5,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:ui' as ui show Codec, ImmutableBuffer; -import 'dart:ui' show Size, Locale, TextDirection; +import 'dart:ui' show Locale, Size, TextDirection; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; diff --git a/packages/flutter/lib/src/painting/image_stream.dart b/packages/flutter/lib/src/painting/image_stream.dart index c16963d02d7..1fee74b1494 100644 --- a/packages/flutter/lib/src/painting/image_stream.dart +++ b/packages/flutter/lib/src/painting/image_stream.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:ui' as ui show Image, Codec, FrameInfo; +import 'dart:ui' as ui show Codec, FrameInfo, Image; import 'package:flutter/foundation.dart'; import 'package:flutter/scheduler.dart'; diff --git a/packages/flutter/lib/src/painting/text_painter.dart b/packages/flutter/lib/src/painting/text_painter.dart index 2cbf171eb44..ebead4e5487 100644 --- a/packages/flutter/lib/src/painting/text_painter.dart +++ b/packages/flutter/lib/src/painting/text_painter.dart @@ -2,8 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:math' show min, max; -import 'dart:ui' as ui show Paragraph, ParagraphBuilder, ParagraphConstraints, ParagraphStyle, PlaceholderAlignment, LineMetrics, TextHeightBehavior, TextStyle, BoxHeightStyle, BoxWidthStyle; +import 'dart:math' show max, min; +import 'dart:ui' as ui show + BoxHeightStyle, + BoxWidthStyle, + LineMetrics, + Paragraph, + ParagraphBuilder, + ParagraphConstraints, + ParagraphStyle, + PlaceholderAlignment, + TextHeightBehavior, + TextStyle; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; diff --git a/packages/flutter/lib/src/painting/text_span.dart b/packages/flutter/lib/src/painting/text_span.dart index cd84097f694..9a3a220a96c 100644 --- a/packages/flutter/lib/src/painting/text_span.dart +++ b/packages/flutter/lib/src/painting/text_span.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show ParagraphBuilder, Locale, StringAttribute, LocaleStringAttribute, SpellOutStringAttribute; +import 'dart:ui' as ui show Locale, LocaleStringAttribute, ParagraphBuilder, SpellOutStringAttribute, StringAttribute; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index 862e87268c4..731769e197c 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -2,7 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show ParagraphStyle, TextStyle, StrutStyle, lerpDouble, Shadow, FontFeature, FontVariation, TextHeightBehavior, TextLeadingDistribution; +import 'dart:ui' as ui show + FontFeature, + FontVariation, + ParagraphStyle, + Shadow, + StrutStyle, + TextHeightBehavior, + TextLeadingDistribution, + TextStyle, + lerpDouble; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/lib/src/rendering/editable.dart b/packages/flutter/lib/src/rendering/editable.dart index 9cc430ef462..d13844ddca4 100644 --- a/packages/flutter/lib/src/rendering/editable.dart +++ b/packages/flutter/lib/src/rendering/editable.dart @@ -4,7 +4,7 @@ import 'dart:collection'; import 'dart:math' as math; -import 'dart:ui' as ui show TextBox, BoxHeightStyle, BoxWidthStyle, PlaceholderAlignment, LineMetrics; +import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle, LineMetrics, PlaceholderAlignment, TextBox; import 'package:characters/characters.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index fd32cbf5522..7f9dda15a55 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -14,7 +14,20 @@ import 'package:flutter/semantics.dart'; import 'debug.dart'; import 'layer.dart'; -export 'package:flutter/foundation.dart' show FlutterError, InformationCollector, DiagnosticsNode, ErrorSummary, ErrorDescription, ErrorHint, DiagnosticsProperty, StringProperty, DoubleProperty, EnumProperty, FlagProperty, IntProperty, DiagnosticPropertiesBuilder; +export 'package:flutter/foundation.dart' show + DiagnosticPropertiesBuilder, + DiagnosticsNode, + DiagnosticsProperty, + DoubleProperty, + EnumProperty, + ErrorDescription, + ErrorHint, + ErrorSummary, + FlagProperty, + FlutterError, + InformationCollector, + IntProperty, + StringProperty; export 'package:flutter/gestures.dart' show HitTestEntry, HitTestResult; export 'package:flutter/painting.dart'; diff --git a/packages/flutter/lib/src/rendering/paragraph.dart b/packages/flutter/lib/src/rendering/paragraph.dart index fdd3f360a7d..74d4fe14cb8 100644 --- a/packages/flutter/lib/src/rendering/paragraph.dart +++ b/packages/flutter/lib/src/rendering/paragraph.dart @@ -4,7 +4,7 @@ import 'dart:collection'; import 'dart:math' as math; -import 'dart:ui' as ui show Gradient, Shader, TextBox, PlaceholderAlignment, TextHeightBehavior, BoxHeightStyle, BoxWidthStyle; +import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle, Gradient, PlaceholderAlignment, Shader, TextBox, TextHeightBehavior; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index a5107bbd575..3b3bf472509 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show ImageFilter, Gradient, Image, Color; +import 'dart:ui' as ui show Color, Gradient, Image, ImageFilter; import 'package:flutter/animation.dart'; import 'package:flutter/foundation.dart'; @@ -16,11 +16,11 @@ import 'layout_helper.dart'; import 'object.dart'; export 'package:flutter/gestures.dart' show - PointerEvent, + PointerCancelEvent, PointerDownEvent, + PointerEvent, PointerMoveEvent, - PointerUpEvent, - PointerCancelEvent; + PointerUpEvent; /// A base class for render boxes that resemble their children. /// diff --git a/packages/flutter/lib/src/rendering/view.dart b/packages/flutter/lib/src/rendering/view.dart index e3a86b871a3..ff939fb65b2 100644 --- a/packages/flutter/lib/src/rendering/view.dart +++ b/packages/flutter/lib/src/rendering/view.dart @@ -4,7 +4,7 @@ import 'dart:developer'; import 'dart:io' show Platform; -import 'dart:ui' as ui show Scene, SceneBuilder, FlutterView; +import 'dart:ui' as ui show FlutterView, Scene, SceneBuilder; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; diff --git a/packages/flutter/lib/src/scheduler/binding.dart b/packages/flutter/lib/src/scheduler/binding.dart index 67955033d23..41dce5f7ff8 100644 --- a/packages/flutter/lib/src/scheduler/binding.dart +++ b/packages/flutter/lib/src/scheduler/binding.dart @@ -5,9 +5,9 @@ import 'dart:async'; import 'dart:collection'; import 'dart:developer' show Flow, Timeline, TimelineTask; -import 'dart:ui' show AppLifecycleState, FramePhase, FrameTiming, TimingsCallback, PlatformDispatcher; +import 'dart:ui' show AppLifecycleState, FramePhase, FrameTiming, PlatformDispatcher, TimingsCallback; -import 'package:collection/collection.dart' show PriorityQueue, HeapPriorityQueue; +import 'package:collection/collection.dart' show HeapPriorityQueue, PriorityQueue; import 'package:flutter/foundation.dart'; import 'debug.dart'; diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index bc20e0aaf2c..47fd86e7033 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -4,8 +4,7 @@ import 'dart:math' as math; import 'dart:ui' as ui; -import 'dart:ui' show Offset, Rect, SemanticsAction, SemanticsFlag, - TextDirection, StringAttribute; +import 'dart:ui' show Offset, Rect, SemanticsAction, SemanticsFlag, StringAttribute, TextDirection; import 'package:flutter/foundation.dart'; import 'package:flutter/painting.dart' show MatrixUtils, TransformProperty; diff --git a/packages/flutter/lib/src/services/hardware_keyboard.dart b/packages/flutter/lib/src/services/hardware_keyboard.dart index 493b4ed66e0..347ce9e94ec 100644 --- a/packages/flutter/lib/src/services/hardware_keyboard.dart +++ b/packages/flutter/lib/src/services/hardware_keyboard.dart @@ -14,7 +14,7 @@ export 'dart:ui' show KeyData; export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder; export 'keyboard_key.g.dart' show LogicalKeyboardKey, PhysicalKeyboardKey; -export 'raw_keyboard.dart' show RawKeyboard, RawKeyEvent; +export 'raw_keyboard.dart' show RawKeyEvent, RawKeyboard; /// Represents a lock mode of a keyboard, such as [KeyboardLockMode.capsLock]. /// diff --git a/packages/flutter/lib/src/services/text_input.dart b/packages/flutter/lib/src/services/text_input.dart index 894b6df5516..8710c8beab8 100644 --- a/packages/flutter/lib/src/services/text_input.dart +++ b/packages/flutter/lib/src/services/text_input.dart @@ -7,8 +7,8 @@ import 'dart:io' show Platform; import 'dart:ui' show FontWeight, Offset, - Size, Rect, + Size, TextAlign, TextDirection; diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index a4dc273626a..61377144017 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -26,8 +26,8 @@ export 'package:flutter/foundation.dart' show ValueNotifier; export 'package:flutter/painting.dart'; export 'package:flutter/rendering.dart' show - AlignmentTween, AlignmentGeometryTween, + AlignmentTween, Axis, BoxConstraints, BoxConstraintsTransform, @@ -45,7 +45,6 @@ export 'package:flutter/rendering.dart' show MainAxisAlignment, MainAxisSize, MouseCursor, - SystemMouseCursors, MultiChildLayoutDelegate, PaintingContext, PointerCancelEvent, @@ -63,6 +62,7 @@ export 'package:flutter/rendering.dart' show ShapeBorderClipper, SingleChildLayoutDelegate, StackFit, + SystemMouseCursors, TextOverflow, ValueChanged, ValueGetter, diff --git a/packages/flutter/lib/src/widgets/binding.dart b/packages/flutter/lib/src/widgets/binding.dart index c6b537bed44..a0c9a9cfff3 100644 --- a/packages/flutter/lib/src/widgets/binding.dart +++ b/packages/flutter/lib/src/widgets/binding.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'dart:developer' as developer; -import 'dart:ui' show AppLifecycleState, Locale, AccessibilityFeatures, FrameTiming, TimingsCallback, PlatformDispatcher; +import 'dart:ui' show AccessibilityFeatures, AppLifecycleState, FrameTiming, Locale, PlatformDispatcher, TimingsCallback; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index 98e586b2e21..7976567c253 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -38,7 +38,7 @@ import 'text_selection.dart'; import 'ticker_provider.dart'; import 'widget_span.dart'; -export 'package:flutter/services.dart' show SelectionChangedCause, TextEditingValue, TextSelection, TextInputType, SmartQuotesType, SmartDashesType; +export 'package:flutter/services.dart' show SelectionChangedCause, SmartDashesType, SmartQuotesType, TextEditingValue, TextInputType, TextSelection; /// Signature for the callback that reports when the user changes the selection /// (including the cursor location). diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 1e0e6ee0d7c..26b49a4c5eb 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -24,11 +24,11 @@ export 'package:flutter/foundation.dart' show protected, required, visibleForTesting; -export 'package:flutter/foundation.dart' show FlutterError, ErrorSummary, ErrorDescription, ErrorHint, debugPrint, debugPrintStack; -export 'package:flutter/foundation.dart' show VoidCallback, ValueChanged, ValueGetter, ValueSetter; -export 'package:flutter/foundation.dart' show DiagnosticsNode, DiagnosticLevel; +export 'package:flutter/foundation.dart' show ErrorDescription, ErrorHint, ErrorSummary, FlutterError, debugPrint, debugPrintStack; +export 'package:flutter/foundation.dart' show ValueChanged, ValueGetter, ValueSetter, VoidCallback; +export 'package:flutter/foundation.dart' show DiagnosticLevel, DiagnosticsNode; export 'package:flutter/foundation.dart' show Key, LocalKey, ValueKey; -export 'package:flutter/rendering.dart' show RenderObject, RenderBox, debugDumpRenderTree, debugDumpLayerTree; +export 'package:flutter/rendering.dart' show RenderBox, RenderObject, debugDumpLayerTree, debugDumpRenderTree; // Examples can assume: // late BuildContext context; diff --git a/packages/flutter/lib/src/widgets/gesture_detector.dart b/packages/flutter/lib/src/widgets/gesture_detector.dart index 7b51f8324aa..23453645c7c 100644 --- a/packages/flutter/lib/src/widgets/gesture_detector.dart +++ b/packages/flutter/lib/src/widgets/gesture_detector.dart @@ -12,39 +12,39 @@ import 'media_query.dart'; export 'package:flutter/gestures.dart' show DragDownDetails, + DragEndDetails, DragStartDetails, DragUpdateDetails, - DragEndDetails, - GestureTapDownCallback, - GestureTapUpCallback, - GestureTapCallback, - GestureTapCancelCallback, - GestureLongPressCallback, - GestureLongPressStartCallback, - GestureLongPressMoveUpdateCallback, - GestureLongPressUpCallback, - GestureLongPressEndCallback, + ForcePressDetails, + GestureDragCancelCallback, GestureDragDownCallback, + GestureDragEndCallback, GestureDragStartCallback, GestureDragUpdateCallback, - GestureDragEndCallback, - GestureDragCancelCallback, + GestureForcePressEndCallback, + GestureForcePressPeakCallback, + GestureForcePressStartCallback, + GestureForcePressUpdateCallback, + GestureLongPressCallback, + GestureLongPressEndCallback, + GestureLongPressMoveUpdateCallback, + GestureLongPressStartCallback, + GestureLongPressUpCallback, + GestureScaleEndCallback, GestureScaleStartCallback, GestureScaleUpdateCallback, - GestureScaleEndCallback, - GestureForcePressStartCallback, - GestureForcePressPeakCallback, - GestureForcePressEndCallback, - GestureForcePressUpdateCallback, - LongPressStartDetails, - LongPressMoveUpdateDetails, + GestureTapCallback, + GestureTapCancelCallback, + GestureTapDownCallback, + GestureTapUpCallback, LongPressEndDetails, + LongPressMoveUpdateDetails, + LongPressStartDetails, + ScaleEndDetails, ScaleStartDetails, ScaleUpdateDetails, - ScaleEndDetails, TapDownDetails, TapUpDetails, - ForcePressDetails, Velocity; export 'package:flutter/rendering.dart' show RenderSemanticsGestureHandler; diff --git a/packages/flutter/lib/src/widgets/image.dart b/packages/flutter/lib/src/widgets/image.dart index 27f9b06d1ca..39ef6bd311b 100644 --- a/packages/flutter/lib/src/widgets/image.dart +++ b/packages/flutter/lib/src/widgets/image.dart @@ -27,8 +27,8 @@ export 'package:flutter/painting.dart' show FilterQuality, ImageConfiguration, ImageInfo, - ImageStream, ImageProvider, + ImageStream, MemoryImage, NetworkImage; diff --git a/packages/flutter/lib/src/widgets/interactive_viewer.dart b/packages/flutter/lib/src/widgets/interactive_viewer.dart index e9cc1f0ca58..69e1aa1957c 100644 --- a/packages/flutter/lib/src/widgets/interactive_viewer.dart +++ b/packages/flutter/lib/src/widgets/interactive_viewer.dart @@ -7,7 +7,7 @@ import 'dart:math' as math; import 'package:flutter/foundation.dart' show clampDouble; import 'package:flutter/gestures.dart'; import 'package:flutter/physics.dart'; -import 'package:vector_math/vector_math_64.dart' show Quad, Vector3, Matrix4; +import 'package:vector_math/vector_math_64.dart' show Matrix4, Quad, Vector3; import 'basic.dart'; import 'framework.dart'; diff --git a/packages/flutter/lib/src/widgets/overscroll_indicator.dart b/packages/flutter/lib/src/widgets/overscroll_indicator.dart index 124b0910c66..148bfbc6543 100644 --- a/packages/flutter/lib/src/widgets/overscroll_indicator.dart +++ b/packages/flutter/lib/src/widgets/overscroll_indicator.dart @@ -6,7 +6,7 @@ import 'dart:async' show Timer; import 'dart:math' as math; import 'package:flutter/foundation.dart'; -import 'package:flutter/physics.dart' show nearEqual, Tolerance; +import 'package:flutter/physics.dart' show Tolerance, nearEqual; import 'package:flutter/rendering.dart'; import 'package:flutter/scheduler.dart'; diff --git a/packages/flutter/lib/src/widgets/page_view.dart b/packages/flutter/lib/src/widgets/page_view.dart index 911bb2cfaab..ba03778a69c 100644 --- a/packages/flutter/lib/src/widgets/page_view.dart +++ b/packages/flutter/lib/src/widgets/page_view.dart @@ -4,7 +4,7 @@ import 'dart:math' as math; -import 'package:flutter/foundation.dart' show precisionErrorTolerance, clampDouble; +import 'package:flutter/foundation.dart' show clampDouble, precisionErrorTolerance; import 'package:flutter/gestures.dart' show DragStartBehavior; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/lib/src/widgets/scroll_physics.dart b/packages/flutter/lib/src/widgets/scroll_physics.dart index 11c20c10c9f..6c66d9183c2 100644 --- a/packages/flutter/lib/src/widgets/scroll_physics.dart +++ b/packages/flutter/lib/src/widgets/scroll_physics.dart @@ -14,7 +14,7 @@ import 'overscroll_indicator.dart'; import 'scroll_metrics.dart'; import 'scroll_simulation.dart'; -export 'package:flutter/physics.dart' show Simulation, ScrollSpringSimulation, Tolerance; +export 'package:flutter/physics.dart' show ScrollSpringSimulation, Simulation, Tolerance; // Examples can assume: // class FooScrollPhysics extends ScrollPhysics { diff --git a/packages/flutter/lib/src/widgets/sliver.dart b/packages/flutter/lib/src/widgets/sliver.dart index 306c7fb3ee4..3a49fea1a78 100644 --- a/packages/flutter/lib/src/widgets/sliver.dart +++ b/packages/flutter/lib/src/widgets/sliver.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:collection' show SplayTreeMap, HashMap; +import 'dart:collection' show HashMap, SplayTreeMap; import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/cupertino/text_field_test.dart b/packages/flutter/test/cupertino/text_field_test.dart index 331b848b6df..464a880e4e3 100644 --- a/packages/flutter/test/cupertino/text_field_test.dart +++ b/packages/flutter/test/cupertino/text_field_test.dart @@ -16,7 +16,7 @@ import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle, Color; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter/gestures.dart' show DragStartBehavior, PointerDeviceKind, kSecondaryMouseButton, kDoubleTapTimeout; +import 'package:flutter/gestures.dart' show DragStartBehavior, PointerDeviceKind, kDoubleTapTimeout, kSecondaryMouseButton; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; diff --git a/packages/flutter/test/cupertino/text_selection_test.dart b/packages/flutter/test/cupertino/text_selection_test.dart index ead287a227f..9941e8b8dee 100644 --- a/packages/flutter/test/cupertino/text_selection_test.dart +++ b/packages/flutter/test/cupertino/text_selection_test.dart @@ -16,7 +16,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import '../widgets/clipboard_utils.dart'; -import '../widgets/editable_text_utils.dart' show textOffsetToPosition, findRenderEditable; +import '../widgets/editable_text_utils.dart' show findRenderEditable, textOffsetToPosition; class _LongCupertinoLocalizationsDelegate extends LocalizationsDelegate { const _LongCupertinoLocalizationsDelegate(); diff --git a/packages/flutter/test/material/popup_menu_test.dart b/packages/flutter/test/material/popup_menu_test.dart index 5745ebb3298..cfac72adc31 100644 --- a/packages/flutter/test/material/popup_menu_test.dart +++ b/packages/flutter/test/material/popup_menu_test.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' show SemanticsFlag, DisplayFeature, DisplayFeatureType, DisplayFeatureState; +import 'dart:ui' show DisplayFeature, DisplayFeatureState, DisplayFeatureType, SemanticsFlag; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 91469a89d21..34a5fa229db 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -24,7 +24,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import '../widgets/clipboard_utils.dart'; -import '../widgets/editable_text_utils.dart' show findRenderEditable, globalize, textOffsetToPosition, OverflowWidgetTextEditingController; +import '../widgets/editable_text_utils.dart' show OverflowWidgetTextEditingController, findRenderEditable, globalize, textOffsetToPosition; import '../widgets/semantics_tester.dart'; import 'feedback_tester.dart'; diff --git a/packages/flutter/test/painting/decoration_test.dart b/packages/flutter/test/painting/decoration_test.dart index 5ce14de9bc3..c7f7ea9871d 100644 --- a/packages/flutter/test/painting/decoration_test.dart +++ b/packages/flutter/test/painting/decoration_test.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:ui' as ui show Image, ColorFilter; +import 'dart:ui' as ui show ColorFilter, Image; import 'package:fake_async/fake_async.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart index 954a442c2bf..0f376c63ea9 100644 --- a/packages/flutter/test/painting/image_stream_test.dart +++ b/packages/flutter/test/painting/image_stream_test.dart @@ -7,7 +7,7 @@ import 'dart:ui'; import 'package:flutter/foundation.dart'; import 'package:flutter/painting.dart'; -import 'package:flutter/scheduler.dart' show timeDilation, SchedulerBinding; +import 'package:flutter/scheduler.dart' show SchedulerBinding, timeDilation; import 'package:flutter_test/flutter_test.dart'; import '../image_data.dart'; diff --git a/packages/flutter/test/painting/text_style_test.dart b/packages/flutter/test/painting/text_style_test.dart index 80404ccda3f..60da595bf6e 100644 --- a/packages/flutter/test/painting/text_style_test.dart +++ b/packages/flutter/test/painting/text_style_test.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show TextStyle, ParagraphStyle, FontFeature, FontVariation, Shadow; +import 'dart:ui' as ui show FontFeature, FontVariation, ParagraphStyle, Shadow, TextStyle; import 'package:flutter/foundation.dart'; import 'package:flutter/painting.dart'; diff --git a/packages/flutter/test/rendering/mock_canvas.dart b/packages/flutter/test/rendering/mock_canvas.dart index 57a633737ab..3f707688d40 100644 --- a/packages/flutter/test/rendering/mock_canvas.dart +++ b/packages/flutter/test/rendering/mock_canvas.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show Paragraph, Image; +import 'dart:ui' as ui show Image, Paragraph; import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/rendering/paragraph_test.dart b/packages/flutter/test/rendering/paragraph_test.dart index deddef60875..a8d12623678 100644 --- a/packages/flutter/test/rendering/paragraph_test.dart +++ b/packages/flutter/test/rendering/paragraph_test.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' as ui show TextBox, BoxHeightStyle, BoxWidthStyle, Paragraph; +import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle, Paragraph, TextBox; import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/rendering/rendering_tester.dart b/packages/flutter/test/rendering/rendering_tester.dart index afeaca5007b..e14dbee6a84 100644 --- a/packages/flutter/test/rendering/rendering_tester.dart +++ b/packages/flutter/test/rendering/rendering_tester.dart @@ -9,10 +9,10 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart' show TestDefaultBinaryMessengerBinding, EnginePhase, fail; +import 'package:flutter_test/flutter_test.dart' show EnginePhase, TestDefaultBinaryMessengerBinding, fail; export 'package:flutter/foundation.dart' show FlutterError, FlutterErrorDetails; -export 'package:flutter_test/flutter_test.dart' show TestDefaultBinaryMessengerBinding, EnginePhase; +export 'package:flutter_test/flutter_test.dart' show EnginePhase, TestDefaultBinaryMessengerBinding; class TestRenderingFlutterBinding extends BindingBase with SchedulerBinding, ServicesBinding, GestureBinding, PaintingBinding, SemanticsBinding, RendererBinding, TestDefaultBinaryMessengerBinding { /// Creates a binding for testing rendering library functionality. diff --git a/packages/flutter/test/scheduler/time_dilation_test.dart b/packages/flutter/test/scheduler/time_dilation_test.dart index d4c134b1a4c..a81cc448101 100644 --- a/packages/flutter/test/scheduler/time_dilation_test.dart +++ b/packages/flutter/test/scheduler/time_dilation_test.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'package:flutter/scheduler.dart'; -import 'package:flutter_test/flutter_test.dart' show test, expect; +import 'package:flutter_test/flutter_test.dart' show expect, test; // This file should not use testWidgets, and should not instantiate the binding. diff --git a/packages/flutter/test/widgets/interactive_viewer_test.dart b/packages/flutter/test/widgets/interactive_viewer_test.dart index 6834c56423b..a1081504752 100644 --- a/packages/flutter/test/widgets/interactive_viewer_test.dart +++ b/packages/flutter/test/widgets/interactive_viewer_test.dart @@ -8,7 +8,7 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:vector_math/vector_math_64.dart' show Quad, Vector3, Matrix4; +import 'package:vector_math/vector_math_64.dart' show Matrix4, Quad, Vector3; import 'gesture_utils.dart'; diff --git a/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart b/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart index 690fbfcaa77..8cbdb86c0a4 100644 --- a/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart +++ b/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart @@ -11,7 +11,7 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import '../rendering/mock_canvas.dart'; -import '../rendering/rendering_tester.dart' show TestClipPaintingContext, TestCallbackPainter; +import '../rendering/rendering_tester.dart' show TestCallbackPainter, TestClipPaintingContext; void main() { testWidgets('ListWheelScrollView respects clipBehavior', (WidgetTester tester) async { diff --git a/packages/flutter/test/widgets/modal_barrier_test.dart b/packages/flutter/test/widgets/modal_barrier_test.dart index 30a05cb35e1..4ac4aef061d 100644 --- a/packages/flutter/test/widgets/modal_barrier_test.dart +++ b/packages/flutter/test/widgets/modal_barrier_test.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/gestures.dart' show kSecondaryButton, PointerDeviceKind; +import 'package:flutter/gestures.dart' show PointerDeviceKind, kSecondaryButton; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; diff --git a/packages/flutter/test/widgets/semantics_tester.dart b/packages/flutter/test/widgets/semantics_tester.dart index 5cf5138cb70..b6855a48f89 100644 --- a/packages/flutter/test/widgets/semantics_tester.dart +++ b/packages/flutter/test/widgets/semantics_tester.dart @@ -7,7 +7,7 @@ import 'package:flutter/physics.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -export 'dart:ui' show SemanticsFlag, SemanticsAction; +export 'dart:ui' show SemanticsAction, SemanticsFlag; export 'package:flutter/rendering.dart' show SemanticsData; const String _matcherHelp = 'Try dumping the semantics with debugDumpSemanticsTree(DebugSemanticsDumpOrder.inverseHitTest) from the package:flutter/rendering.dart library to see what the semantics tree looks like.'; diff --git a/packages/flutter/test_private/test/animated_icons_private_test.dart.tmpl b/packages/flutter/test_private/test/animated_icons_private_test.dart.tmpl index 96d23c4d4bb..af1d2c43368 100644 --- a/packages/flutter/test_private/test/animated_icons_private_test.dart.tmpl +++ b/packages/flutter/test_private/test/animated_icons_private_test.dart.tmpl @@ -12,8 +12,8 @@ library material_animated_icons; import 'dart:math' as math show pi; -import 'dart:ui' show lerpDouble, Offset; -import 'dart:ui' as ui show Paint, Path, Canvas; +import 'dart:ui' show Offset, lerpDouble; +import 'dart:ui' as ui show Canvas, Paint, Path; import 'package:flutter/foundation.dart' show clampDouble; import 'package:flutter/widgets.dart'; diff --git a/packages/flutter_driver/lib/src/common/error.dart b/packages/flutter_driver/lib/src/common/error.dart index 9c595e17aae..698b78106ab 100644 --- a/packages/flutter_driver/lib/src/common/error.dart +++ b/packages/flutter_driver/lib/src/common/error.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:io' show stderr, FileSystemException; +import 'dart:io' show FileSystemException, stderr; /// Standard error thrown by Flutter Driver API. class DriverError extends Error { diff --git a/packages/flutter_driver/lib/src/driver/timeline_summary.dart b/packages/flutter_driver/lib/src/driver/timeline_summary.dart index ab64748f9ba..b364277d33e 100644 --- a/packages/flutter_driver/lib/src/driver/timeline_summary.dart +++ b/packages/flutter_driver/lib/src/driver/timeline_summary.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:convert' show json, JsonEncoder; +import 'dart:convert' show JsonEncoder, json; import 'dart:math' as math; import 'package:file/file.dart'; diff --git a/packages/flutter_test/lib/src/widget_tester.dart b/packages/flutter_test/lib/src/widget_tester.dart index 2b4149d88de..0b2e93f877e 100644 --- a/packages/flutter_test/lib/src/widget_tester.dart +++ b/packages/flutter_test/lib/src/widget_tester.dart @@ -47,14 +47,14 @@ export 'package:flutter/rendering.dart' show SemanticsHandle; // that doesn't apply here. // ignore: deprecated_member_use export 'package:test_api/test_api.dart' hide - test, - group, - setUpAll, - tearDownAll, - setUp, - tearDown, expect, - isInstanceOf; + group, + isInstanceOf, + setUp, + setUpAll, + tearDown, + tearDownAll, + test; /// Signature for callback to [testWidgets] and [benchmarkWidgets]. typedef WidgetTesterCallback = Future Function(WidgetTester widgetTester); diff --git a/packages/flutter_test/test/goldens_test.dart b/packages/flutter_test/test/goldens_test.dart index c6c3ec4499e..c421aedb09c 100644 --- a/packages/flutter_test/test/goldens_test.dart +++ b/packages/flutter_test/test/goldens_test.dart @@ -7,7 +7,7 @@ import 'dart:io' as io; import 'dart:typed_data'; import 'package:file/memory.dart'; -import 'package:flutter/foundation.dart' show DiagnosticLevel, DiagnosticsNode, DiagnosticPropertiesBuilder, FlutterError; +import 'package:flutter/foundation.dart' show DiagnosticLevel, DiagnosticPropertiesBuilder, DiagnosticsNode, FlutterError; import 'package:flutter_test/flutter_test.dart' hide test; import 'package:flutter_test/flutter_test.dart' as test_package; diff --git a/packages/flutter_test/test/platform_dispatcher_test.dart b/packages/flutter_test/test/platform_dispatcher_test.dart index 361880e88c3..971c3b14ce7 100644 --- a/packages/flutter_test/test/platform_dispatcher_test.dart +++ b/packages/flutter_test/test/platform_dispatcher_test.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:ui' show Locale, AccessibilityFeatures, Brightness, PlatformDispatcher; +import 'dart:ui' show AccessibilityFeatures, Brightness, Locale, PlatformDispatcher; import 'package:flutter/widgets.dart' show WidgetsBinding, WidgetsBindingObserver; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter_test/test/window_test.dart b/packages/flutter_test/test/window_test.dart index 45875e251a5..255ac8aa333 100644 --- a/packages/flutter_test/test/window_test.dart +++ b/packages/flutter_test/test/window_test.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:ui' as ui show window; -import 'dart:ui' show Size, Locale, WindowPadding, AccessibilityFeatures, Brightness; +import 'dart:ui' show AccessibilityFeatures, Brightness, Locale, Size, WindowPadding; import 'package:flutter/widgets.dart' show WidgetsBinding, WidgetsBindingObserver; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter_tools/lib/src/base/error_handling_io.dart b/packages/flutter_tools/lib/src/base/error_handling_io.dart index 3bdd3c037f6..6d1ce3c6681 100644 --- a/packages/flutter_tools/lib/src/base/error_handling_io.dart +++ b/packages/flutter_tools/lib/src/base/error_handling_io.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'dart:convert'; -import 'dart:io' as io show Directory, File, Link, ProcessException, ProcessResult, ProcessSignal, systemEncoding, Process, ProcessStartMode; +import 'dart:io' as io show Directory, File, Link, Process, ProcessException, ProcessResult, ProcessSignal, ProcessStartMode, systemEncoding; import 'dart:typed_data'; import 'package:file/file.dart'; diff --git a/packages/flutter_tools/lib/src/base/io.dart b/packages/flutter_tools/lib/src/base/io.dart index a8721542c8b..567c3013dbc 100644 --- a/packages/flutter_tools/lib/src/base/io.dart +++ b/packages/flutter_tools/lib/src/base/io.dart @@ -34,21 +34,21 @@ import 'dart:async'; import 'dart:io' as io show - exit, + IOSink, InternetAddress, InternetAddressType, - IOSink, NetworkInterface, - pid, Process, ProcessInfo, ProcessSignal, - stderr, - stdin, Stdin, StdinException, Stdout, StdoutException, + exit, + pid, + stderr, + stdin, stdout; import 'package:file/file.dart'; @@ -63,10 +63,8 @@ export 'dart:io' BytesBuilder, CompressionOptions, // Directory, NO! Use `file_system.dart` - exitCode, // File, NO! Use `file_system.dart` // FileSystemEntity, NO! Use `file_system.dart` - gzip, GZipCodec, HandshakeException, HttpClient, @@ -79,14 +77,13 @@ export 'dart:io' HttpResponse, HttpServer, HttpStatus, - InternetAddress, - InternetAddressType, IOException, IOSink, + InternetAddress, + InternetAddressType, // Link NO! Use `file_system.dart` // NetworkInterface NO! Use `io.dart` OSError, - pid, // Platform NO! use `platform.dart` Process, ProcessException, @@ -97,19 +94,22 @@ export 'dart:io' // RandomAccessFile NO! Use `file_system.dart` ServerSocket, SignalException, - // stderr, NO! Use `io.dart` - // stdin, NO! Use `io.dart` - Stdin, - StdinException, - // stdout, NO! Use `io.dart` - Stdout, Socket, SocketException, - systemEncoding, + Stdin, + StdinException, + Stdout, WebSocket, WebSocketException, WebSocketTransformer, - ZLibEncoder; + ZLibEncoder, + exitCode, + gzip, + pid, + // stderr, NO! Use `io.dart` + // stdin, NO! Use `io.dart` + // stdout, NO! Use `io.dart` + systemEncoding; /// Exits the process with the given [exitCode]. typedef ExitFunction = void Function(int exitCode); diff --git a/packages/flutter_tools/lib/src/base/logger.dart b/packages/flutter_tools/lib/src/base/logger.dart index b102fe84abb..506680dc4ca 100644 --- a/packages/flutter_tools/lib/src/base/logger.dart +++ b/packages/flutter_tools/lib/src/base/logger.dart @@ -10,7 +10,7 @@ import 'package:meta/meta.dart'; import '../convert.dart'; import 'common.dart'; import 'io.dart'; -import 'terminal.dart' show Terminal, TerminalColor, OutputPreferences; +import 'terminal.dart' show OutputPreferences, Terminal, TerminalColor; import 'utils.dart'; const int kDefaultStatusPadding = 59; diff --git a/packages/flutter_tools/lib/src/context_runner.dart b/packages/flutter_tools/lib/src/context_runner.dart index 86689f490dd..d35bdb5f3d1 100644 --- a/packages/flutter_tools/lib/src/context_runner.dart +++ b/packages/flutter_tools/lib/src/context_runner.dart @@ -42,7 +42,7 @@ import 'flutter_cache.dart'; import 'flutter_device_manager.dart'; import 'flutter_features.dart'; import 'fuchsia/fuchsia_device.dart' show FuchsiaDeviceTools; -import 'fuchsia/fuchsia_sdk.dart' show FuchsiaSdk, FuchsiaArtifacts; +import 'fuchsia/fuchsia_sdk.dart' show FuchsiaArtifacts, FuchsiaSdk; import 'fuchsia/fuchsia_workflow.dart' show FuchsiaWorkflow, fuchsiaWorkflow; import 'globals.dart' as globals; import 'ios/ios_workflow.dart'; diff --git a/packages/flutter_tools/lib/src/convert.dart b/packages/flutter_tools/lib/src/convert.dart index caec2776aa1..836f5820e91 100644 --- a/packages/flutter_tools/lib/src/convert.dart +++ b/packages/flutter_tools/lib/src/convert.dart @@ -5,12 +5,12 @@ // Hide the original utf8 [Codec] so that we can export our own implementation // which adds additional error handling. import 'dart:convert' hide utf8; -import 'dart:convert' as cnv show utf8, Utf8Decoder; +import 'dart:convert' as cnv show Utf8Decoder, utf8; import 'package:meta/meta.dart'; import 'base/common.dart'; -export 'dart:convert' hide utf8, Utf8Codec, Utf8Decoder; +export 'dart:convert' hide Utf8Codec, Utf8Decoder, utf8; /// The original utf8 encoding for testing overrides only. /// diff --git a/packages/flutter_tools/test/general.shard/devfs_test.dart b/packages/flutter_tools/test/general.shard/devfs_test.dart index 0b0579baecc..75a6da85f9e 100644 --- a/packages/flutter_tools/test/general.shard/devfs_test.dart +++ b/packages/flutter_tools/test/general.shard/devfs_test.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io' as io show ProcessSignal, Process; +import 'dart:io' as io show Process, ProcessSignal; import 'package:file/file.dart'; import 'package:file/memory.dart'; diff --git a/packages/flutter_tools/test/src/common.dart b/packages/flutter_tools/test/src/common.dart index 6be11e1e60e..804e79d8c0d 100644 --- a/packages/flutter_tools/test/src/common.dart +++ b/packages/flutter_tools/test/src/common.dart @@ -16,7 +16,7 @@ import 'package:path/path.dart' as path; // flutter_ignore: package_path_import import 'package:test_api/test_api.dart' as test_package show test; // ignore: deprecated_member_use import 'package:test_api/test_api.dart' hide test; // ignore: deprecated_member_use -export 'package:test_api/test_api.dart' hide test, isInstanceOf; // ignore: deprecated_member_use +export 'package:test_api/test_api.dart' hide isInstanceOf, test; // ignore: deprecated_member_use void tryToDelete(FileSystemEntity fileEntity) { // This should not be necessary, but it turns out that diff --git a/packages/flutter_tools/test/src/context.dart b/packages/flutter_tools/test/src/context.dart index 39a1ebf24f3..82d76b0e81c 100644 --- a/packages/flutter_tools/test/src/context.dart +++ b/packages/flutter_tools/test/src/context.dart @@ -44,7 +44,7 @@ import 'throwing_pub.dart'; export 'package:flutter_tools/src/base/context.dart' show Generator; -export 'fake_process_manager.dart' show ProcessManager, FakeProcessManager, FakeCommand; +export 'fake_process_manager.dart' show FakeCommand, FakeProcessManager, ProcessManager; /// Return the test logger. This assumes that the current Logger is a BufferLogger. BufferLogger get testLogger => context.get()! as BufferLogger; diff --git a/packages/flutter_tools/test/src/fake_process_manager.dart b/packages/flutter_tools/test/src/fake_process_manager.dart index 59194a0343a..d45baba6437 100644 --- a/packages/flutter_tools/test/src/fake_process_manager.dart +++ b/packages/flutter_tools/test/src/fake_process_manager.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io' as io show ProcessSignal, Process, ProcessStartMode, ProcessResult, systemEncoding; +import 'dart:io' as io show Process, ProcessResult, ProcessSignal, ProcessStartMode, systemEncoding; import 'package:file/file.dart'; import 'package:meta/meta.dart'; diff --git a/packages/flutter_tools/test/src/fake_vm_services.dart b/packages/flutter_tools/test/src/fake_vm_services.dart index 09e6931e9ae..1d978e5b8d3 100644 --- a/packages/flutter_tools/test/src/fake_vm_services.dart +++ b/packages/flutter_tools/test/src/fake_vm_services.dart @@ -9,7 +9,7 @@ import 'package:flutter_tools/src/vmservice.dart'; import 'package:test_api/test_api.dart' hide test; // ignore: deprecated_member_use import 'package:vm_service/vm_service.dart' as vm_service; -export 'package:test_api/test_api.dart' hide test, isInstanceOf; // ignore: deprecated_member_use +export 'package:test_api/test_api.dart' hide isInstanceOf, test; // ignore: deprecated_member_use /// A fake implementation of a vm_service that mocks the JSON-RPC request /// and response structure. diff --git a/packages/flutter_tools/test/src/io.dart b/packages/flutter_tools/test/src/io.dart index 2a83448c2a0..43cf2689e4b 100644 --- a/packages/flutter_tools/test/src/io.dart +++ b/packages/flutter_tools/test/src/io.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:io' as io show IOOverrides, Directory, File, Link; +import 'dart:io' as io show Directory, File, IOOverrides, Link; import 'package:flutter_tools/src/base/file_system.dart'; diff --git a/packages/flutter_tools/test/src/test_flutter_command_runner.dart b/packages/flutter_tools/test/src/test_flutter_command_runner.dart index 528a01c4ef3..22b68f1793a 100644 --- a/packages/flutter_tools/test/src/test_flutter_command_runner.dart +++ b/packages/flutter_tools/test/src/test_flutter_command_runner.dart @@ -16,7 +16,7 @@ import 'package:flutter_tools/src/globals.dart' as globals; import 'package:flutter_tools/src/runner/flutter_command.dart'; import 'package:flutter_tools/src/runner/flutter_command_runner.dart'; -export 'package:test_api/test_api.dart' hide test, isInstanceOf; // ignore: deprecated_member_use +export 'package:test_api/test_api.dart' hide isInstanceOf, test; // ignore: deprecated_member_use CommandRunner createTestCommandRunner([ FlutterCommand? command ]) { final FlutterCommandRunner runner = TestFlutterCommandRunner(); diff --git a/packages/integration_test/lib/integration_test.dart b/packages/integration_test/lib/integration_test.dart index a2f84c41d65..816158c857d 100644 --- a/packages/integration_test/lib/integration_test.dart +++ b/packages/integration_test/lib/integration_test.dart @@ -4,7 +4,7 @@ import 'dart:async'; import 'dart:developer' as developer; -import 'dart:io' show SocketException, WebSocket, HttpClient; +import 'dart:io' show HttpClient, SocketException, WebSocket; import 'dart:ui'; import 'package:flutter/foundation.dart';