mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 14:28:51 +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:
@@ -15,7 +15,7 @@ class BookstoreScaffold extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final routeState = RouteStateScope.of(context)!;
|
||||
final routeState = RouteStateScope.of(context);
|
||||
final selectedIndex = _getSelectedIndex(routeState.route.pathTemplate);
|
||||
|
||||
return Scaffold(
|
||||
|
||||
Reference in New Issue
Block a user