mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Prepare more of dev
for use_super_parameters (#101073)
This commit is contained in:
parent
75baed585e
commit
ca2d60e8e2
@ -14,7 +14,7 @@ void main() {
|
||||
enum ScrollMode { complex, tile }
|
||||
|
||||
class ComplexLayoutApp extends StatefulWidget {
|
||||
const ComplexLayoutApp({Key? key}) : super(key: key);
|
||||
const ComplexLayoutApp({super.key});
|
||||
|
||||
@override
|
||||
ComplexLayoutAppState createState() => ComplexLayoutAppState();
|
||||
@ -55,7 +55,7 @@ class ComplexLayoutAppState extends State<ComplexLayoutApp> {
|
||||
}
|
||||
|
||||
class TileScrollLayout extends StatelessWidget {
|
||||
const TileScrollLayout({ Key? key }) : super(key: key);
|
||||
const TileScrollLayout({ super.key });
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -81,7 +81,7 @@ class TileScrollLayout extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ComplexLayout extends StatefulWidget {
|
||||
const ComplexLayout({ Key? key }) : super(key: key);
|
||||
const ComplexLayout({ super.key });
|
||||
|
||||
@override
|
||||
ComplexLayoutState createState() => ComplexLayoutState();
|
||||
@ -129,7 +129,7 @@ class ComplexLayoutState extends State<ComplexLayout> {
|
||||
}
|
||||
|
||||
class TopBarMenu extends StatelessWidget {
|
||||
const TopBarMenu({Key? key}) : super(key: key);
|
||||
const TopBarMenu({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -182,7 +182,7 @@ class TopBarMenu extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MenuItemWithIcon extends StatelessWidget {
|
||||
const MenuItemWithIcon(this.icon, this.title, this.subtitle, {Key? key}) : super(key: key);
|
||||
const MenuItemWithIcon(this.icon, this.title, this.subtitle, {super.key});
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
@ -204,7 +204,7 @@ class MenuItemWithIcon extends StatelessWidget {
|
||||
}
|
||||
|
||||
class FancyImageItem extends StatelessWidget {
|
||||
const FancyImageItem(this.index, {Key? key}) : super(key: key);
|
||||
const FancyImageItem(this.index, {super.key});
|
||||
|
||||
final int index;
|
||||
|
||||
@ -228,7 +228,7 @@ class FancyImageItem extends StatelessWidget {
|
||||
}
|
||||
|
||||
class FancyGalleryItem extends StatelessWidget {
|
||||
const FancyGalleryItem(this.index, {Key? key}) : super(key: key);
|
||||
const FancyGalleryItem(this.index, {super.key});
|
||||
|
||||
final int index;
|
||||
@override
|
||||
@ -250,7 +250,7 @@ class FancyGalleryItem extends StatelessWidget {
|
||||
}
|
||||
|
||||
class InfoBar extends StatelessWidget {
|
||||
const InfoBar({Key? key}) : super(key: key);
|
||||
const InfoBar({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -268,7 +268,7 @@ class InfoBar extends StatelessWidget {
|
||||
}
|
||||
|
||||
class IconBar extends StatelessWidget {
|
||||
const IconBar({Key? key}) : super(key: key);
|
||||
const IconBar({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -287,7 +287,7 @@ class IconBar extends StatelessWidget {
|
||||
}
|
||||
|
||||
class IconWithText extends StatelessWidget {
|
||||
const IconWithText(this.icon, this.title, {Key? key}) : super(key: key);
|
||||
const IconWithText(this.icon, this.title, {super.key});
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
@ -308,7 +308,7 @@ class IconWithText extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MiniIconWithText extends StatelessWidget {
|
||||
const MiniIconWithText(this.icon, this.title, {Key? key}) : super(key: key);
|
||||
const MiniIconWithText(this.icon, this.title, {super.key});
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
@ -337,7 +337,7 @@ class MiniIconWithText extends StatelessWidget {
|
||||
}
|
||||
|
||||
class FatDivider extends StatelessWidget {
|
||||
const FatDivider({Key? key}) : super(key: key);
|
||||
const FatDivider({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -349,7 +349,7 @@ class FatDivider extends StatelessWidget {
|
||||
}
|
||||
|
||||
class UserHeader extends StatelessWidget {
|
||||
const UserHeader(this.userName, {Key? key}) : super(key: key);
|
||||
const UserHeader(this.userName, {super.key});
|
||||
|
||||
final String userName;
|
||||
|
||||
@ -397,7 +397,7 @@ class UserHeader extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ItemDescription extends StatelessWidget {
|
||||
const ItemDescription({Key? key}) : super(key: key);
|
||||
const ItemDescription({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -409,7 +409,7 @@ class ItemDescription extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ItemImageBox extends StatelessWidget {
|
||||
const ItemImageBox({Key? key}) : super(key: key);
|
||||
const ItemImageBox({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -490,7 +490,7 @@ class ItemImageBox extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ItemGalleryBox extends StatelessWidget {
|
||||
const ItemGalleryBox(this.index, {Key? key}) : super(key: key);
|
||||
const ItemGalleryBox(this.index, {super.key});
|
||||
|
||||
final int index;
|
||||
|
||||
@ -559,7 +559,7 @@ class ItemGalleryBox extends StatelessWidget {
|
||||
}
|
||||
|
||||
class BottomBar extends StatelessWidget {
|
||||
const BottomBar({Key? key}) : super(key: key);
|
||||
const BottomBar({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -586,7 +586,7 @@ class BottomBar extends StatelessWidget {
|
||||
}
|
||||
|
||||
class BottomBarButton extends StatelessWidget {
|
||||
const BottomBarButton(this.icon, this.title, {Key? key}) : super(key: key);
|
||||
const BottomBarButton(this.icon, this.title, {super.key});
|
||||
|
||||
final IconData icon;
|
||||
final String title;
|
||||
@ -609,7 +609,7 @@ class BottomBarButton extends StatelessWidget {
|
||||
}
|
||||
|
||||
class GalleryDrawer extends StatelessWidget {
|
||||
const GalleryDrawer({ Key? key }) : super(key: key);
|
||||
const GalleryDrawer({ super.key });
|
||||
|
||||
void _changeTheme(BuildContext context, bool value) {
|
||||
ComplexLayoutApp.of(context)?.lightTheme = value;
|
||||
@ -680,7 +680,7 @@ class GalleryDrawer extends StatelessWidget {
|
||||
}
|
||||
|
||||
class FancyDrawerHeader extends StatelessWidget {
|
||||
const FancyDrawerHeader({Key? key}) : super(key: key);
|
||||
const FancyDrawerHeader({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -35,7 +35,7 @@ const String kMacrobenchmarks = 'Macrobenchmarks';
|
||||
void main() => runApp(const MacrobenchmarksApp());
|
||||
|
||||
class MacrobenchmarksApp extends StatelessWidget {
|
||||
const MacrobenchmarksApp({Key? key, this.initialRoute = '/'}) : super(key: key);
|
||||
const MacrobenchmarksApp({super.key, this.initialRoute = '/'});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -77,7 +77,7 @@ class MacrobenchmarksApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({Key? key}) : super(key: key);
|
||||
const HomePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedImagePage extends StatelessWidget {
|
||||
const AnimatedImagePage({Key? key, this.onFrame}) : super(key: key);
|
||||
const AnimatedImagePage({super.key, this.onFrame});
|
||||
|
||||
final ValueChanged<int>? onFrame;
|
||||
|
||||
|
@ -24,7 +24,7 @@ const String kBlueSquare = 'iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAASEl'
|
||||
/// A 10x10 grid of animated looping placeholder gifts that fade into a
|
||||
/// blue square.
|
||||
class AnimatedPlaceholderPage extends StatelessWidget {
|
||||
const AnimatedPlaceholderPage({Key? key}) : super(key: key);
|
||||
const AnimatedPlaceholderPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimationWithMicrotasks extends StatefulWidget {
|
||||
const AnimationWithMicrotasks({Key? key}) : super(key: key);
|
||||
const AnimationWithMicrotasks({super.key});
|
||||
|
||||
@override
|
||||
State<AnimationWithMicrotasks> createState() => _AnimationWithMicrotasksState();
|
||||
|
@ -7,7 +7,7 @@ import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BackdropFilterPage extends StatefulWidget {
|
||||
const BackdropFilterPage({Key? key}) : super(key: key);
|
||||
const BackdropFilterPage({super.key});
|
||||
|
||||
@override
|
||||
State<BackdropFilterPage> createState() => _BackdropFilterPageState();
|
||||
|
@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
// This tests whether the Opacity layer raster cache works with color filters.
|
||||
// See https://github.com/flutter/flutter/issues/51975.
|
||||
class ColorFilterAndFadePage extends StatefulWidget {
|
||||
const ColorFilterAndFadePage({Key? key}) : super(key: key);
|
||||
const ColorFilterAndFadePage({super.key});
|
||||
|
||||
@override
|
||||
State<ColorFilterAndFadePage> createState() => _ColorFilterAndFadePageState();
|
||||
|
@ -7,7 +7,7 @@ import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ColorFilterCachePage extends StatefulWidget {
|
||||
const ColorFilterCachePage({Key? key}) : super(key: key);
|
||||
const ColorFilterCachePage({super.key});
|
||||
@override
|
||||
State<ColorFilterCachePage> createState() => _ColorFilterCachePageState();
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
// Based on https://github.com/eseidelGoogle/bezier_perf/blob/master/lib/main.dart
|
||||
class CubicBezierPage extends StatelessWidget {
|
||||
const CubicBezierPage({Key? key}) : super(key: key);
|
||||
const CubicBezierPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -24,7 +24,7 @@ class CubicBezierPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
class Bezier extends StatelessWidget {
|
||||
const Bezier(this.color, this.scale, {Key? key, this.blur = 0.0, this.delay = 0.0}) : super(key: key);
|
||||
const Bezier(this.color, this.scale, {super.key, this.blur = 0.0, this.delay = 0.0});
|
||||
|
||||
final Color color;
|
||||
final double scale;
|
||||
@ -93,7 +93,7 @@ class PathDetail {
|
||||
}
|
||||
|
||||
class AnimatedBezier extends StatefulWidget {
|
||||
const AnimatedBezier(this.color, this.scale, {Key? key, this.blur = 0.0}) : super(key: key);
|
||||
const AnimatedBezier(this.color, this.scale, {super.key, this.blur = 0.0});
|
||||
|
||||
final Color color;
|
||||
final double scale;
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CullOpacityPage extends StatefulWidget {
|
||||
const CullOpacityPage({Key? key}) : super(key: key);
|
||||
const CullOpacityPage({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => _CullOpacityPageState();
|
||||
|
@ -13,10 +13,10 @@ enum FilterType {
|
||||
|
||||
class FilteredChildAnimationPage extends StatefulWidget {
|
||||
const FilteredChildAnimationPage(this.initialFilterType, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.initialComplexChild = true,
|
||||
this.initialUseRepaintBoundary = true,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final FilterType initialFilterType;
|
||||
final bool initialComplexChild;
|
||||
|
@ -48,7 +48,7 @@ const String textLotsOfText = 'Lorem ipsum dolor sit amet, consectetur '
|
||||
'🦻 👃 🫀 🫁 🧠 🦷 🦴 👀 👁 👅 👄 💋 🩸';
|
||||
|
||||
class TextFieldPage extends StatelessWidget {
|
||||
const TextFieldPage({Key? key}) : super(key: key);
|
||||
const TextFieldPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HeavyGridViewPage extends StatelessWidget {
|
||||
const HeavyGridViewPage({Key? key}) : super(key: key);
|
||||
const HeavyGridViewPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
/// Displays a new (from image cache's perspective) large image every 500ms.
|
||||
class LargeImageChangerPage extends StatefulWidget {
|
||||
const LargeImageChangerPage({Key? key}) : super(key: key);
|
||||
const LargeImageChangerPage({super.key});
|
||||
|
||||
@override
|
||||
State<LargeImageChangerPage> createState() => _LargeImageChangerState();
|
||||
|
@ -7,7 +7,7 @@ import 'dart:typed_data';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LargeImagesPage extends StatelessWidget {
|
||||
const LargeImagesPage({Key? key}) : super(key: key);
|
||||
const LargeImagesPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -5,8 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MultiWidgetConstructTable extends StatefulWidget {
|
||||
const MultiWidgetConstructTable(this.columnCount, this.rowCount, {Key? key})
|
||||
: super(key: key);
|
||||
const MultiWidgetConstructTable(this.columnCount, this.rowCount, {super.key});
|
||||
|
||||
final int columnCount;
|
||||
final int rowCount;
|
||||
@ -98,8 +97,7 @@ class _MultiWidgetConstructTableState extends State<MultiWidgetConstructTable>
|
||||
|
||||
// This class is intended to break the original Widget tree
|
||||
class MyContainer extends StatelessWidget {
|
||||
const MyContainer({required this.color, required this.child, required this.constraints, Key? key})
|
||||
: super(key: key);
|
||||
const MyContainer({required this.color, required this.child, required this.constraints, super.key});
|
||||
final Color color;
|
||||
final Widget child;
|
||||
final BoxConstraints constraints;
|
||||
|
@ -12,7 +12,7 @@ import '../common.dart';
|
||||
// combinations of children that can apply it themselves.
|
||||
// See https://github.com/flutter/flutter/issues/75697
|
||||
class OpacityPeepholePage extends StatelessWidget {
|
||||
const OpacityPeepholePage({Key? key}) : super(key: key);
|
||||
const OpacityPeepholePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -419,7 +419,7 @@ Map<String, WidgetBuilder> opacityPeepholeRoutes = <String, WidgetBuilder>{
|
||||
};
|
||||
|
||||
class VariantPage extends StatefulWidget {
|
||||
const VariantPage({Key? key, required this.variant}) : super(key: key);
|
||||
const VariantPage({super.key, required this.variant});
|
||||
|
||||
final OpacityPeepholeCase variant;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PictureCachePage extends StatelessWidget {
|
||||
const PictureCachePage({Key? key}) : super(key: key);
|
||||
const PictureCachePage({super.key});
|
||||
|
||||
static const List<String> kTabNames = <String>['1', '2', '3', '4', '5'];
|
||||
|
||||
@ -45,8 +45,7 @@ class PictureCachePage extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ListItem extends StatelessWidget {
|
||||
const ListItem({Key? key, required this.index})
|
||||
: super(key: key);
|
||||
const ListItem({super.key, required this.index});
|
||||
|
||||
final int index;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PictureCacheComplexityScoringPage extends StatelessWidget {
|
||||
const PictureCacheComplexityScoringPage({Key? key}) : super(key: key);
|
||||
const PictureCacheComplexityScoringPage({super.key});
|
||||
|
||||
static const List<String> kTabNames = <String>['1', '2'];
|
||||
|
||||
|
@ -7,7 +7,7 @@ import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PostBackdropFilterPage extends StatefulWidget {
|
||||
const PostBackdropFilterPage({Key? key}) : super(key: key);
|
||||
const PostBackdropFilterPage({super.key});
|
||||
|
||||
@override
|
||||
State<PostBackdropFilterPage> createState() => _PostBackdropFilterPageState();
|
||||
|
@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
import 'picture_cache.dart';
|
||||
|
||||
class ShaderMaskCachePage extends StatefulWidget {
|
||||
const ShaderMaskCachePage({Key? key}) : super(key: key);
|
||||
const ShaderMaskCachePage({super.key});
|
||||
@override
|
||||
State<ShaderMaskCachePage> createState() => _ShaderMaskCachePageState();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SimpleAnimationPage extends StatelessWidget {
|
||||
const SimpleAnimationPage({Key? key}) : super(key: key);
|
||||
const SimpleAnimationPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SimpleScroll extends StatelessWidget {
|
||||
const SimpleScroll({Key? key}) : super(key: key);
|
||||
const SimpleScroll({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -81,7 +81,7 @@ final GetStackPointerCallback getStackPointer = () {
|
||||
}();
|
||||
|
||||
class StackSizePage extends StatelessWidget {
|
||||
const StackSizePage({Key? key}) : super(key: key);
|
||||
const StackSizePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -100,7 +100,7 @@ class StackSizePage extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ParentWidget extends StatelessWidget {
|
||||
const ParentWidget({Key? key}) : super(key: key);
|
||||
const ParentWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -110,7 +110,7 @@ class ParentWidget extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ChildWidget extends StatelessWidget {
|
||||
const ChildWidget({required this.parentStackSize, Key? key}) : super(key: key);
|
||||
const ChildWidget({required this.parentStackSize, super.key});
|
||||
final int parentStackSize;
|
||||
|
||||
@override
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextPage extends StatelessWidget {
|
||||
const TextPage({Key? key}) : super(key: key);
|
||||
const TextPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -52,7 +52,7 @@ class BenchBuildImage extends WidgetRecorder {
|
||||
}
|
||||
|
||||
class _RotatingWidget extends StatefulWidget {
|
||||
const _RotatingWidget({required this.child, Key? key}) : super(key: key);
|
||||
const _RotatingWidget({required this.child});
|
||||
|
||||
final Widget child;
|
||||
|
||||
|
@ -35,7 +35,7 @@ class BenchCardInfiniteScroll extends WidgetRecorder {
|
||||
}
|
||||
|
||||
class _InfiniteScrollCards extends StatefulWidget {
|
||||
const _InfiniteScrollCards(this.initialOffset, this.finalOffset, {Key? key}) : super(key: key);
|
||||
const _InfiniteScrollCards(this.initialOffset, this.finalOffset);
|
||||
|
||||
final double initialOffset;
|
||||
final double finalOffset;
|
||||
|
@ -36,7 +36,7 @@ class BenchLinkInfiniteScroll extends WidgetRecorder {
|
||||
}
|
||||
|
||||
class _InfiniteScrollLinks extends StatefulWidget {
|
||||
const _InfiniteScrollLinks(this.initialOffset, this.finalOffset, {Key? key}) : super(key: key);
|
||||
const _InfiniteScrollLinks(this.initialOffset, this.finalOffset);
|
||||
|
||||
final double initialOffset;
|
||||
final double finalOffset;
|
||||
|
@ -26,7 +26,7 @@ class BenchPageViewScrollLineThrough extends WidgetRecorder {
|
||||
}
|
||||
|
||||
class _MyScrollContainer extends StatefulWidget {
|
||||
const _MyScrollContainer({Key? key}) : super(key: key);
|
||||
const _MyScrollContainer();
|
||||
|
||||
@override
|
||||
State<_MyScrollContainer> createState() => _MyScrollContainerState();
|
||||
|
@ -336,14 +336,13 @@ final List<Palette> allPalettes = <Palette>[
|
||||
|
||||
class ColorItem extends StatelessWidget {
|
||||
const ColorItem({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.index,
|
||||
required this.color,
|
||||
this.prefix = '',
|
||||
}) : assert(index != null),
|
||||
assert(color != null),
|
||||
assert(prefix != null),
|
||||
super(key: key);
|
||||
assert(prefix != null);
|
||||
|
||||
final int index;
|
||||
final Color color;
|
||||
@ -378,9 +377,9 @@ class ColorItem extends StatelessWidget {
|
||||
|
||||
class PaletteTabView extends StatelessWidget {
|
||||
const PaletteTabView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.colors,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Palette colors;
|
||||
|
||||
@ -431,7 +430,7 @@ class PaletteTabView extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ColorsDemo extends StatelessWidget {
|
||||
const ColorsDemo({Key? key}) : super(key: key);
|
||||
const ColorsDemo({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -29,7 +29,7 @@ class BenchWrapBoxScroll extends WidgetRecorder {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key}) : super(key: key);
|
||||
const MyHomePage({super.key});
|
||||
|
||||
@override
|
||||
State<MyHomePage> createState() => _MyHomePageState();
|
||||
@ -82,7 +82,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
}
|
||||
|
||||
class ProductPreview extends StatelessWidget {
|
||||
const ProductPreview(this.previewIndex, {Key? key}) : super(key: key);
|
||||
const ProductPreview(this.previewIndex, {super.key});
|
||||
|
||||
final int previewIndex;
|
||||
|
||||
@ -141,9 +141,9 @@ class ProductPreview extends StatelessWidget {
|
||||
|
||||
class ProductOption extends StatelessWidget {
|
||||
const ProductOption({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.optionText,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final String optionText;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ButtonMatrixApp extends StatefulWidget {
|
||||
const ButtonMatrixApp({Key? key}) : super(key: key);
|
||||
const ButtonMatrixApp({super.key});
|
||||
|
||||
@override
|
||||
ButtonMatrixAppState createState() => ButtonMatrixAppState();
|
||||
|
@ -15,7 +15,7 @@ void topMain() => runApp(const MyApp(Colors.green));
|
||||
void bottomMain() => runApp(const MyApp(Colors.purple));
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp(this.color, {Key? key}) : super(key: key);
|
||||
const MyApp(this.color, {super.key});
|
||||
|
||||
final Color color;
|
||||
|
||||
@ -32,7 +32,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, this.title});
|
||||
final String? title;
|
||||
|
||||
@override
|
||||
|
@ -275,7 +275,7 @@ Future<void> _runTests() async {
|
||||
}
|
||||
|
||||
class _BenchmarkWidget extends StatefulWidget {
|
||||
const _BenchmarkWidget(this.tests, {Key? key}) : super(key: key);
|
||||
const _BenchmarkWidget(this.tests);
|
||||
|
||||
final Future<void> Function() tests;
|
||||
|
||||
|
@ -10,7 +10,7 @@ import 'stock_strings.dart';
|
||||
|
||||
/// The translations for English (`en`).
|
||||
class StockStringsEn extends StockStrings {
|
||||
StockStringsEn([String locale = 'en']) : super(locale);
|
||||
StockStringsEn([super.locale = 'en']);
|
||||
|
||||
@override
|
||||
String get title => 'Stocks';
|
||||
|
@ -10,7 +10,7 @@ import 'stock_strings.dart';
|
||||
|
||||
/// The translations for Spanish Castilian (`es`).
|
||||
class StockStringsEs extends StockStrings {
|
||||
StockStringsEs([String locale = 'es']) : super(locale);
|
||||
StockStringsEs([super.locale = 'es']);
|
||||
|
||||
@override
|
||||
String get title => 'Acciones';
|
||||
|
@ -20,7 +20,7 @@ import 'stock_symbol_viewer.dart';
|
||||
import 'stock_types.dart';
|
||||
|
||||
class StocksApp extends StatefulWidget {
|
||||
const StocksApp({Key? key}) : super(key: key);
|
||||
const StocksApp({super.key});
|
||||
|
||||
@override
|
||||
StocksAppState createState() => StocksAppState();
|
||||
|
@ -56,7 +56,7 @@ class StockArrowPainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class StockArrow extends StatelessWidget {
|
||||
const StockArrow({ Key? key, required this.percentChange }) : super(key: key);
|
||||
const StockArrow({ super.key, required this.percentChange });
|
||||
|
||||
final double percentChange;
|
||||
|
||||
|
@ -52,7 +52,7 @@ class _NotImplementedDialog extends StatelessWidget {
|
||||
}
|
||||
|
||||
class StockHome extends StatefulWidget {
|
||||
const StockHome(this.stocks, this.configuration, this.updater, {Key? key}) : super(key: key);
|
||||
const StockHome(this.stocks, this.configuration, this.updater, {super.key});
|
||||
|
||||
final StockData stocks;
|
||||
final StockConfiguration configuration;
|
||||
|
@ -9,12 +9,12 @@ import 'stock_row.dart';
|
||||
|
||||
class StockList extends StatelessWidget {
|
||||
const StockList({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.stocks,
|
||||
required this.onOpen,
|
||||
required this.onShow,
|
||||
required this.onAction,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final List<Stock> stocks;
|
||||
final StockRowActionCallback onOpen;
|
||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import 'stock_types.dart';
|
||||
|
||||
class StockSettings extends StatefulWidget {
|
||||
const StockSettings(this.configuration, this.updater, {Key? key}) : super(key: key);
|
||||
const StockSettings(this.configuration, this.updater, {super.key});
|
||||
|
||||
final StockConfiguration configuration;
|
||||
final ValueChanged<StockConfiguration> updater;
|
||||
|
@ -69,10 +69,10 @@ class _StockSymbolView extends StatelessWidget {
|
||||
|
||||
class StockSymbolPage extends StatelessWidget {
|
||||
const StockSymbolPage({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.symbol,
|
||||
required this.stocks,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final String symbol;
|
||||
final StockData stocks;
|
||||
@ -121,9 +121,9 @@ class StockSymbolPage extends StatelessWidget {
|
||||
|
||||
class StockSymbolBottomSheet extends StatelessWidget {
|
||||
const StockSymbolBottomSheet({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.stock,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Stock stock;
|
||||
|
||||
|
@ -74,12 +74,9 @@ class NextContext extends Context {
|
||||
const NextContext({
|
||||
required this.autoAccept,
|
||||
required this.force,
|
||||
required Checkouts checkouts,
|
||||
required File stateFile,
|
||||
}) : super(
|
||||
checkouts: checkouts,
|
||||
stateFile: stateFile,
|
||||
);
|
||||
required super.checkouts,
|
||||
required super.stateFile,
|
||||
});
|
||||
|
||||
final bool autoAccept;
|
||||
final bool force;
|
||||
|
@ -467,26 +467,20 @@ abstract class Repository {
|
||||
class FrameworkRepository extends Repository {
|
||||
FrameworkRepository(
|
||||
this.checkouts, {
|
||||
String name = 'framework',
|
||||
Remote upstreamRemote = const Remote(
|
||||
super.name = 'framework',
|
||||
super.upstreamRemote = const Remote(
|
||||
name: RemoteName.upstream, url: FrameworkRepository.defaultUpstream),
|
||||
bool localUpstream = false,
|
||||
String? previousCheckoutLocation,
|
||||
String initialRef = FrameworkRepository.defaultBranch,
|
||||
Remote? mirrorRemote,
|
||||
super.localUpstream,
|
||||
super.previousCheckoutLocation,
|
||||
String super.initialRef = FrameworkRepository.defaultBranch,
|
||||
super.mirrorRemote,
|
||||
List<String>? additionalRequiredLocalBranches,
|
||||
}) : super(
|
||||
name: name,
|
||||
upstreamRemote: upstreamRemote,
|
||||
mirrorRemote: mirrorRemote,
|
||||
initialRef: initialRef,
|
||||
fileSystem: checkouts.fileSystem,
|
||||
localUpstream: localUpstream,
|
||||
parentDirectory: checkouts.directory,
|
||||
platform: checkouts.platform,
|
||||
processManager: checkouts.processManager,
|
||||
stdio: checkouts.stdio,
|
||||
previousCheckoutLocation: previousCheckoutLocation,
|
||||
requiredLocalBranches: <String>[
|
||||
...?additionalRequiredLocalBranches,
|
||||
...kReleaseChannels,
|
||||
@ -757,26 +751,20 @@ class HostFrameworkRepository extends FrameworkRepository {
|
||||
class EngineRepository extends Repository {
|
||||
EngineRepository(
|
||||
this.checkouts, {
|
||||
String name = 'engine',
|
||||
String initialRef = EngineRepository.defaultBranch,
|
||||
Remote upstreamRemote = const Remote(
|
||||
super.name = 'engine',
|
||||
String super.initialRef = EngineRepository.defaultBranch,
|
||||
super.upstreamRemote = const Remote(
|
||||
name: RemoteName.upstream, url: EngineRepository.defaultUpstream),
|
||||
bool localUpstream = false,
|
||||
String? previousCheckoutLocation,
|
||||
Remote? mirrorRemote,
|
||||
super.localUpstream,
|
||||
super.previousCheckoutLocation,
|
||||
super.mirrorRemote,
|
||||
List<String>? additionalRequiredLocalBranches,
|
||||
}) : super(
|
||||
name: name,
|
||||
upstreamRemote: upstreamRemote,
|
||||
mirrorRemote: mirrorRemote,
|
||||
initialRef: initialRef,
|
||||
fileSystem: checkouts.fileSystem,
|
||||
localUpstream: localUpstream,
|
||||
parentDirectory: checkouts.directory,
|
||||
platform: checkouts.platform,
|
||||
processManager: checkouts.processManager,
|
||||
stdio: checkouts.stdio,
|
||||
previousCheckoutLocation: previousCheckoutLocation,
|
||||
requiredLocalBranches: additionalRequiredLocalBranches ?? const <String>[],
|
||||
);
|
||||
|
||||
|
@ -227,8 +227,8 @@ class StartContext extends Context {
|
||||
required this.conductorVersion,
|
||||
required this.processManager,
|
||||
required this.releaseChannel,
|
||||
required Checkouts checkouts,
|
||||
required File stateFile,
|
||||
required super.checkouts,
|
||||
required super.stateFile,
|
||||
this.force = false,
|
||||
this.versionOverride,
|
||||
}) : git = Git(processManager),
|
||||
@ -254,10 +254,6 @@ class StartContext extends Context {
|
||||
name: RemoteName.mirror,
|
||||
url: frameworkMirror,
|
||||
),
|
||||
),
|
||||
super(
|
||||
checkouts: checkouts,
|
||||
stateFile: stateFile,
|
||||
);
|
||||
|
||||
final String candidateBranch;
|
||||
|
@ -5,7 +5,6 @@
|
||||
import 'package:args/command_runner.dart';
|
||||
import 'package:conductor_core/src/codesign.dart';
|
||||
import 'package:conductor_core/src/repository.dart';
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:platform/platform.dart';
|
||||
|
||||
@ -512,11 +511,11 @@ void main() {
|
||||
|
||||
class FakeCodesignCommand extends CodesignCommand {
|
||||
FakeCodesignCommand({
|
||||
required Checkouts checkouts,
|
||||
required super.checkouts,
|
||||
required this.binariesWithEntitlements,
|
||||
required this.binariesWithoutEntitlements,
|
||||
required Directory flutterRoot,
|
||||
}) : super(checkouts: checkouts, flutterRoot: flutterRoot);
|
||||
required super.flutterRoot,
|
||||
});
|
||||
|
||||
@override
|
||||
final Future<List<String>> binariesWithEntitlements;
|
||||
|
@ -1196,16 +1196,9 @@ class _TestRepository extends Repository {
|
||||
|
||||
class _TestNextContext extends NextContext {
|
||||
const _TestNextContext({
|
||||
bool autoAccept = false,
|
||||
bool force = false,
|
||||
required File stateFile,
|
||||
required Checkouts checkouts,
|
||||
}) : super(
|
||||
autoAccept: autoAccept,
|
||||
force: force,
|
||||
checkouts: checkouts,
|
||||
stateFile: stateFile,
|
||||
);
|
||||
required super.stateFile,
|
||||
required super.checkouts,
|
||||
}) : super(autoAccept: false, force: false);
|
||||
|
||||
@override
|
||||
Future<bool> prompt(String message) {
|
||||
|
@ -2,7 +2,7 @@ name: customer_testing
|
||||
description: Tool to run the tests listed in the flutter/tests repository.
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: '>=2.17.0-0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
args: 2.3.0
|
||||
|
@ -2,7 +2,7 @@ name: forbidden_from_release_tests
|
||||
publish_to: 'none'
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: '>=2.17.0-0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
args: 2.3.0
|
||||
|
@ -14,7 +14,7 @@ Future<void> main() async {
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
const HomePage({Key? key}) : super(key: key);
|
||||
const HomePage({super.key});
|
||||
|
||||
@override
|
||||
State<HomePage> createState() => _HomePage();
|
||||
@ -55,7 +55,7 @@ class _HomePage extends State<HomePage> {
|
||||
}
|
||||
|
||||
class SecondPage extends StatelessWidget {
|
||||
const SecondPage({Key? key}) : super(key: key);
|
||||
const SecondPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -20,7 +20,7 @@ void main() {
|
||||
}
|
||||
|
||||
class Home extends StatelessWidget {
|
||||
const Home({Key? key}) : super(key: key);
|
||||
const Home({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -44,7 +44,7 @@ class FutureDataHandler {
|
||||
FutureDataHandler driverDataHandler = FutureDataHandler();
|
||||
|
||||
class MotionEventsBody extends StatefulWidget {
|
||||
const MotionEventsBody({Key? key}) : super(key: key);
|
||||
const MotionEventsBody({super.key});
|
||||
|
||||
@override
|
||||
State createState() => MotionEventsBodyState();
|
||||
@ -259,7 +259,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
}
|
||||
|
||||
class TouchEventDiff extends StatelessWidget {
|
||||
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {Key? key}) : super(key: key);
|
||||
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {super.key});
|
||||
|
||||
final Map<String, dynamic> originalEvent;
|
||||
final Map<String, dynamic> synthesizedEvent;
|
||||
|
@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
//
|
||||
/// A testing page has to override this in order to be put as one of the items in the main page.
|
||||
abstract class PageWidget extends StatelessWidget {
|
||||
const PageWidget(this.title, this.tileKey, {Key? key}) : super(key: key);
|
||||
const PageWidget(this.title, this.tileKey, {super.key});
|
||||
|
||||
/// The title of the testing page
|
||||
///
|
||||
|
@ -18,7 +18,7 @@ class WindowManagerIntegrationsPage extends PageWidget {
|
||||
}
|
||||
|
||||
class WindowManagerBody extends StatefulWidget {
|
||||
const WindowManagerBody({Key? key}) : super(key: key);
|
||||
const WindowManagerBody({super.key});
|
||||
|
||||
@override
|
||||
State<WindowManagerBody> createState() => WindowManagerBodyState();
|
||||
|
@ -4,7 +4,7 @@ publish_to: none
|
||||
description: An integration test for embedded platform views
|
||||
version: 1.0.0+1
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: '>=2.17.0-0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
@ -19,7 +19,7 @@ void main() {
|
||||
}
|
||||
|
||||
class TestApp extends StatefulWidget {
|
||||
const TestApp({Key? key}) : super(key: key);
|
||||
const TestApp({super.key});
|
||||
|
||||
@override
|
||||
State<TestApp> createState() => _TestAppState();
|
||||
|
@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class LogoScreen extends StatelessWidget {
|
||||
const LogoScreen({Key? key}) : super(key: key);
|
||||
const LogoScreen({super.key});
|
||||
|
||||
static const String _testSentinel = 'Running deferred code';
|
||||
|
||||
|
@ -15,7 +15,7 @@ void main() {
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -31,7 +31,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key}) : super(key: key);
|
||||
const MyHomePage({super.key});
|
||||
|
||||
@override
|
||||
MyHomePageState createState() => MyHomePageState();
|
||||
|
@ -3,7 +3,7 @@ description: Integration test application for basic deferred components function
|
||||
publish_to: 'none'
|
||||
version: 1.0.0+1
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: '>=2.17.0-0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
@ -15,7 +15,7 @@ void main() {
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
State createState() => MyAppState();
|
||||
|
@ -16,7 +16,7 @@ void runMainApp() {
|
||||
}
|
||||
|
||||
class Flavor extends StatefulWidget {
|
||||
const Flavor({Key? key}) : super(key: key);
|
||||
const Flavor({super.key});
|
||||
|
||||
@override
|
||||
State<Flavor> createState() => _FlavorState();
|
||||
|
@ -15,12 +15,11 @@ class AndroidPlatformView extends StatelessWidget {
|
||||
/// native view.
|
||||
/// `viewType` identifies the type of Android view to create.
|
||||
const AndroidPlatformView({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.onPlatformViewCreated,
|
||||
this.useHybridComposition = false,
|
||||
required this.viewType,
|
||||
}) : assert(viewType != null),
|
||||
super(key: key);
|
||||
}) : assert(viewType != null);
|
||||
|
||||
/// The unique identifier for the view type to be embedded by this widget.
|
||||
///
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
||||
}
|
||||
|
||||
class Home extends StatelessWidget {
|
||||
const Home({Key? key}) : super(key: key);
|
||||
const Home({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -27,7 +27,7 @@ class MotionEventsPage extends PageWidget {
|
||||
}
|
||||
|
||||
class MotionEventsBody extends StatefulWidget {
|
||||
const MotionEventsBody({Key? key}) : super(key: key);
|
||||
const MotionEventsBody({super.key});
|
||||
|
||||
@override
|
||||
State createState() => MotionEventsBodyState();
|
||||
@ -231,7 +231,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
||||
}
|
||||
|
||||
class TouchEventDiff extends StatelessWidget {
|
||||
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {Key? key}) : super(key: key);
|
||||
const TouchEventDiff(this.originalEvent, this.synthesizedEvent, {super.key});
|
||||
|
||||
final Map<String, dynamic> originalEvent;
|
||||
final Map<String, dynamic> synthesizedEvent;
|
||||
|
@ -20,7 +20,7 @@ class NestedViewEventPage extends PageWidget {
|
||||
}
|
||||
|
||||
class NestedViewEventBody extends StatefulWidget {
|
||||
const NestedViewEventBody({Key? key}) : super(key: key);
|
||||
const NestedViewEventBody({super.key});
|
||||
|
||||
@override
|
||||
State<NestedViewEventBody> createState() => NestedViewEventBodyState();
|
||||
|
@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
//
|
||||
/// A testing page has to override this in order to be put as one of the items in the main page.
|
||||
abstract class PageWidget extends StatelessWidget {
|
||||
const PageWidget(this.title, this.tileKey, {Key? key}) : super(key: key);
|
||||
const PageWidget(this.title, this.tileKey, {super.key});
|
||||
|
||||
/// The title of the testing page
|
||||
///
|
||||
|
@ -4,7 +4,7 @@ publish_to: none
|
||||
description: An integration test for hybrid composition on Android
|
||||
version: 1.0.0+1
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: '>=2.17.0-0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
@ -27,7 +27,7 @@ void main() {
|
||||
///
|
||||
/// Rewiring semantics is a signal to native IOS test that the test has passed.
|
||||
class LifeCycleSpy extends StatefulWidget {
|
||||
const LifeCycleSpy({Key? key}) : super(key: key);
|
||||
const LifeCycleSpy({super.key});
|
||||
|
||||
@override
|
||||
State<LifeCycleSpy> createState() => _LifeCycleSpyState();
|
||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
@ -32,7 +32,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, this.title});
|
||||
|
||||
// This widget is the home page of your application. It is stateful, meaning
|
||||
// that it has a State object (defined below) that contains fields that affect
|
||||
|
@ -12,7 +12,7 @@ void main() {
|
||||
|
||||
/// The main app entrance of the test
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -30,7 +30,7 @@ class MyApp extends StatelessWidget {
|
||||
///
|
||||
/// On press the button, a page with platform view should be pushed into the scene.
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, this.title});
|
||||
final String? title;
|
||||
|
||||
@override
|
||||
@ -69,7 +69,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
|
||||
/// A page contains the platform view to be tested.
|
||||
class PlatformViewPage extends StatelessWidget {
|
||||
const PlatformViewPage({Key? key}) : super(key: key);
|
||||
const PlatformViewPage({super.key});
|
||||
|
||||
static Key button = const ValueKey<String>('plus_button');
|
||||
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
}
|
||||
|
||||
class TestApp extends StatefulWidget {
|
||||
const TestApp({Key? key}) : super(key: key);
|
||||
const TestApp({super.key});
|
||||
|
||||
@override
|
||||
State<TestApp> createState() => _TestAppState();
|
||||
|
@ -11,7 +11,7 @@ void main() {
|
||||
}
|
||||
|
||||
class Test extends SingleChildRenderObjectWidget {
|
||||
const Test({ Key? key }) : super(key: key);
|
||||
const Test({ super.key });
|
||||
|
||||
@override
|
||||
RenderTest createRenderObject(BuildContext context) => RenderTest();
|
||||
|
@ -11,7 +11,7 @@ void main() {
|
||||
}
|
||||
|
||||
class DriverTestApp extends StatefulWidget {
|
||||
const DriverTestApp({Key? key}) : super(key: key);
|
||||
const DriverTestApp({super.key});
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
|
@ -12,7 +12,7 @@ void main() {
|
||||
}
|
||||
|
||||
class Empty extends StatelessWidget {
|
||||
const Empty({Key? key}) : super(key: key);
|
||||
const Empty({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Container();
|
||||
|
@ -26,9 +26,8 @@ void main() {
|
||||
|
||||
class _FirstFrameTimings extends StatefulWidget {
|
||||
const _FirstFrameTimings({
|
||||
Key? key,
|
||||
required this.completer,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Completer<List<FrameTiming>> completer;
|
||||
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key}) : super(key: key);
|
||||
const MyHomePage({super.key});
|
||||
|
||||
@override
|
||||
State<MyHomePage> createState() => _MyHomePageState();
|
||||
|
@ -14,7 +14,7 @@ void main() {
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -27,7 +27,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key}) : super(key: key);
|
||||
const MyHomePage({super.key});
|
||||
|
||||
@override
|
||||
State<MyHomePage> createState() => _MyHomePageState();
|
||||
|
@ -14,7 +14,7 @@ void main() {
|
||||
}
|
||||
|
||||
class ShowLicenses extends StatelessWidget {
|
||||
const ShowLicenses({Key? key}) : super(key: key);
|
||||
const ShowLicenses({super.key});
|
||||
|
||||
Widget _buildTestResultWidget(
|
||||
BuildContext context,
|
||||
|
@ -9,7 +9,7 @@ void main() {
|
||||
}
|
||||
|
||||
class Test extends StatefulWidget {
|
||||
const Test({ Key? key }) : super(key: key);
|
||||
const Test({ super.key });
|
||||
|
||||
@override
|
||||
State<Test> createState() => _TestState();
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
}
|
||||
|
||||
class Toggler extends StatefulWidget {
|
||||
const Toggler({Key? key}) : super(key: key);
|
||||
const Toggler({super.key});
|
||||
|
||||
@override
|
||||
State<Toggler> createState() => TogglerState();
|
||||
|
@ -62,7 +62,7 @@ bool _errorMessageFormattedCorrectly(String errorMessage) {
|
||||
}
|
||||
|
||||
class ThrowingWidget extends StatefulWidget {
|
||||
const ThrowingWidget({Key? key}) : super(key: key);
|
||||
const ThrowingWidget({super.key});
|
||||
|
||||
@override
|
||||
State<ThrowingWidget> createState() => _ThrowingWidgetState();
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: web_compile_tests
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
sdk: '>=2.17.0-0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
@ -27,7 +27,7 @@ Future<void> main() async {
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
MyAppState createState() => MyAppState();
|
||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -20,7 +20,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
final String title;
|
||||
|
||||
|
@ -9,7 +9,7 @@ void main() {
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
MyAppState createState() => MyAppState();
|
||||
|
@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
@ -27,7 +27,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
final String title;
|
||||
|
||||
|
@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -21,7 +21,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatelessWidget {
|
||||
const MyHomePage({Key? key}) : super(key: key);
|
||||
const MyHomePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -20,7 +20,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, this.title});
|
||||
|
||||
final String? title;
|
||||
|
||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -20,7 +20,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
final String title;
|
||||
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp(this.routes, {Key? key}) : super(key: key);
|
||||
const MyApp(this.routes, {super.key});
|
||||
|
||||
final Map<String, WidgetBuilder> routes;
|
||||
|
||||
|
@ -310,7 +310,7 @@ class UndoableDirectionalFocusAction extends UndoableFocusActionBase<Directional
|
||||
|
||||
/// A button class that takes focus when clicked.
|
||||
class DemoButton extends StatefulWidget {
|
||||
const DemoButton({Key? key, required this.name}) : super(key: key);
|
||||
const DemoButton({super.key, required this.name});
|
||||
|
||||
final String name;
|
||||
|
||||
@ -356,7 +356,7 @@ class _DemoButtonState extends State<DemoButton> {
|
||||
}
|
||||
|
||||
class FocusDemo extends StatefulWidget {
|
||||
const FocusDemo({Key? key}) : super(key: key);
|
||||
const FocusDemo({super.key});
|
||||
|
||||
static GlobalKey appKey = GlobalKey();
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedIconsTestApp extends StatelessWidget {
|
||||
const AnimatedIconsTestApp({Key? key}) : super(key: key);
|
||||
const AnimatedIconsTestApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -19,7 +19,7 @@ class AnimatedIconsTestApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class IconsList extends StatelessWidget {
|
||||
const IconsList({Key? key}) : super(key: key);
|
||||
const IconsList({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -30,7 +30,7 @@ class IconsList extends StatelessWidget {
|
||||
}
|
||||
|
||||
class IconSampleRow extends StatefulWidget {
|
||||
const IconSampleRow(this.sample, {Key? key}) : super(key: key);
|
||||
const IconSampleRow(this.sample, {super.key});
|
||||
|
||||
final IconSample sample;
|
||||
|
||||
|
@ -18,7 +18,7 @@ class CardModel {
|
||||
}
|
||||
|
||||
class CardCollection extends StatefulWidget {
|
||||
const CardCollection({Key? key}) : super(key: key);
|
||||
const CardCollection({super.key});
|
||||
|
||||
@override
|
||||
CardCollectionState createState() => CardCollectionState();
|
||||
|
@ -5,7 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ColorTestingDemo extends StatelessWidget {
|
||||
const ColorTestingDemo({ Key? key }) : super(key: key);
|
||||
const ColorTestingDemo({ super.key });
|
||||
|
||||
static const String routeName = '/color_demo';
|
||||
|
||||
@ -14,7 +14,7 @@ class ColorTestingDemo extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ColorDemoHome extends StatelessWidget {
|
||||
const ColorDemoHome({Key? key}) : super(key: key);
|
||||
const ColorDemoHome({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -52,7 +52,7 @@ class ColorDemoHome extends StatelessWidget {
|
||||
}
|
||||
|
||||
class GradientRow extends StatelessWidget {
|
||||
const GradientRow({ Key? key, required this.rightColor, required this.leftColor }) : super(key: key);
|
||||
const GradientRow({ super.key, required this.rightColor, required this.leftColor });
|
||||
|
||||
final Color leftColor;
|
||||
final Color rightColor;
|
||||
@ -73,7 +73,7 @@ class GradientRow extends StatelessWidget {
|
||||
}
|
||||
|
||||
class ColorRow extends StatelessWidget {
|
||||
const ColorRow({ Key? key, required this.color }) : super(key: key);
|
||||
const ColorRow({ super.key, required this.color });
|
||||
|
||||
final Color color;
|
||||
|
||||
|
@ -22,7 +22,7 @@ final MaterialColor m2Swatch = MaterialColor(m2SwatchColors[500]!.value, m2Swatc
|
||||
void main() => runApp(const MyApp());
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
const MyApp({super.key});
|
||||
|
||||
static const String _title = 'Density Test';
|
||||
|
||||
@ -36,7 +36,7 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
final String title;
|
||||
|
||||
@ -112,7 +112,7 @@ class OptionModel extends ChangeNotifier {
|
||||
}
|
||||
|
||||
class LabeledCheckbox extends StatelessWidget {
|
||||
const LabeledCheckbox({Key? key, required this.label, this.onChanged, this.value}) : super(key: key);
|
||||
const LabeledCheckbox({super.key, required this.label, this.onChanged, this.value});
|
||||
|
||||
final String label;
|
||||
final ValueChanged<bool?>? onChanged;
|
||||
@ -134,7 +134,7 @@ class LabeledCheckbox extends StatelessWidget {
|
||||
}
|
||||
|
||||
class Options extends StatefulWidget {
|
||||
const Options(this.model, {Key? key}) : super(key: key);
|
||||
const Options(this.model, {super.key});
|
||||
|
||||
final OptionModel model;
|
||||
|
||||
@ -365,10 +365,9 @@ class _OptionsState extends State<Options> {
|
||||
}
|
||||
|
||||
class _ControlTile extends StatelessWidget {
|
||||
const _ControlTile({Key? key, required this.label, required this.child})
|
||||
const _ControlTile({required this.label, required this.child})
|
||||
: assert(label != null),
|
||||
assert(child != null),
|
||||
super(key: key);
|
||||
assert(child != null);
|
||||
|
||||
final String label;
|
||||
final Widget child;
|
||||
|
@ -7,7 +7,7 @@ import 'dart:math' as math;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ExampleDragTarget extends StatefulWidget {
|
||||
const ExampleDragTarget({Key? key}) : super(key: key);
|
||||
const ExampleDragTarget({super.key});
|
||||
|
||||
@override
|
||||
ExampleDragTargetState createState() => ExampleDragTargetState();
|
||||
@ -44,7 +44,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> {
|
||||
}
|
||||
|
||||
class Dot extends StatefulWidget {
|
||||
const Dot({ Key? key, this.color, this.size, this.child, this.tappable = false }) : super(key: key);
|
||||
const Dot({ super.key, this.color, this.size, this.child, this.tappable = false });
|
||||
|
||||
final Color? color;
|
||||
final double? size;
|
||||
@ -77,12 +77,12 @@ class DotState extends State<Dot> {
|
||||
|
||||
class ExampleDragSource extends StatelessWidget {
|
||||
const ExampleDragSource({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.color,
|
||||
this.heavy = false,
|
||||
this.under = true,
|
||||
this.child,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Color? color;
|
||||
final bool heavy;
|
||||
@ -176,7 +176,7 @@ class DashOutlineCirclePainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class MovableBall extends StatelessWidget {
|
||||
const MovableBall(this.position, this.ballPosition, this.callback, {Key? key}) : super(key: key);
|
||||
const MovableBall(this.position, this.ballPosition, this.callback, {super.key});
|
||||
|
||||
final int position;
|
||||
final int ballPosition;
|
||||
@ -225,7 +225,7 @@ class MovableBall extends StatelessWidget {
|
||||
}
|
||||
|
||||
class DragAndDropApp extends StatefulWidget {
|
||||
const DragAndDropApp({Key? key}) : super(key: key);
|
||||
const DragAndDropApp({super.key});
|
||||
|
||||
@override
|
||||
DragAndDropAppState createState() => DragAndDropAppState();
|
||||
|
@ -13,7 +13,7 @@ void main() {
|
||||
}
|
||||
|
||||
class DemoButton extends StatefulWidget {
|
||||
const DemoButton({Key? key, required this.name, this.canRequestFocus = true, this.autofocus = false}) : super(key: key);
|
||||
const DemoButton({super.key, required this.name, this.canRequestFocus = true, this.autofocus = false});
|
||||
|
||||
final String name;
|
||||
final bool canRequestFocus;
|
||||
@ -68,7 +68,7 @@ class _DemoButtonState extends State<DemoButton> {
|
||||
}
|
||||
|
||||
class FocusDemo extends StatefulWidget {
|
||||
const FocusDemo({Key? key}) : super(key: key);
|
||||
const FocusDemo({super.key});
|
||||
|
||||
@override
|
||||
State<FocusDemo> createState() => _FocusDemoState();
|
||||
|
@ -12,7 +12,7 @@ void main() {
|
||||
}
|
||||
|
||||
class DemoButton extends StatelessWidget {
|
||||
const DemoButton({Key? key, required this.name}) : super(key: key);
|
||||
const DemoButton({super.key, required this.name});
|
||||
|
||||
final String name;
|
||||
|
||||
@ -30,7 +30,7 @@ class DemoButton extends StatelessWidget {
|
||||
}
|
||||
|
||||
class HoverDemo extends StatefulWidget {
|
||||
const HoverDemo({Key? key}) : super(key: key);
|
||||
const HoverDemo({super.key});
|
||||
|
||||
@override
|
||||
State<HoverDemo> createState() => _HoverDemoState();
|
||||
|
@ -101,7 +101,7 @@ class _PointDemoPainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class _PointDemo extends StatefulWidget {
|
||||
const _PointDemo({ Key? key, required this.controller }) : super(key: key);
|
||||
const _PointDemo({ super.key, required this.controller });
|
||||
|
||||
final AnimationController controller;
|
||||
|
||||
@ -268,7 +268,7 @@ class _RectangleDemoPainter extends CustomPainter {
|
||||
}
|
||||
|
||||
class _RectangleDemo extends StatefulWidget {
|
||||
const _RectangleDemo({ Key? key, required this.controller }) : super(key: key);
|
||||
const _RectangleDemo({ super.key, required this.controller });
|
||||
|
||||
final AnimationController controller;
|
||||
|
||||
@ -400,7 +400,7 @@ class _ArcDemo {
|
||||
}
|
||||
|
||||
class AnimationDemo extends StatefulWidget {
|
||||
const AnimationDemo({ Key? key }) : super(key: key);
|
||||
const AnimationDemo({ super.key });
|
||||
|
||||
@override
|
||||
State<AnimationDemo> createState() => _AnimationDemoState();
|
||||
|
@ -56,11 +56,11 @@ class _MarkerPainter extends CustomPainter {
|
||||
|
||||
class Marker extends StatelessWidget {
|
||||
const Marker({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.type = MarkerType.touch,
|
||||
this.position,
|
||||
this.size = 40.0,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Offset? position;
|
||||
final double size;
|
||||
@ -86,7 +86,7 @@ class Marker extends StatelessWidget {
|
||||
}
|
||||
|
||||
class OverlayGeometryApp extends StatefulWidget {
|
||||
const OverlayGeometryApp({Key? key}) : super(key: key);
|
||||
const OverlayGeometryApp({super.key});
|
||||
|
||||
@override
|
||||
OverlayGeometryAppState createState() => OverlayGeometryAppState();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user