Flutter routing library that adds flexible routing options like parameters and clear route definitions.
To use this plugin, add flutter_router
as a dependency in your pubspec.yaml file.
// Import package
import 'package:flutter_router/flutter_router.dart';
runApp(MaterialApp(
onGenerateRoute: Router({
'/accounts/{id}': (context, match) => Account(id: match.parameters['id'),
'/': (context, match) => Index(),
}).get,
));