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

@@ -9,7 +9,7 @@ import 'routing.dart';
import 'screens/navigator.dart';
class Bookstore extends StatefulWidget {
const Bookstore({Key? key}) : super(key: key);
const Bookstore({super.key});
@override
State<Bookstore> createState() => _BookstoreState();

View File

@@ -36,10 +36,10 @@ class BookstoreAuth extends ChangeNotifier {
class BookstoreAuthScope extends InheritedNotifier<BookstoreAuth> {
const BookstoreAuthScope({
required BookstoreAuth notifier,
required Widget child,
Key? key,
}) : super(key: key, notifier: notifier, child: child);
required super.notifier,
required super.child,
super.key,
});
static BookstoreAuth of(BuildContext context) => context
.dependOnInheritedWidgetOfExactType<BookstoreAuthScope>()!

View File

@@ -38,10 +38,10 @@ class RouteState extends ChangeNotifier {
/// Provides the current [RouteState] to descendant widgets in the tree.
class RouteStateScope extends InheritedNotifier<RouteState> {
const RouteStateScope({
required RouteState notifier,
required Widget child,
Key? key,
}) : super(key: key, notifier: notifier, child: child);
required super.notifier,
required super.child,
super.key,
});
static RouteState of(BuildContext context) =>
context.dependOnInheritedWidgetOfExactType<RouteStateScope>()!.notifier!;

View File

@@ -12,9 +12,9 @@ class AuthorDetailsScreen extends StatelessWidget {
final Author author;
const AuthorDetailsScreen({
Key? key,
super.key,
required this.author,
}) : super(key: key);
});
@override
Widget build(BuildContext context) => Scaffold(

View File

@@ -11,7 +11,7 @@ import '../widgets/author_list.dart';
class AuthorsScreen extends StatelessWidget {
final String title = 'Authors';
const AuthorsScreen({Key? key}) : super(key: key);
const AuthorsScreen({super.key});
@override
Widget build(BuildContext context) => Scaffold(

View File

@@ -12,9 +12,9 @@ class BookDetailsScreen extends StatelessWidget {
final Book? book;
const BookDetailsScreen({
Key? key,
super.key,
this.book,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View File

@@ -10,8 +10,8 @@ import '../widgets/book_list.dart';
class BooksScreen extends StatefulWidget {
const BooksScreen({
Key? key,
}) : super(key: key);
super.key,
});
@override
State<BooksScreen> createState() => _BooksScreenState();

View File

@@ -21,8 +21,8 @@ class BookstoreNavigator extends StatefulWidget {
const BookstoreNavigator({
required this.navigatorKey,
Key? key,
}) : super(key: key);
super.key,
});
@override
State<BookstoreNavigator> createState() => _BookstoreNavigatorState();

View File

@@ -10,8 +10,8 @@ import 'scaffold_body.dart';
class BookstoreScaffold extends StatelessWidget {
const BookstoreScaffold({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View File

@@ -16,8 +16,8 @@ class BookstoreScaffoldBody extends StatelessWidget {
static GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
const BookstoreScaffoldBody({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View File

@@ -9,7 +9,7 @@ import '../auth.dart';
import '../routing.dart';
class SettingsScreen extends StatefulWidget {
const SettingsScreen({Key? key}) : super(key: key);
const SettingsScreen({super.key});
@override
State<SettingsScreen> createState() => _SettingsScreenState();
@@ -39,8 +39,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
class SettingsContent extends StatelessWidget {
const SettingsContent({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) => Column(

View File

@@ -16,8 +16,8 @@ class SignInScreen extends StatefulWidget {
const SignInScreen({
required this.onSignIn,
Key? key,
}) : super(key: key);
super.key,
});
@override
State<SignInScreen> createState() => _SignInScreenState();

View File

@@ -13,8 +13,8 @@ class AuthorList extends StatelessWidget {
const AuthorList({
required this.authors,
this.onTap,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) => ListView.builder(

View File

@@ -13,8 +13,8 @@ class BookList extends StatelessWidget {
const BookList({
required this.books,
this.onTap,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) => ListView.builder(

View File

@@ -7,7 +7,7 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "31.0.0"
version: "39.0.0"
adaptive_breakpoints:
dependency: transitive
description:
@@ -28,7 +28,7 @@ packages:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.0"
version: "4.0.0"
args:
dependency: transitive
description:
@@ -64,13 +64,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.5"
clock:
dependency: transitive
description:
@@ -84,7 +77,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
convert:
dependency: transitive
description:
@@ -119,7 +112,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
file:
dependency: transitive
description:
@@ -190,7 +183,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
version: "0.6.4"
lints:
dependency: transitive
description:
@@ -218,7 +211,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
meta:
dependency: transitive
description:
@@ -253,7 +246,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
path_to_regexp:
dependency: "direct main"
description:
@@ -342,7 +335,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
@@ -377,21 +370,21 @@ packages:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "1.19.5"
version: "1.21.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
version: "0.4.9"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.13"
typed_data:
dependency: transitive
description:
@@ -468,7 +461,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
vm_service:
dependency: transitive
description: