addRouting<T> method
Adds a PapilioRouterDelegate to the IocContainer
so that you can use it
in your MaterialApp. This is the main method for wiring up your Papilio
app
Implementation
void addRouting<T>(
PapilioRoutingConfiguration<T> Function(IocContainer container)
getRoutingFunctions,
) {
addSingleton(getRoutingFunctions);
_addDelegate<T>();
addSingleton((container) {
final routingFunctions = container.get<PapilioRoutingConfiguration<T>>();
return PapilioRouteInformationParser<T>(
routingFunctions.parseRouteInformation,
routingFunctions.restoreRouteInformation,
);
});
}