add route param validation
This commit is contained in:
parent
b0e05e35f2
commit
39bbdae7f5
1 changed files with 9 additions and 2 deletions
|
|
@ -90,8 +90,15 @@ class RouteGenerator {
|
|||
|
||||
//About MIH
|
||||
case '/about':
|
||||
return MaterialPageRoute(
|
||||
settings: settings, builder: (_) => const AboutMih());
|
||||
if (args is int) {
|
||||
return MaterialPageRoute(
|
||||
settings: settings,
|
||||
builder: (_) => AboutMih(
|
||||
packageIndex: args,
|
||||
),
|
||||
);
|
||||
}
|
||||
return _errorRoute();
|
||||
//===============================================================
|
||||
|
||||
//Privacy Policy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue