final
This commit is contained in:
116
lib/routes.dart
116
lib/routes.dart
@@ -44,169 +44,169 @@ class Routes {
|
||||
|
||||
static void configure() {
|
||||
router.define('/', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Home(title: Constants.APP_TITLE,);
|
||||
}),
|
||||
transitionType: TransitionType.fadeIn
|
||||
);
|
||||
router.define('/download', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Download();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/minipos-learn-more', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return MiniPosLearnMore();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/igoshow-learn-more', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return IGoShowLearnMore();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/login', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Login();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/me', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Me();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/change-password', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return ChangePassword();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/user-profile', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return UserProfile();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/new-user', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return NewUser();
|
||||
}),
|
||||
transitionType: TransitionType.inFromRight
|
||||
);
|
||||
router.define('/set-password/:mobile/:code', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return SetPassword(params['mobile'][0], code: params['code'][0]);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return SetPassword(params['mobile']![0], code: params['code']![0]);
|
||||
}
|
||||
));
|
||||
router.define('/forgot-password', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return ForgotPassword();
|
||||
}
|
||||
));
|
||||
router.define('/reset-password/:mobile/:code', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return ResetPassword(params['mobile'][0], code: params['code'][0]);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return ResetPassword(params['mobile']![0], code: params['code']![0]);
|
||||
}
|
||||
));
|
||||
router.define('/change-mobile-email/:ismobile', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
if (params['ismobile'][0] == '1') {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
if (params['ismobile']![0] == '1') {
|
||||
return ChangeMobileOrEmail(true);
|
||||
}
|
||||
return ChangeMobileOrEmail(false);
|
||||
}
|
||||
));
|
||||
router.define('/my-addresses/:business_id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return MyAddresses(businessId: int.parse(params['business_id'][0]),);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return MyAddresses(businessId: int.parse(params['business_id']![0]),);
|
||||
}
|
||||
));
|
||||
router.define('/my-support/:business_id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return MySupport(businessId: int.parse(params['business_id'][0]),);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return MySupport(businessId: int.parse(params['business_id']![0]),);
|
||||
}
|
||||
));
|
||||
router.define('/new-ticket/:business_id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return NewTicket(businessId: int.parse(params['business_id'][0]),);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return NewTicket(businessId: int.parse(params['business_id']![0]),);
|
||||
}
|
||||
));
|
||||
router.define('/search-place/:business_id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return SearchPlace(int.parse(params['business_id'][0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return SearchPlace(int.parse(params['business_id']![0]));
|
||||
}
|
||||
));
|
||||
router.define('/view-ticket/:ticket_id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return ViewTicket(int.parse(params['ticket_id'][0]),);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return ViewTicket(int.parse(params['ticket_id']![0]),);
|
||||
}
|
||||
));
|
||||
router.define('/blog/:business_id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return Blog(businessId: int.parse(params['business_id'][0]),);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Blog(businessId: int.parse(params['business_id']![0]),);
|
||||
}
|
||||
));
|
||||
router.define('/view-blog/:bid', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return ViewBlog(int.parse(params['bid'][0]),);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return ViewBlog(int.parse(params['bid']![0]),);
|
||||
}
|
||||
));
|
||||
router.define('/shop/:business_id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return Shop(businessId: int.parse(params['business_id'][0]),);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Shop(businessId: int.parse(params['business_id']![0]),);
|
||||
}
|
||||
));
|
||||
router.define('/shop', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Shop();
|
||||
}
|
||||
));
|
||||
// router.define('/ocr-scan', handler: new Handler(
|
||||
// handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
// handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
// return OCRScan();
|
||||
// }
|
||||
// ));
|
||||
router.define('/checkout/:id', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return Checkout(int.parse(params['id'][0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Checkout(int.parse(params['id']![0]));
|
||||
}),
|
||||
);
|
||||
router.define('/paynow/:orderId', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return PayNow(int.parse(params['orderId'][0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return PayNow(int.parse(params['orderId']![0]));
|
||||
}),
|
||||
);
|
||||
router.define('/orders', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Orders();
|
||||
}
|
||||
));
|
||||
router.define('/my-cards', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return MyCards();
|
||||
}
|
||||
));
|
||||
router.define('/orderdetail/:orderId', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return OrderDetail(int.parse(params['orderId'][0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return OrderDetail(int.parse(params['orderId']![0]));
|
||||
}),
|
||||
);
|
||||
router.define('/new-comment/:orderId', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return NewComment(int.parse(params['orderId'][0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return NewComment(int.parse(params['orderId']![0]));
|
||||
}),
|
||||
);
|
||||
router.define('/coupons/:contactId', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return Coupons(int.parse(params['contactId'][0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return Coupons(int.parse(params['contactId']![0]));
|
||||
}),
|
||||
);
|
||||
router.define('/service-policy', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return PlainPage(
|
||||
'service-policy',
|
||||
// businessId: Constants.BUSINESS_ID,
|
||||
@@ -215,7 +215,7 @@ class Routes {
|
||||
}),
|
||||
);
|
||||
router.define('/return-policy', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return PlainPage(
|
||||
'return-policy',
|
||||
// businessId: Constants.BUSINESS_ID,
|
||||
@@ -224,7 +224,7 @@ class Routes {
|
||||
}),
|
||||
);
|
||||
router.define('/privacy-policy', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return PlainPage(
|
||||
'privacy-policy',
|
||||
// businessId: Constants.BUSINESS_ID,
|
||||
@@ -233,7 +233,7 @@ class Routes {
|
||||
}),
|
||||
);
|
||||
router.define('/end-user-license-agreement', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return PlainPage(
|
||||
'end-user-license-agreement',
|
||||
// businessId: Constants.BUSINESS_ID,
|
||||
@@ -242,7 +242,7 @@ class Routes {
|
||||
}),
|
||||
);
|
||||
router.define('/about-us', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return PlainPage(
|
||||
'about-us',
|
||||
// businessId: Constants.BUSINESS_ID,
|
||||
@@ -251,29 +251,29 @@ class Routes {
|
||||
}),
|
||||
);
|
||||
router.define('/contact-us', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return ContactUs(
|
||||
businessId: Constants.BUSINESS_ID,
|
||||
);
|
||||
}),
|
||||
);
|
||||
router.define('/renew-license', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return RenewLicense();
|
||||
}
|
||||
));
|
||||
router.define('/renew-minioffice/:gid', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return RenewMiniOffice(int.parse(params['gid'][0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return RenewMiniOffice(int.parse(params['gid']![0]));
|
||||
}
|
||||
));
|
||||
router.define('/buy-service/:gid/:servicename', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
return BuyService(int.parse(params['gid'][0]), params['servicename'][0]);
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return BuyService(int.parse(params['gid']![0]), params['servicename']![0]);
|
||||
}
|
||||
));
|
||||
router.define('/contact-stores', handler: new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return CreateOnlineStore1();
|
||||
}
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user