Unverified Commit 80990c21 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

code formatting (#85783)

parent f3aa51bd
......@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:macrobenchmarks/src/web/bench_paths_recording.dart'
as recording;
import 'package:macrobenchmarks/src/web/bench_paths_recording.dart' as recording;
import 'package:macrobenchmarks/src/web/recorder.dart';
/// Measure the performance of path construction.
......
......@@ -4,11 +4,9 @@
// @dart = 2.8
import 'package:flutter_devicelab/framework/devices.dart'
show DeviceOperatingSystem;
import 'package:flutter_devicelab/framework/devices.dart' show DeviceOperatingSystem;
import 'package:flutter_devicelab/framework/framework.dart' show task;
import 'package:flutter_devicelab/tasks/platform_channels_benchmarks.dart'
as platform_channels_benchmarks;
import 'package:flutter_devicelab/tasks/platform_channels_benchmarks.dart' as platform_channels_benchmarks;
Future<void> main() async {
await task(
......
......@@ -4,11 +4,9 @@
// @dart = 2.8
import 'package:flutter_devicelab/framework/devices.dart'
show DeviceOperatingSystem;
import 'package:flutter_devicelab/framework/devices.dart' show DeviceOperatingSystem;
import 'package:flutter_devicelab/framework/framework.dart' show task;
import 'package:flutter_devicelab/tasks/platform_channels_benchmarks.dart'
as platform_channels_benchmarks;
import 'package:flutter_devicelab/tasks/platform_channels_benchmarks.dart' as platform_channels_benchmarks;
Future<void> main() async {
await task(platform_channels_benchmarks.runTask(DeviceOperatingSystem.ios));
......
......@@ -19,7 +19,7 @@ import 'constants.dart';
/// See also:
///
/// * [AccessibilityNodeInfo](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo)
class AndroidSemanticsNode {
class AndroidSemanticsNode {
AndroidSemanticsNode._(this._values);
/// Deserializes a new [AndroidSemanticsNode] from a json map.
......
......@@ -60,4 +60,4 @@ class FakeHttpClientResponse extends Fake implements HttpClientResponse {
}
}
class FakeHttpHeaders extends Fake implements HttpHeaders {}
class FakeHttpHeaders extends Fake implements HttpHeaders { }
......@@ -198,7 +198,7 @@ class _SegmentSeparator extends StatefulWidget {
_SegmentSeparatorState createState() => _SegmentSeparatorState();
}
class _SegmentSeparatorState extends State<_SegmentSeparator> with TickerProviderStateMixin<_SegmentSeparator> {
class _SegmentSeparatorState extends State<_SegmentSeparator> with TickerProviderStateMixin<_SegmentSeparator> {
late final AnimationController separatorOpacityController;
@override
......@@ -735,7 +735,7 @@ class _SegmentedControlRenderWidget<T> extends MultiChildRenderObjectWidget {
}
}
class _SegmentedControlContainerBoxParentData extends ContainerBoxParentData<RenderBox> {}
class _SegmentedControlContainerBoxParentData extends ContainerBoxParentData<RenderBox> { }
// The behavior of a UISegmentedControl as observed on iOS 13.1:
//
......
......@@ -651,7 +651,7 @@ mixin _PointerEventDescription on PointerEvent {
}
}
abstract class _AbstractPointerEvent implements PointerEvent {}
abstract class _AbstractPointerEvent implements PointerEvent { }
// The base class for transformed pointer event classes.
//
......
......@@ -220,7 +220,7 @@ bool _isFlingGesture(Velocity velocity) {
///
/// [_LineBetweenPointers] is an abstraction of a line between two pointers in
/// contact with the screen. Used to track the rotation of a scale gesture.
class _LineBetweenPointers{
class _LineBetweenPointers {
/// Creates a [_LineBetweenPointers]. None of the [pointerStartLocation], [pointerStartId]
/// [pointerEndLocation] and [pointerEndId] must be null. [pointerStartId] and [pointerEndId]
......
......@@ -496,7 +496,7 @@ class _OutlineButtonState extends State<_OutlineButton> with SingleTickerProvide
// Render the button's outline border using using the OutlineButton's
// border parameters and the button or buttonTheme's shape.
class _OutlineBorder extends ShapeBorder implements MaterialStateProperty<ShapeBorder>{
class _OutlineBorder extends ShapeBorder implements MaterialStateProperty<ShapeBorder> {
const _OutlineBorder({
required this.shape,
required this.side,
......
......@@ -58,7 +58,7 @@ enum TabBarIndicatorSize {
/// * [TabBarView], which displays a widget for the currently selected tab.
/// * [TabController], which coordinates tab selection between a [TabBar] and a [TabBarView].
/// * <https://material.io/design/components/tabs.html>
class Tab extends StatelessWidget implements PreferredSizeWidget{
class Tab extends StatelessWidget implements PreferredSizeWidget {
/// Creates a material design [TabBar] tab.
///
/// At least one of [text], [icon], and [child] must be non-null. The [text]
......
......@@ -338,7 +338,7 @@ mixin ToggleableStateMixin<S extends StatefulWidget> on TickerProviderStateMixin
/// Subclasses must implement the [paint] method to draw the actual visuals of
/// the Toggleable. In their [paint] method subclasses may call
/// [paintRadialReaction] to draw a radial ink reaction for this control.
abstract class ToggleablePainter extends ChangeNotifier implements CustomPainter {
abstract class ToggleablePainter extends ChangeNotifier implements CustomPainter {
/// The visual value of the control.
///
/// Usually set to [ToggleableStateMixin.position].
......
......@@ -1133,7 +1133,7 @@ class ExactAssetImage extends AssetBundleImageProvider {
}
// A completer used when resolving an image fails sync.
class _ErrorImageCompleter extends ImageStreamCompleter {}
class _ErrorImageCompleter extends ImageStreamCompleter { }
/// The exception thrown when the HTTP request to load a network image fails.
class NetworkImageLoadException implements Exception {
......
......@@ -378,7 +378,7 @@ class RenderSliverOffstage extends RenderProxySliver {
///
/// This is a variant of [RenderSliverOpacity] that uses an [Animation<double>]
/// rather than a [double] to control the opacity.
class RenderSliverAnimatedOpacity extends RenderProxySliver with RenderAnimatedOpacityMixin<RenderSliver>{
class RenderSliverAnimatedOpacity extends RenderProxySliver with RenderAnimatedOpacityMixin<RenderSliver> {
/// Creates a partially transparent render object.
///
/// The [opacity] argument must not be null.
......
......@@ -1604,16 +1604,16 @@ class ButtonActivateIntent extends Intent {
/// activate a control. By default, is bound to [LogicalKeyboardKey.enter],
/// [LogicalKeyboardKey.gameButtonA], and [LogicalKeyboardKey.space] in the
/// default keyboard map in [WidgetsApp].
abstract class ActivateAction extends Action<ActivateIntent> {}
abstract class ActivateAction extends Action<ActivateIntent> { }
/// An intent that selects the currently focused control.
class SelectIntent extends Intent {}
class SelectIntent extends Intent { }
/// An action that selects the currently focused control.
///
/// This is an abstract class that serves as a base class for actions that
/// select something. It is not bound to any key by default.
abstract class SelectAction extends Action<SelectIntent> {}
abstract class SelectAction extends Action<SelectIntent> { }
/// An [Intent] that dismisses the currently focused widget.
///
......@@ -1631,7 +1631,7 @@ class DismissIntent extends Intent {
/// An action that dismisses the focused widget.
///
/// This is an abstract class that serves as a base class for dismiss actions.
abstract class DismissAction extends Action<DismissIntent> {}
abstract class DismissAction extends Action<DismissIntent> { }
/// An [Intent] that evaluates a series of specified [orderedIntents] for
/// execution.
......
......@@ -20,7 +20,7 @@ import 'text_editing_intents.dart';
/// * [DefaultTextEditingShortcuts], which maps keyboard keys to many of the
/// [Intent]s that are handled here.
/// * [WidgetsApp], which creates a DefaultTextEditingShortcuts.
class DefaultTextEditingActions extends Actions{
class DefaultTextEditingActions extends Actions {
/// Creates an instance of DefaultTextEditingActions.
DefaultTextEditingActions({
Key? key,
......
......@@ -209,7 +209,7 @@ abstract class SliverChildDelegate {
}
}
class _SaltedValueKey extends ValueKey<Key>{
class _SaltedValueKey extends ValueKey<Key> {
const _SaltedValueKey(Key key): assert(key != null), super(key);
}
......
......@@ -1371,7 +1371,7 @@ Widget createAppWithCenteredButton(Widget child) {
}
class _RestorableDialogTestWidget extends StatelessWidget{
class _RestorableDialogTestWidget extends StatelessWidget {
static Route<Object?> _dialogBuilder(BuildContext context, Object? arguments) {
return CupertinoDialogRoute<void>(
context: context,
......
......@@ -1901,7 +1901,7 @@ class _TestPostRouteCancelState extends State<_TestPostRouteCancel> {
}
}
class _RestorableModalTestWidget extends StatelessWidget{
class _RestorableModalTestWidget extends StatelessWidget {
static Route<void> _modalBuilder(BuildContext context, Object? arguments) {
return CupertinoModalPopupRoute<void>(
builder: (BuildContext context) {
......
......@@ -4,9 +4,9 @@
import 'package:flutter_test/flutter_test.dart';
class X {}
class X { }
class Y extends X {}
class Y extends X { }
class A<U extends X> {
U? u;
......
......@@ -3868,7 +3868,7 @@ class TabBarDemo extends StatelessWidget {
}
}
class MockScrollMetrics extends Fake implements ScrollMetrics {}
class MockScrollMetrics extends Fake implements ScrollMetrics { }
class TabBody extends StatefulWidget {
const TabBody({ Key? key, required this.index, required this.log }) : super(key: key);
......
......@@ -77,4 +77,4 @@ class TestBindingBase implements BindingBase {
ui.PlatformDispatcher get platformDispatcher => TestWindow(window: ui.window).platformDispatcher;
}
class TestPaintingBinding extends TestBindingBase with SchedulerBinding, ServicesBinding, PaintingBinding {}
class TestPaintingBinding extends TestBindingBase with SchedulerBinding, ServicesBinding, PaintingBinding { }
......@@ -55,7 +55,7 @@ class _GestureBindingSpy extends AutomatedTestWidgetsFlutterBinding {
PointerRouter get pointerRouter => _testPointerRouter;
}
class FakeEditableTextState extends Fake implements TextSelectionDelegate { }
class FakeEditableTextState extends Fake implements TextSelectionDelegate { }
class _PointerRouterSpy extends PointerRouter {
int routeCount = 0;
......
......@@ -70,7 +70,7 @@ class TestMouseTrackerFlutterBinding extends BindingBase
}
// An object that mocks the behavior of a render object with [MouseTrackerAnnotation].
class TestAnnotationTarget with Diagnosticable implements MouseTrackerAnnotation, HitTestTarget {
class TestAnnotationTarget with Diagnosticable implements MouseTrackerAnnotation, HitTestTarget {
const TestAnnotationTarget({this.onEnter, this.onHover, this.onExit, this.cursor = MouseCursor.defer, this.validForMouseTracker = true});
@override
......
......@@ -1332,4 +1332,4 @@ class _RouteFinder extends MatchFinder {
}
}
class FakeRoute extends Fake implements Route<void> {}
class FakeRoute extends Fake implements Route<void> { }
......@@ -3598,7 +3598,7 @@ void main() {
typedef AnnouncementCallBack = void Function(Route<dynamic>?);
class NotAnnounced extends Route<void> {/* A place holder for not announced route*/}
class NotAnnounced extends Route<void> { /* A place holder for not announced route*/ }
class RouteAnnouncementSpy extends Route<void> {
RouteAnnouncementSpy({
......
......@@ -16,7 +16,7 @@ class ExpandingBox extends StatefulWidget {
State<ExpandingBox> createState() => _ExpandingBoxState();
}
class _ExpandingBoxState extends State<ExpandingBox> with AutomaticKeepAliveClientMixin<ExpandingBox>{
class _ExpandingBoxState extends State<ExpandingBox> with AutomaticKeepAliveClientMixin<ExpandingBox> {
late double _height;
@override
......
......@@ -1273,7 +1273,7 @@ class SimpleAsyncRouteInformationParser extends RouteInformationParser<RouteInfo
}
}
class SimpleAsyncRouterDelegate extends RouterDelegate<RouteInformation> with ChangeNotifier{
class SimpleAsyncRouterDelegate extends RouterDelegate<RouteInformation> with ChangeNotifier {
SimpleAsyncRouterDelegate({
required this.builder,
});
......
......@@ -557,7 +557,7 @@ class WidgetTest0 extends StatefulWidget {
State<WidgetTest0> createState() => _WidgetTest0State();
}
class _WidgetTest0State extends State<WidgetTest0> with AutomaticKeepAliveClientMixin{
class _WidgetTest0State extends State<WidgetTest0> with AutomaticKeepAliveClientMixin {
bool hasBeenDisposed = false;
@override
......@@ -590,7 +590,7 @@ class WidgetTest1 extends StatefulWidget {
State<WidgetTest1> createState() => _WidgetTest1State();
}
class _WidgetTest1State extends State<WidgetTest1> with AutomaticKeepAliveClientMixin{
class _WidgetTest1State extends State<WidgetTest1> with AutomaticKeepAliveClientMixin {
bool hasBeenDisposed = false;
@override
......@@ -623,7 +623,7 @@ class WidgetTest2 extends StatefulWidget {
State<WidgetTest2> createState() => _WidgetTest2State();
}
class _WidgetTest2State extends State<WidgetTest2> with AutomaticKeepAliveClientMixin{
class _WidgetTest2State extends State<WidgetTest2> with AutomaticKeepAliveClientMixin {
bool hasBeenDisposed = false;
@override
......
......@@ -428,4 +428,4 @@ class SkiaGoldClient {
}
/// Used to make HttpRequests during testing.
class SkiaGoldHttpOverrides extends io.HttpOverrides {}
class SkiaGoldHttpOverrides extends io.HttpOverrides { }
......@@ -84,7 +84,7 @@ class _DummyLocalizationsDelegate extends LocalizationsDelegate<DummyLocalizatio
bool shouldReload(_DummyLocalizationsDelegate old) => true;
}
class DummyLocalizations {}
class DummyLocalizations { }
class LocalizationTracker extends StatefulWidget {
const LocalizationTracker({Key? key}) : super(key: key);
......
......@@ -8,7 +8,7 @@ import 'package:meta/meta.dart';
import 'package:test_api/src/backend/declarer.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/group.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/group_entry.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/invoker.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/invoker.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/live_test.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/message.dart'; // ignore: implementation_imports
import 'package:test_api/src/backend/runtime.dart'; // ignore: implementation_imports
......
......@@ -955,7 +955,7 @@ class FlutterVmService {
}
/// Thrown when the VM Service disappears while calls are being made to it.
class VmServiceDisappearedException implements Exception {}
class VmServiceDisappearedException implements Exception { }
/// Whether the event attached to an [Isolate.pauseEvent] should be considered
/// a "pause" event.
......
......@@ -75,8 +75,8 @@ class FakeApplicationPackageFactory extends Fake implements ApplicationPackageFa
return app;
}
}
class FakeIOSApp extends Fake implements IOSApp {}
class FakeAndroidApk extends Fake implements AndroidApk {}
class FakeIOSApp extends Fake implements IOSApp { }
class FakeAndroidApk extends Fake implements AndroidApk { }
class FakeIOSDevice extends Fake implements IOSDevice {
@override
......
......@@ -28,4 +28,4 @@ void main() {
});
}
class FakeAndroidSdk extends Fake implements AndroidSdk {}
class FakeAndroidSdk extends Fake implements AndroidSdk { }
......@@ -1017,4 +1017,4 @@ class FakeGradleUtils extends GradleUtils {
}
}
class FakeAndroidSdk extends Fake implements AndroidSdk {}
class FakeAndroidSdk extends Fake implements AndroidSdk { }
......@@ -183,4 +183,4 @@ class FakeProcessSignal extends Fake implements io.ProcessSignal {
@override
Stream<io.ProcessSignal> watch() => controller.stream;
}
class FakeFile extends Fake implements File {}
class FakeFile extends Fake implements File { }
......@@ -231,7 +231,7 @@ class TestFlutterDevice extends FlutterDevice {
}
}
class FakeResidentCompiler extends Fake implements ResidentCompiler {}
class FakeResidentCompiler extends Fake implements ResidentCompiler { }
class FakeFlutterVmService extends Fake implements FlutterVmService {
@override
......
......@@ -350,7 +350,7 @@ class FakeDesktopDevice extends DesktopDevice {
}
}
class FakeApplicationPackage extends Fake implements ApplicationPackage {}
class FakeApplicationPackage extends Fake implements ApplicationPackage { }
class FakeOperatingSystemUtils extends Fake implements OperatingSystemUtils {
@override
String get name => 'Example';
......
......@@ -552,7 +552,7 @@ class MockDeviceDiscovery extends Fake implements DeviceDiscovery {
List<String> get wellKnownIds => <String>[];
}
class FakeFlutterProject extends Fake implements FlutterProject {}
class FakeFlutterProject extends Fake implements FlutterProject { }
class LongPollingDeviceDiscovery extends PollingDeviceDiscovery {
LongPollingDeviceDiscovery() : super('forever');
......
......@@ -528,7 +528,7 @@ class FakeApplicationPackageFactory extends Fake implements ApplicationPackageFa
}) async => applicationPackage;
}
class FakeApplicationPackage extends Fake implements ApplicationPackage {}
class FakeApplicationPackage extends Fake implements ApplicationPackage { }
class FakeDevice extends Fake implements Device {
FakeDevice(this.result, {this.supportsFlutterExit = true});
......
......@@ -122,7 +122,7 @@ void main() {
});
}
class FakeSuitePlatform extends Fake implements SuitePlatform {}
class FakeSuitePlatform extends Fake implements SuitePlatform { }
// A FlutterPlatform with enough fields set to load and start a test.
class TestFlutterPlatform extends FlutterPlatform {
......
......@@ -579,7 +579,7 @@ class FakeIOSApp extends Fake implements IOSApp {
final String name;
}
class FakeIOSWorkflow extends Fake implements IOSWorkflow {}
class FakeIOSWorkflow extends Fake implements IOSWorkflow { }
class FakeXcdevice extends Fake implements XCDevice {
int getAvailableIOSDevicesCount = 0;
......
......@@ -85,8 +85,8 @@ void main() {
});
}
class FakeFlutterProject extends Fake implements FlutterProject {}
class FakeApplicationPackage extends Fake implements ApplicationPackage {}
class FakeFlutterProject extends Fake implements FlutterProject { }
class FakeApplicationPackage extends Fake implements ApplicationPackage { }
class FakeBundleBuilder extends Fake implements BundleBuilder {
FakeBundleBuilder(this.fileSystem);
......
......@@ -473,4 +473,4 @@ class FakeFlutterDevice extends Fake implements FlutterDevice {
TargetPlatform targetPlatform = TargetPlatform.android_arm;
}
class FakeDevice extends Fake implements Device {}
class FakeDevice extends Fake implements Device { }
......@@ -1028,7 +1028,7 @@ ResidentRunner setUpResidentRunner(FlutterDevice flutterDevice, {
);
}
class FakeWebServerDevice extends FakeDevice implements WebServerDevice {}
class FakeWebServerDevice extends FakeDevice implements WebServerDevice { }
class FakeDevice extends Fake implements Device {
@override
......@@ -1099,9 +1099,9 @@ class FakeAppConnection extends Fake implements AppConnection {
}
}
class FakeChromeDevice extends Fake implements ChromiumDevice {}
class FakeChromeDevice extends Fake implements ChromiumDevice { }
class FakeWipDebugger extends Fake implements WipDebugger {}
class FakeWipDebugger extends Fake implements WipDebugger { }
class FakeResidentCompiler extends Fake implements ResidentCompiler {
@override
......
......@@ -1455,7 +1455,7 @@ TerminalHandler setUpTerminalHandler(List<FakeVmServiceRequest> requests, {
);
}
class FakeResidentCompiler extends Fake implements ResidentCompiler {}
class FakeResidentCompiler extends Fake implements ResidentCompiler { }
class TestRunner extends Fake implements ResidentRunner {
bool hasHelpBeenPrinted = false;
......
......@@ -54,4 +54,4 @@ void main() {
});
}
class FakeDevice extends Fake implements TestDevice {}
class FakeDevice extends Fake implements TestDevice { }
......@@ -101,6 +101,6 @@ void main() {
});
}
class A {}
class A { }
class B extends A {}
class B extends A { }
......@@ -835,7 +835,7 @@ class MockVMService extends Fake implements vm_service.VmService {
}
}
class FakeDevice extends Fake implements Device {}
class FakeDevice extends Fake implements Device { }
class FakeFlutterVersion extends Fake implements FlutterVersion {
@override
......
......@@ -11,8 +11,7 @@
import 'package:integration_test/integration_test.dart';
import '_example_test_io.dart' if (dart.library.html) '_example_test_web.dart'
as tests;
import '_example_test_io.dart' if (dart.library.html) '_example_test_web.dart' as tests;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
......
......@@ -14,8 +14,7 @@
import 'package:integration_test/integration_test.dart';
import '_extended_test_io.dart' if (dart.library.html) '_extended_test_web.dart'
as tests;
import '_extended_test_io.dart' if (dart.library.html) '_extended_test_web.dart' as tests;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
......
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