Before
@RouteConfig(const [
const {
'path': '/pipeline',
'component': GtPipelineComponent,
'as' : 'pipeline'
},
const {
'path': '/cleanup',
'component': GtCleanupComponent,
'as' : 'cleanup'
}
])
After
@RouteConfig(const [
const Route(
path: '/pipeline',
component: GtPipelineComponent,
as : 'pipeline'
),
...
])
e.g.
class Route {
const Route({String path, Type component, String as, String redirectTo})
}
Additionally, this could use errors/assertions to catch invalid configuration, e.g. having component AND redirectTo should throw