Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
Tour Travel Agency AGR
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
Tour Travel Agency AGR
Commits
d2218509
Commit
d2218509
authored
May 25, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan route agar muncul di url
parent
1237fbc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
routes.dart
lib/resource/routes.dart
+22
-12
No files found.
lib/resource/routes.dart
View file @
d2218509
...
...
@@ -11,7 +11,7 @@ import 'package:tour_travel_agr/page/reset_password/reset_password.dart';
import
'package:tour_travel_agr/page/splash/splash.dart'
;
class
Routes
{
static
const
String
splashRoute
=
"/"
;
static
const
String
splashRoute
=
"/
splash
"
;
static
const
String
loginRoute
=
"/login"
;
static
const
String
registerRoute
=
"/register"
;
static
const
String
verificationRoute
=
"/verification"
;
...
...
@@ -29,35 +29,45 @@ class RouteGenerator {
static
Route
<
dynamic
>
getRoute
(
RouteSettings
routeSettings
)
{
switch
(
routeSettings
.
name
)
{
case
Routes
.
splashRoute
:
return
pageRouteCustom
(
const
SplashView
());
return
pageRouteCustom
(
const
SplashView
(),
nameRoute:
Routes
.
splashRoute
);
case
Routes
.
loginRoute
:
return
pageRouteCustom
(
LoginView
());
return
pageRouteCustom
(
LoginView
()
,
nameRoute:
Routes
.
loginRoute
);
case
Routes
.
registerRoute
:
return
pageRouteCustom
(
const
RegisterView
());
return
pageRouteCustom
(
const
RegisterView
(),
nameRoute:
Routes
.
registerRoute
);
case
Routes
.
verificationRoute
:
return
pageRouteCustom
(
const
OtpVerificationView
());
return
pageRouteCustom
(
const
OtpVerificationView
(),
nameRoute:
Routes
.
verificationRoute
);
case
Routes
.
forgotPasswordRoute
:
return
pageRouteCustom
(
const
ForgotPasswordView
());
return
pageRouteCustom
(
const
ForgotPasswordView
(),
nameRoute:
Routes
.
forgotPasswordRoute
);
case
Routes
.
resetPasswordRoute
:
return
pageRouteCustom
(
const
ResetPasswordView
());
return
pageRouteCustom
(
const
ResetPasswordView
(),
nameRoute:
Routes
.
resetPasswordRoute
);
case
Routes
.
homeRoute
:
return
pageRouteCustom
(
const
HomeView
());
return
pageRouteCustom
(
const
HomeView
()
,
nameRoute:
Routes
.
homeRoute
);
case
Routes
.
profileRoute
:
return
pageRouteCustom
(
const
ProfileView
());
return
pageRouteCustom
(
const
ProfileView
(),
nameRoute:
Routes
.
profileRoute
);
case
Routes
.
changePasswordRoute
:
return
pageRouteCustom
(
const
ChangePasswordView
());
return
pageRouteCustom
(
const
ChangePasswordView
(),
nameRoute:
Routes
.
changePasswordRoute
);
case
Routes
.
editProfileRoute
:
return
pageRouteCustom
(
const
EditProfileView
());
return
pageRouteCustom
(
const
EditProfileView
(),
nameRoute:
Routes
.
editProfileRoute
);
default
:
return
unDefinedRoute
();
}
}
static
PageRouteBuilder
<
dynamic
>
pageRouteCustom
(
Widget
target
)
{
static
PageRouteBuilder
<
dynamic
>
pageRouteCustom
(
Widget
target
,
{
required
String
nameRoute
})
{
return
PageRouteBuilder
(
pageBuilder:
(
context
,
a
,
b
)
=>
target
,
transitionDuration:
Duration
.
zero
,
reverseTransitionDuration:
Duration
.
zero
,
settings:
RouteSettings
(
name:
nameRoute
.
replaceAll
(
"/"
,
""
)),
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment