mirror of
https://github.com/flutter/samples.git
synced 2026-04-04 02:32:25 +00:00
Deps update, utilize super.key (#1265)
* Deps update, utilize `super.key` * `flutter format`
This commit is contained in:
@@ -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!;
|
||||
|
||||
Reference in New Issue
Block a user