1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Deps update, utilize super.key (#1265)

* Deps update, utilize `super.key`

* `flutter format`
This commit is contained in:
Brett Morgan
2022-05-13 12:31:56 -07:00
committed by GitHub
parent 52ef797b9a
commit 58bc5d7a58
244 changed files with 449 additions and 500 deletions

View File

@@ -189,8 +189,8 @@ class MyApp extends StatelessWidget {
required this.inAppPurchaseController,
required this.adsController,
required this.gamesServicesController,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View File

@@ -31,7 +31,7 @@ import 'preloaded_banner_ad.dart';
/// namely the `anchored_adaptive_example.dart` file:
/// https://github.com/googleads/googleads-mobile-flutter/blob/main/packages/google_mobile_ads/example/lib/anchored_adaptive_example.dart
class BannerAdWidget extends StatefulWidget {
const BannerAdWidget({Key? key}) : super(key: key);
const BannerAdWidget({super.key});
@override
State<BannerAdWidget> createState() => _BannerAdWidgetState();

View File

@@ -9,7 +9,7 @@ import 'package:provider/provider.dart';
class AppLifecycleObserver extends StatefulWidget {
final Widget child;
const AppLifecycleObserver({required this.child, Key? key}) : super(key: key);
const AppLifecycleObserver({required this.child, super.key});
@override
State<AppLifecycleObserver> createState() => _AppLifecycleObserverState();

View File

@@ -14,7 +14,7 @@ import '../style/responsive_screen.dart';
import 'levels.dart';
class LevelSelectionScreen extends StatelessWidget {
const LevelSelectionScreen({Key? key}) : super(key: key);
const LevelSelectionScreen({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -14,7 +14,7 @@ import '../style/palette.dart';
import '../style/responsive_screen.dart';
class MainMenuScreen extends StatelessWidget {
const MainMenuScreen({Key? key}) : super(key: key);
const MainMenuScreen({super.key});
@override
Widget build(BuildContext context) {

View File

@@ -24,7 +24,7 @@ import '../style/palette.dart';
class PlaySessionScreen extends StatefulWidget {
final GameLevel level;
const PlaySessionScreen(this.level, {Key? key}) : super(key: key);
const PlaySessionScreen(this.level, {super.key});
@override
State<PlaySessionScreen> createState() => _PlaySessionScreenState();

View File

@@ -17,7 +17,7 @@ void showCustomNameDialog(BuildContext context) {
class CustomNameDialog extends StatefulWidget {
final Animation<double> animation;
const CustomNameDialog({required this.animation, Key? key}) : super(key: key);
const CustomNameDialog({required this.animation, super.key});
@override
State<CustomNameDialog> createState() => _CustomNameDialogState();

View File

@@ -14,7 +14,7 @@ import 'custom_name_dialog.dart';
import 'settings.dart';
class SettingsScreen extends StatelessWidget {
const SettingsScreen({Key? key}) : super(key: key);
const SettingsScreen({super.key});
static const _gap = SizedBox(height: 60);
@@ -115,7 +115,7 @@ class SettingsScreen extends StatelessWidget {
class _NameChangeLine extends StatelessWidget {
final String title;
const _NameChangeLine(this.title, {Key? key}) : super(key: key);
const _NameChangeLine(this.title);
@override
Widget build(BuildContext context) {
@@ -159,8 +159,7 @@ class _SettingsLine extends StatelessWidget {
final VoidCallback? onSelected;
const _SettingsLine(this.title, this.icon, {this.onSelected, Key? key})
: super(key: key);
const _SettingsLine(this.title, this.icon, {this.onSelected});
@override
Widget build(BuildContext context) {

View File

@@ -32,8 +32,8 @@ class Confetti extends StatefulWidget {
const Confetti({
this.colors = _defaultColors,
this.isStopped = false,
Key? key,
}) : super(key: key);
super.key,
});
@override
State<Confetti> createState() => _ConfettiState();

View File

@@ -42,8 +42,7 @@ class _MyReveal extends StatefulWidget {
required this.child,
required this.animation,
required this.color,
Key? key,
}) : super(key: key);
});
@override
State<_MyReveal> createState() => _MyRevealState();

View File

@@ -28,8 +28,8 @@ class ResponsiveScreen extends StatelessWidget {
required this.rectangularMenuArea,
this.topMessageArea = const SizedBox.shrink(),
this.mainAreaProminence = 0.8,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View File

@@ -17,9 +17,9 @@ class WinGameScreen extends StatelessWidget {
final Score score;
const WinGameScreen({
Key? key,
super.key,
required this.score,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {