Skip to content

Commit

Permalink
Merge pull request FusionIIIT#18 from samearth/main
Browse files Browse the repository at this point in the history
Added Library Module
  • Loading branch information
sehejjain authored Mar 7, 2021
2 parents e49e545 + ed3ae4a commit 54f25e3
Show file tree
Hide file tree
Showing 5 changed files with 882 additions and 0 deletions.
132 changes: 132 additions & 0 deletions lib/screens/Library/Book_Search.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
import 'package:flutter/material.dart';
import 'side_drawer.dart';
import 'package:search_widget/search_widget.dart';

class BookSearch extends StatefulWidget {
@override
_BookSearchState createState() => _BookSearchState();
}

class _BookSearchState extends State<BookSearch> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.black87,
title: Text(
'FUSION',
style: TextStyle(
color: Colors.white,
),
),
),
body:Center(
child: Column(
children: <Widget>[

SizedBox(height: 10),
Text(
'Search By Book Name',
style: TextStyle(
fontWeight: FontWeight.w800,
fontSize: 25,
color: Colors.black,
),
),

SizedBox(height: 28),
Container(
width: 420,
child:
TextField(
cursorColor : Colors.deepOrange,
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.deepOrange),
borderRadius: BorderRadius.circular(25.7),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.deepOrange),
borderRadius: BorderRadius.circular(25.7),
),
focusColor : Colors.deepOrange,
labelText: 'Enter Book Name',
labelStyle: TextStyle(
color: Colors.deepOrange
)
),
),
),
SizedBox(height: 20),
Container(
width: 150,
child: RaisedButton(
padding: const EdgeInsets.all(20),
textColor: Colors.white,
color: Colors.orangeAccent,
hoverElevation: 10.0,
hoverColor: Colors.white,
onPressed: ()=>null,
child: Text('Search' ,
style:TextStyle(
fontSize: 20
)),
),
),
SizedBox(height: 40),
Text(
'Search By Author Name',
style: TextStyle(
fontWeight: FontWeight.w800,
fontSize: 25,
color: Colors.black,
),
),
SizedBox(height: 28),
Container(
width: 420,
child:
TextField(
cursorColor : Colors.deepOrange,
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.deepOrange),
borderRadius: BorderRadius.circular(25.7),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.deepOrange),
borderRadius: BorderRadius.circular(25.7),
),
focusColor : Colors.deepOrange,
labelText: 'Enter Author Name',
labelStyle: TextStyle(
color: Colors.deepOrange
)
),
),
),
SizedBox(height: 30),
Container(
width: 150,
child: RaisedButton(
padding: const EdgeInsets.all(20),
textColor: Colors.white,
color: Colors.orangeAccent,
hoverElevation: 10.0,
hoverColor: Colors.white,
onPressed: ()=>null,
child: Text('Search' ,
style:TextStyle(
fontSize: 20
)),
),
),
],
),
),
);

}
}


164 changes: 164 additions & 0 deletions lib/screens/Library/dues.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
import 'package:flutter/material.dart';
import 'side_drawer.dart';


class dues extends StatefulWidget {
@override
_duesState createState() => _duesState();
}

class _duesState extends State<dues> {
final List<Map<String, String>> listOfColumns = [
{"Acc No.": "56382", "Due Date": "12-01-1231", "Days*o*d*c": "43" , "Total*o*d*c":"1239"},
{"Acc No.": "56382", "Due Date": "19-01-1231", "Days*o*d*c": "13" , "Total*o*d*c":"139"},
{"Acc No.": "56999", "Due Date": "29-01-1218", "Days*o*d*c": "93" , "Total*o*d*c":"134"},
];

final List<Map<String, String>> nonReturned = [
{"Acc No.": "56382", "Due Date": "12-01-1231", "Return Date": "12-01-1231" , "Total*o*d*c":"1239" , "Cause":"Late Fees"},
{"Acc No.": "56382", "Due Date": "19-01-1231", "Return Date": "12-01-1231" , "Total*o*d*c":"139", "Cause":"Late Fees"},
{"Acc No.": "56999", "Due Date": "29-01-1218", "Return Date": "12-01-1231" , "Total*o*d*c":"134", "Cause":"Late Fees"},
];
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.black87,
title: Text(
'FUSION',
style: TextStyle(
color: Colors.white,
),
),
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),
),
],
),
drawer: SideDrawer(),
body: ListView(children: <Widget>[
SizedBox(height: 30),
Center(
child: Text(
'Dues On Returned Items',
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
)),
SizedBox(height: 20),
DataTable(
columnSpacing: 10.0,
columns: [
DataColumn(label: Text(
'Acc No.',
style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold)
)),
DataColumn(label: Text(
'Due Date',
style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold)
)),
DataColumn(label: Text(
'Days*o*d*c',
style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold)
)),
DataColumn(label: Text(
'Total*o*d*c',
style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold)
)),
],
rows:
listOfColumns // Loops through dataColumnText, each iteration assigning the value to element
.map(
((element) => DataRow(
cells: <DataCell>[
DataCell(
Container(
width: 40, //SET width
child: Text(element["Acc No."]))), //Extracting from Map element the value
DataCell(Container(
width: 57, //SET width
child: Text(element["Due Date"]))),
DataCell(Container(
width: 57, //SET width
child: Text(element["Days*o*d*c"]))),
DataCell(Container(
width: 57, //SET width
child: Text(element["Total*o*d*c"]))),
],
)),
)
.toList(),
),
SizedBox(height: 50),
Center(
child: Text(
'Dues On Non-Returned Items',
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold),
)),
SizedBox(height: 20),
DataTable(
columnSpacing: 10.0,
columns: [
DataColumn(label: Text(
'Acc No.',
style: TextStyle(fontSize: 13, fontWeight: FontWeight.bold)
)),
DataColumn(label: Text(
'Due Date',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)
)),
DataColumn(label: Text(
'Return Date',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)
)),
DataColumn(label: Text(
'Total*o*d*c',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)
)),
DataColumn(label: Text(
'Cause',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold)
)),
],
rows:
nonReturned // Loops through dataColumnText, each iteration assigning the value to element
.map(
((element) => DataRow(
cells: <DataCell>[
DataCell(
Container(
width: 40, //SET width
child: Text(element["Acc No."]))), //Extracting from Map element the value
DataCell(Container(
width: 57, //SET width
child: Text(element["Due Date"]))),
DataCell(Container(
width: 57, //SET width
child: Text(element["Return Date"]))),
DataCell(Container(
width: 57, //SET width
child: Text(element["Total*o*d*c"]))),
DataCell(Container(
width: 57, //SET width
child: Text(element["Cause"]))),
],
)),
)
.toList(),
),
])
),
);
}
}


Loading

0 comments on commit 54f25e3

Please sign in to comment.