Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
21_22-J 31
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 31
21_22-J 31
Commits
a4b1cd8a
Commit
a4b1cd8a
authored
Jan 18, 2022
by
Shivanthi Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create navbar and navbar screens
parent
80e300b3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
192 additions
and
3 deletions
+192
-3
sevport_app/lib/main.dart
sevport_app/lib/main.dart
+1
-1
sevport_app/lib/pages/login_screen.dart
sevport_app/lib/pages/login_screen.dart
+3
-2
sevport_app/lib/pages/navbar.dart
sevport_app/lib/pages/navbar.dart
+78
-0
sevport_app/lib/pages/navbar_screens/account.dart
sevport_app/lib/pages/navbar_screens/account.dart
+22
-0
sevport_app/lib/pages/navbar_screens/history.dart
sevport_app/lib/pages/navbar_screens/history.dart
+22
-0
sevport_app/lib/pages/navbar_screens/home.dart
sevport_app/lib/pages/navbar_screens/home.dart
+22
-0
sevport_app/lib/pages/navbar_screens/notifications.dart
sevport_app/lib/pages/navbar_screens/notifications.dart
+22
-0
sevport_app/lib/pages/navbar_screens/vehicle_details.dart
sevport_app/lib/pages/navbar_screens/vehicle_details.dart
+22
-0
sevport_app/lib/pages/signup_screen.dart
sevport_app/lib/pages/signup_screen.dart
+0
-0
No files found.
sevport_app/lib/main.dart
View file @
a4b1cd8a
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'login_screen.dart'
;
import
'
pages/
login_screen.dart'
;
void
main
(
)
{
void
main
(
)
{
runApp
(
MyApp
());
runApp
(
MyApp
());
...
...
sevport_app/lib/login_screen.dart
→
sevport_app/lib/
pages/
login_screen.dart
View file @
a4b1cd8a
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'navbar.dart'
;
import
'signup_screen.dart'
;
import
'signup_screen.dart'
;
class
LoginScreen
extends
StatefulWidget
{
class
LoginScreen
extends
StatefulWidget
{
...
@@ -107,7 +107,8 @@ Widget initWidget(BuildContext context) {
...
@@ -107,7 +107,8 @@ Widget initWidget(BuildContext context) {
GestureDetector
(
GestureDetector
(
onTap:
()
=>
{
onTap:
()
=>
{
//Link to nav bar
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
NavBarScreen
()))
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
20
,
right:
20
,
top:
70
),
margin:
EdgeInsets
.
only
(
left:
20
,
right:
20
,
top:
70
),
...
...
sevport_app/lib/pages/navbar.dart
0 → 100644
View file @
a4b1cd8a
import
'package:curved_navigation_bar/curved_navigation_bar.dart'
;
import
'package:flutter/material.dart'
;
import
'navbar_screens/account.dart'
;
import
'navbar_screens/history.dart'
;
import
'navbar_screens/home.dart'
;
import
'navbar_screens/notifications.dart'
;
import
'navbar_screens/vehicle_details.dart'
;
class
NavBarScreen
extends
StatefulWidget
{
@override
_NavBarScreenState
createState
()
=>
_NavBarScreenState
();
}
class
_NavBarScreenState
extends
State
<
NavBarScreen
>
{
int
selected_index
=
2
;
final
HistoryScreen
_history
=
new
HistoryScreen
();
final
VehicleDetailsScreen
_vehicleDetails
=
new
VehicleDetailsScreen
();
final
HomeScreen
_home
=
HomeScreen
();
final
NotificationsScreen
_notifications
=
new
NotificationsScreen
();
final
AccountScreen
_account
=
new
AccountScreen
();
Widget
_showPage
=
new
HomeScreen
();
Widget
_pageChooser
(
int
page
)
{
switch
(
page
)
{
case
0
:
return
_history
;
case
1
:
return
_vehicleDetails
;
case
2
:
return
_home
;
case
3
:
return
_notifications
;
case
4
:
return
_account
;
default
:
return
new
Container
(
child:
new
Center
(
child:
new
Text
(
"No page found"
),
),
);
}
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
bottomNavigationBar:
CurvedNavigationBar
(
index:
selected_index
,
color:
Color
(
0xff01122b
),
buttonBackgroundColor:
Color
(
0xff01122b
),
backgroundColor:
Colors
.
white
,
animationDuration:
Duration
(
milliseconds:
400
),
animationCurve:
Curves
.
easeInBack
,
height:
55.0
,
items:
<
Widget
>[
Icon
(
Icons
.
history
,
size:
30
,
color:
Colors
.
white
),
Icon
(
Icons
.
car_rental_rounded
,
size:
30
,
color:
Colors
.
white
),
Icon
(
Icons
.
home
,
size:
30
,
color:
Colors
.
white
),
Icon
(
Icons
.
notification_add
,
size:
30
,
color:
Colors
.
white
),
Icon
(
Icons
.
person
,
size:
30
,
color:
Colors
.
white
),
],
onTap:
(
int
tapped_index
)
{
setState
(()
{
_showPage
=
_pageChooser
(
tapped_index
);
});
},
),
body:
Container
(
child:
Center
(
child:
_showPage
,
),
),
);
}
}
sevport_app/lib/pages/navbar_screens/account.dart
0 → 100644
View file @
a4b1cd8a
import
'package:flutter/material.dart'
;
class
AccountScreen
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
InitState
();
}
class
InitState
extends
State
<
AccountScreen
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
initWidget
();
}
Widget
initWidget
()
{
return
Container
(
child:
Text
(
'Account'
,
textScaleFactor:
2.0
,
),
);
}
}
sevport_app/lib/pages/navbar_screens/history.dart
0 → 100644
View file @
a4b1cd8a
import
'package:flutter/material.dart'
;
class
HistoryScreen
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
InitState
();
}
class
InitState
extends
State
<
HistoryScreen
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
initWidget
();
}
Widget
initWidget
()
{
return
Container
(
child:
Text
(
'History'
,
textScaleFactor:
2.0
,
),
);
}
}
sevport_app/lib/pages/navbar_screens/home.dart
0 → 100644
View file @
a4b1cd8a
import
'package:flutter/material.dart'
;
class
HomeScreen
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
InitState
();
}
class
InitState
extends
State
<
HomeScreen
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
initWidget
();
}
Widget
initWidget
()
{
return
Container
(
child:
Text
(
'New Booking'
,
textScaleFactor:
2.0
,
),
);
}
}
sevport_app/lib/pages/navbar_screens/notifications.dart
0 → 100644
View file @
a4b1cd8a
import
'package:flutter/material.dart'
;
class
NotificationsScreen
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
InitState
();
}
class
InitState
extends
State
<
NotificationsScreen
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
initWidget
();
}
Widget
initWidget
()
{
return
Container
(
child:
Text
(
'Notifications'
,
textScaleFactor:
2.0
,
),
);
}
}
sevport_app/lib/pages/navbar_screens/vehicle_details.dart
0 → 100644
View file @
a4b1cd8a
import
'package:flutter/material.dart'
;
class
VehicleDetailsScreen
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
InitState
();
}
class
InitState
extends
State
<
VehicleDetailsScreen
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
initWidget
();
}
Widget
initWidget
()
{
return
Container
(
child:
Text
(
'Vehicle Details'
,
textScaleFactor:
2.0
,
),
);
}
}
sevport_app/lib/signup_screen.dart
→
sevport_app/lib/
pages/
signup_screen.dart
View file @
a4b1cd8a
File moved
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