fix: Initial url on web
This commit is contained in:
parent
78b30f07ed
commit
ca161ce47a
2 changed files with 20 additions and 2 deletions
|
|
@ -30,10 +30,16 @@ import 'package:vrouter/vrouter.dart';
|
|||
|
||||
class AppRoutes {
|
||||
final bool columnMode;
|
||||
final String initialUrl;
|
||||
|
||||
AppRoutes(this.columnMode);
|
||||
AppRoutes(this.columnMode, {this.initialUrl});
|
||||
|
||||
List<VRouteElement> get routes => [
|
||||
if (initialUrl != null && initialUrl != '/')
|
||||
VRouteRedirector(
|
||||
path: '/',
|
||||
redirectTo: initialUrl,
|
||||
),
|
||||
..._homeRoutes,
|
||||
if (columnMode) ..._tabletRoutes,
|
||||
if (!columnMode) ..._mobileRoutes,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue