mirror of
https://github.com/flutter/samples.git
synced 2026-04-24 16:01:25 +00:00
Update navigation_and_routing sample to go_router (#2067)
This is a new PR to update the navigation_and_routing sample to the latest version of go_router. It is a based on https://github.com/flutter/samples/pull/1437 --------- Co-authored-by: Brett Morgan <brettmorgan@google.com>
This commit is contained in:
@@ -32,6 +32,10 @@ class BookstoreAuth extends ChangeNotifier {
|
||||
|
||||
@override
|
||||
int get hashCode => _signedIn.hashCode;
|
||||
|
||||
static BookstoreAuth of(BuildContext context) => context
|
||||
.dependOnInheritedWidgetOfExactType<BookstoreAuthScope>()!
|
||||
.notifier!;
|
||||
}
|
||||
|
||||
class BookstoreAuthScope extends InheritedNotifier<BookstoreAuth> {
|
||||
@@ -40,8 +44,4 @@ class BookstoreAuthScope extends InheritedNotifier<BookstoreAuth> {
|
||||
required super.child,
|
||||
super.key,
|
||||
});
|
||||
|
||||
static BookstoreAuth of(BuildContext context) => context
|
||||
.dependOnInheritedWidgetOfExactType<BookstoreAuthScope>()!
|
||||
.notifier!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user