Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates on academic_service.dart file and screens for Academic module as provided in master file (AC-2) #126

Open
wants to merge 9 commits into
base: test
Choose a base branch
from
Prev Previous commit
Next Next commit
Update registration_home_page.dart
bchetule authored Apr 22, 2023
commit 5f443c7b2d9332f92d85d4995bd2c5c17bc68e55
200 changes: 141 additions & 59 deletions lib/screens/Academic/Registration/registration_home_page.dart
Original file line number Diff line number Diff line change
@@ -16,67 +16,149 @@ class _RegistrationHomePageState extends State<RegistrationHomePage> {
Widget build(BuildContext context) {
final AcademicData data =
ModalRoute.of(context)?.settings.arguments as AcademicData;
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.black,
title: Text(
"FUSION",
style: TextStyle(color: Colors.white),
// return DefaultTabController(
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.deepOrangeAccent,
title: Text(
"Academics Module",
style: TextStyle(color: Colors.white),
),
actions: <Widget>[
Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.search),
),
actions: <Widget>[
Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.search),
),
Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.notifications),
),
Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.more_vert),
),
],
bottom: TabBar(
isScrollable: true,
indicatorColor: Colors.white,
indicatorWeight: 6.0,
tabs: [
Tab(
child: Container(
child: Text(
'Courses',
),
),
),
Tab(
child: Container(
child: Text(
'Pre-Registration',
),
),
),
Tab(
child: Container(
child: Text(
'Final Registration',
),
),
),
],
Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.notifications),
),
),
drawer: SideDrawer(),
body: TabBarView(
children: [
Courses(data: data.currently_registered),
PreRegistration(),
FinalRegistration(data: data)
// FinalRegistration(data: data)
],
),
Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.more_vert),
),
],
),

drawer: SideDrawer(),
body: Container(
child: ListView(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
children: <Widget>[
DefaultTabController(
length: 3, // length of tabs
initialIndex: 0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Container(
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 20.0),
width: 170.0,
height: 170.0,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/unknown.jpg'),
fit: BoxFit.cover,
),
),
),
SizedBox(
height: 10.0,
),
Text(
//NAME OF USER
data.details!['current_user']['first_name'] +
' ' +
data.details!['current_user']['last_name'],
style: TextStyle(
fontSize: 20.0, color: Colors.black),
),
SizedBox(
height: 10.0,
),
Text(
data.details!['user_branch'] + ' | ' + "STUDENT",
style: TextStyle(
fontSize: 15.0, color: Colors.black),
),
SizedBox(
height: 10.0,
),
],
),
),
Container(
color: Colors.deepOrangeAccent,
child: const Padding(
padding: EdgeInsets.all(10.0),
child: Center(
child: Text(
'Registration',
style: TextStyle(
color: Colors.white,
fontSize: 35,
fontWeight: FontWeight.bold),
),
),
),
),
Container(
child: TabBar(
labelColor: Colors.deepOrangeAccent,
unselectedLabelColor: Colors.black,
tabs: [
Tab(
child: Container(
child: Text(
'Courses',
),
),
),
Tab(
child: Container(
child: Text(
'Pre-Registration',
),
),
),
Tab(
child: Container(
child: Text(
'Final Registration',
),
),
),
],
),
),
Container(
height: 400, //height of TabBarView
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: Colors.grey, width: 0.5))),
child: TabBarView(
children: <Widget>[
Container(
child: Courses(data: data.currently_registered),
),
Container(
child: PreRegistration(),
),
Container(
child: FinalRegistration(
data: data), // FinalRegistration(data: data)
),
],
),
),
]),
),
]),
),
);
}