mirror of
https://github.com/flutter/samples.git
synced 2026-07-15 13:32:35 +00:00
navigation_and_routing: a bunch of cleanup (#886)
Fail early on nullable context objects - no code paths allow null Eliminate superfluous private function Use a function over an abstract class with one method
This commit is contained in:
@@ -21,7 +21,7 @@ class BookstoreScaffoldBody extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var currentRoute = RouteStateScope.of(context)!.route;
|
||||
var currentRoute = RouteStateScope.of(context).route;
|
||||
|
||||
// A nested Router isn't necessary because the back button behavior doesn't
|
||||
// need to be customized.
|
||||
|
||||
Reference in New Issue
Block a user