1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-07 04:02:13 +00:00

Cleanup to navigation_and_routing sample (#881)

- make more things private and final, where possible
- remove unused members
- used expression bodies, where possible
This commit is contained in:
Kevin Moore
2021-08-26 09:16:27 -07:00
committed by GitHub
parent 410e43fbc1
commit fa7dec1475
20 changed files with 221 additions and 284 deletions

View File

@@ -44,9 +44,8 @@ class TemplateRouteParser extends RouteInformationParser<ParsedRoute> {
@override
Future<ParsedRoute> parseRouteInformation(
RouteInformation routeInformation) async {
return await _parse(routeInformation);
}
RouteInformation routeInformation) async =>
await _parse(routeInformation);
Future<ParsedRoute> _parse(RouteInformation routeInformation) async {
final path = routeInformation.location!;
@@ -74,7 +73,6 @@ class TemplateRouteParser extends RouteInformationParser<ParsedRoute> {
}
@override
RouteInformation restoreRouteInformation(ParsedRoute configuration) {
return RouteInformation(location: configuration.path);
}
RouteInformation restoreRouteInformation(ParsedRoute configuration) =>
RouteInformation(location: configuration.path);
}