Skip to content

os:1 made screens for visitor hostel #130

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

Open
wants to merge 7 commits into
base: test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/Rules.pdf
Binary file not shown.
31 changes: 30 additions & 1 deletion lib/Components/appBar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class DefaultAppBar {
backgroundColor: kPrimaryColor,
title: Text(
"Dashboard",
style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold),
style: TextStyle(
color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold),
),
actions: <Widget>[
Padding(
Expand All @@ -26,4 +27,32 @@ class DefaultAppBar {
],
);
}

AppBar visitorHostelAppBar() {
return AppBar(
iconTheme: IconThemeData(color: Colors.white),
title: Text(
"Visitor Hostel",
style: TextStyle(
color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold),
),
backgroundColor: Color.fromARGB(255, 243, 108, 53),
// ignore: prefer_const_literals_to_create_immutables
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),
),
],
elevation: 0,
);
}
}
6 changes: 5 additions & 1 deletion lib/Components/side_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ class _SideDrawerState extends State<SideDrawer> {
),
ModulesPadding(line: 'Leave Module'),
ModulesPadding(line: 'Placement Module'),
ModulesPadding(line: 'Visitors Hostel Module'),
ModulesPadding(
line: 'Visitors Hostel Module',
pageMover: '/visitor_hostel',
isActive: true,
),
ModulesPadding(line: 'File Tracking Module'),
],
),
Expand Down
2 changes: 2 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import 'package:fusion/screens/Programme_Curriculum/Discipline/discipline.dart';
import 'package:fusion/screens/Programme_Curriculum/Programme/programme_home_page.dart';
import 'package:fusion/screens/Programme_Curriculum/Programme_Info/programme_info.dart';
import 'package:fusion/screens/Programme_Curriculum/programme_curriculum_home.dart';
import 'package:fusion/screens/Visitors_Hostel/visitors_hostel_home.dart';
import 'package:fusion/screens/landing_page.dart';
import 'package:fusion/screens/Healthcenter/healthcentermodule.dart';
import 'package:fusion/screens/Healthcenter/feedback.dart';
Expand Down Expand Up @@ -127,6 +128,7 @@ class MyApp extends StatelessWidget {
'/health_center/feedback': (context) => FeedBack(),
'/health_center/viewschedule': (context) => ViewSchedule(),
'/health_center/history': (context) => History(),
'/visitor_hostel' : (context) => VisitorHostel(),
},
),
);
Expand Down
27 changes: 27 additions & 0 deletions lib/screens/Visitors_Hostel/Components/Card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import 'package:flutter/material.dart';
import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart';

class BookingInfoCard extends StatelessWidget {
final List<CardListTile> bookingInfoTiles;

const BookingInfoCard({required this.bookingInfoTiles});

@override
Widget build(BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Card(
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors.black,
),
borderRadius: BorderRadius.circular(20.0),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: bookingInfoTiles,
),
),
);
}
}
16 changes: 16 additions & 0 deletions lib/screens/Visitors_Hostel/Components/RulesAndRegulation.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';

class MyPdfViewer extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('PDF Viewer'),
),
body: SfPdfViewer.asset(
'assets/Rules.pdf',
),
);
}
}
36 changes: 36 additions & 0 deletions lib/screens/Visitors_Hostel/Components/list_tile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';


class CardListTile extends StatelessWidget {
final IconData iconData;
final String label;
final String value;
final Color color;
const CardListTile({
required this.iconData,
required this.label,
required this.value,
required this.color,
});

@override
Widget build(BuildContext context) {
return ListTile(
leading: Icon(iconData),
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(label),
Expanded(
child: Align(
alignment: Alignment.centerRight,
child: Text(value),
),
),
],
),
tileColor: color,
);
}
}

99 changes: 99 additions & 0 deletions lib/screens/Visitors_Hostel/accounts.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import 'package:flutter/material.dart';
import 'package:fusion/Components/appBar.dart';
import 'package:fusion/screens/Visitors_Hostel/Components/Card.dart';
import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart';

class Accounts extends StatefulWidget {
@override
State<Accounts> createState() => _AccountsState();
}

