1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

RouteState: make field final private (#888)

This commit is contained in:
Kevin Moore
2021-08-26 16:52:38 -07:00
committed by GitHub
parent c9688ca34b
commit 2084742612

View File

@@ -15,10 +15,10 @@ import 'parser.dart';
/// RouteStateScope.of(context).go('/book/2');
/// ```
class RouteState extends ChangeNotifier {
TemplateRouteParser parser;
final TemplateRouteParser _parser;
ParsedRoute _route;
RouteState(this.parser) : _route = parser.initialRoute;
RouteState(this._parser) : _route = _parser.initialRoute;
ParsedRoute get route => _route;
@@ -32,7 +32,7 @@ class RouteState extends ChangeNotifier {
Future<void> go(String route) async {
this.route =
await parser.parseRouteInformation(RouteInformation(location: route));
await _parser.parseRouteInformation(RouteInformation(location: route));
}
}