class _AccountsState extends State<Accounts> {
List<Map<String, dynamic>> bookingData = [
{
'Intender': 'Bob',
'BookingFrom': '21st Jan',
'BookingTo': '28th Jan',
'Category': 'B',
'Status': 'Active'
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: DefaultAppBar().visitorHostelAppBar(),
body: Column(
children: <Widget>[
Expanded(
child: Container(
height: double.infinity,
width: double.infinity,
decoration: BoxDecoration(
color: Color.fromARGB(255, 248, 247, 247),
),
child: SingleChildScrollView(
child: Column(
children: <Widget>[
SizedBox(height: 24.0),
Text(
"Accounts",
style:
TextStyle(fontSize: 24, fontWeight: FontWeight.w700),
),
SizedBox(height: 12.0),
Text("Income",
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.bold)),
Column(
children: List.generate(bookingData.length, (index) {
return Column(
children: [
SizedBox(height: 20.0),
BookingInfoCard(
bookingInfoTiles: [
CardListTile(
iconData: Icons.person,
label: 'Intender',
value: bookingData[index]['Intender'],
color: Colors.white,
),
CardListTile(
iconData: Icons.today,
label: "BookingFrom",
value: bookingData[index]['BookingFrom'],
color: Color.fromARGB(255, 206, 205, 205),
),
CardListTile(
iconData: Icons.event,
label: "BookingTo",
value: bookingData[index]['BookingTo'],
color: Colors.white,
),
CardListTile(
iconData: Icons.category,
label: "Category",
value: bookingData[index]['Category'],
color: Color.fromARGB(255, 206, 205, 205),
),
CardListTile(
iconData: Icons.info,
label: "Status",
value: bookingData[index]['Status'],
color: Colors.white,
)
],
),
],
);
}),
)
],
),
),
),
),
],
),
);
}
}
117 changes: 117 additions & 0 deletions lib/screens/Visitors_Hostel/activeBookings.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import 'package:flutter/material.dart';
import 'package:fusion/Components/appBar.dart';
import 'package:fusion/Components/side_drawer.dart';
import 'package:fusion/screens/Visitors_Hostel/Components/Card.dart';
import 'package:fusion/screens/Visitors_Hostel/Components/list_tile.dart';

class ActiveBookings extends StatefulWidget {
@override
_ActiveBookingsState createState() => _ActiveBookingsState();
}

class _ActiveBookingsState extends State<ActiveBookings> {
List<Map<String, dynamic>> bookingData = [
{
'Intender': 'Bob',
'BookingFrom': '21st Jan',
'BookingTo': '28th Jan',
'Category': 'B',
'Status': 'Active'
},
{
'Intender': 'Jane',
'BookingFrom': '22nd Jan',
'BookingTo': '29th Jan',
'Category': 'A',
'Status': 'Active'
},
{
'Intender': 'Bob',
'BookingFrom': '21st Jan',
'BookingTo': '28th Jan',
'Category': 'B',
'Status': 'Active'
},
{
'Intender': 'Jane',
'BookingFrom': '22nd Jan',
'BookingTo': '29th Jan',
'Category': 'A',
'Status': 'Active'
},
];

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: DefaultAppBar().visitorHostelAppBar(),
drawer: SideDrawer(),
body: Column(
children: <Widget>[
Expanded(
child: Container(
height: double.infinity,
width: double.infinity,
child: SingleChildScrollView(
child: Column(children: <Widget>[
SizedBox(height: 24.0),
Text(
'Active Bookings',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 20.0),
Column(
children: List.generate(bookingData.length, (index) {
return Column(
children: [
SizedBox(height: 20.0),
BookingInfoCard(
bookingInfoTiles: [
CardListTile(
iconData: Icons.person,
label: 'Intender',
value: bookingData[index]['Intender'],
color: Colors.white,
),
CardListTile(
iconData: Icons.today,
label: "BookingFrom",
value: bookingData[index]['BookingFrom'],
color: Color.fromARGB(255, 206, 205, 205),
),
CardListTile(
iconData: Icons.event,
label: "BookingTo",
value: bookingData[index]['BookingTo'],
color: Colors.white,
),
CardListTile(
iconData: Icons.category,
label: "Category",
value: bookingData[index]['Category'],
color: Color.fromARGB(255, 206, 205, 205),
),
CardListTile(
iconData: Icons.info,
label: "Status",
value: bookingData[index]['Status'],
color: Colors.white,
)
],
),
],
);
}),
)
]),
),
),
),
],
),
);
}
}
Loading