Commit c62a2345 by Ramesh Babu Puvvadi

few changes

parent a41737ae
......@@ -16,7 +16,7 @@ class CheckRegistration extends StatefulWidget {
class _CheckRegistration extends State<CheckRegistration> {
final TextEditingController _empId = TextEditingController();
late final ImagePicker _picker = ImagePicker();
late final ImagePicker _picker = ImagePicker();
XFile? image;
File? newVideoFile;
var store = '';
......@@ -143,7 +143,7 @@ class _CheckRegistration extends State<CheckRegistration> {
if (image != null) {
File file = File(image!.path);
String filecontents = await fileToString(file);
//String filecontents = await fileToString(file);
String fileName = file.path.split(Platform.pathSeparator).last;
final response =
......@@ -183,13 +183,14 @@ class _CheckRegistration extends State<CheckRegistration> {
void getValidReg(String text) async {
var data = await RemoteData().getValidEmp(text);
if (data.statusCode != 200) {
Constants('Review', data.statusCode.toString())
.showAlertDialog(context, false);
Constants('Review', data.statusCode.toString()).showAlertDialog(context, false);
return;
}
Map<String, dynamic> responseMap = jsonDecode(data.body);
CheckReg checkReg = CheckReg.fromJson(responseMap);
print('response:$responseMap');
if (kDebugMode) {
print('response:$responseMap');
}
if (checkReg.status == 'Success') {
getVideo(text);
} else {
......@@ -204,7 +205,9 @@ class _CheckRegistration extends State<CheckRegistration> {
return await file.readAsString();
}
} catch (e) {
print("Error reading file: $e");
if (kDebugMode) {
print("Error reading file: $e");
}
}
return '';
}
......
......@@ -11,7 +11,8 @@ import 'Constants.dart';
class FootFall extends StatefulWidget {
final String message;
final String selecteddate;
const FootFall({super.key, required this.message, required this.selecteddate});
const FootFall(
{super.key, required this.message, required this.selecteddate});
@override
_FootFall createState() => _FootFall();
......@@ -25,7 +26,7 @@ class _FootFall extends State<FootFall> {
var isMeeters = '';
List<String>? storesList;
//var graph = """<!DOCTYPE html>\n<html>\n<script type=\"text/javascript\" src=\"https://www.gstatic.com/charts/loader.js\"></script>\n\n<body>\n<div id=\"Employees\" style=\"width:50%; max-width:150px; height:50px;\"></div>\n\n<script>\ngoogle.charts.load('current', {'packages':['corechart']});\ngoogle.charts.setOnLoadCallback(drawChart);\n\nfunction drawChart() {\n var data = google.visualization.arrayToDataTable([\n ['TIME OF DAY', 'MALE',{ role: 'annotation'},'FEMALE',{ role: 'annotation'},],\n['10-11', 8, '8', 19, '19'], ['11-12', 12, '12', 21, '21'], ['12-13', 18, '18', 13, '13'], ['13-14', 17, '17', 14, '14'], ['14-15', 10, '10', 20, '20'], ['15-16', 8, '8', 21, '21'], ['16-17', 11, '11', 19, '19'], ['17-18', 12, '12', 13, '13'], ['18-19', 13, '13', 16, '16'], ['19-20', 8, '8', 22, '22'], ['20-21', 14, '14', 15, '15'], ['21-22', 7, '7', 17, '17'],\n \n ]);\n\n var options = {\n \t \n \t \n legend:'top',\n chartArea:{left:30,bottom:50,top:40,width:\"90%\",height:\"50%\"},\n width:1080,\n height:800,\n \n colors: ['#65d9eb', '#e263eb'],\n hAxis:{\n title:'---- Time of Day ----',\n titleTextStyle:{\n\t\t\t fontSize: 18,\n bold: true,},\n }, \n vAxis:{\n \t\t fontSize: 18,\n bold:true,\n title:'Footfall --->',\n \n titleTextStyle:{\n\t\t\t fontSize: 18,\n bold: true,},},\n annotations:{\n alwaysOutside: false,\n highContrast: true, // default is true, but be sure\n textStyle: {\n \tfontSize: 14,\n bold: true\n } \n\n },\n\n\n };\n\n var chart = new google.visualization.AreaChart(document.getElementById('Employees'));\n chart.draw(data, options);\n }\n</script>\n\n</body>\n</html>\n""";
//var graph = """<!DOCTYPE html>\n<html>\n<script type=\"text/javascript\" src=\"https://www.gstatic.com/charts/loader.js\"></script>\n\n<body>\n<div id=\"Employees\" style=\"width:50%; max-width:150px; height:50px;\"></div>\n\n<script>\ngoogle.charts.load('current', {'packages':['corechart']});\ngoogle.charts.setOnLoadCallback(drawChart);\n\nfunction drawChart() {\n var data = google.visualization.arrayToDataTable([\n ['TIME OF DAY', 'MALE',{ role: 'annotation'},'FEMALE',{ role: 'annotation'},],\n['10-11', 8, '8', 19, '19'], ['11-12', 12, '12', 21, '21'], ['12-13', 18, '18', 13, '13'], ['13-14', 17, '17', 14, '14'], ['14-15', 10, '10', 20, '20'], ['15-16', 8, '8', 21, '21'], ['16-17', 11, '11', 19, '19'], ['17-18', 12, '12', 13, '13'], ['18-19', 13, '13', 16, '16'], ['19-20', 8, '8', 22, '22'], ['20-21', 14, '14', 15, '15'], ['21-22', 7, '7', 17, '17'],\n \n ]);\n\n var options = {\n \t \n \t \n legend:'top',\n chartArea:{left:30,bottom:50,top:40,width:\"90%\",height:\"50%\"},\n width:1080,\n height:800,\n \n colors: ['#65d9eb', '#e263eb'],\n hAxis:{\n title:'---- Time of Day ----',\n titleTextStyle:{\n\t\t\t fontSize: 18,\n bold: true,},\n }, \n vAxis:{\n \t\t fontSize: 18,\n bold:true,\n title:'Footfall --->',\n \n titleTextStyle:{\n\t\t\t fontSize: 18,\n bold: true,},},\n annotations:{\n alwaysOutside: false,\n highContrast: true, // default is true, but be sure\n textStyle: {\n \tfontSize: 14,\n bold: true\n } \n\n },\n\n\n };\n\n var chart = new google.visualization.AreaChart(document.getElementById('Employees'));\n chart.draw(data, options);\n }\n</script>\n\n</body>\n</html>\n""";]
@override
void initState() {
......
......@@ -132,220 +132,185 @@ class _Home extends State<Home> {
),
),
body: SingleChildScrollView(
child: Container(
margin: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(5.0),
),
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
menuMaxHeight: Constants.getDropdownItemHeight(context),
value: selectedDropdownItem,
onChanged: (newValue) {
setState(() {
selectedDropdownItem = newValue;
getupdateData(selectedDropdownItem);
if (selectedDropdownItem == 'WH KISMATPUR' ||
selectedDropdownItem == 'WH BANGALORE' ||
selectedDropdownItem == 'WH VIJAYAWADA' ||
selectedDropdownItem == 'WH KANCHI') {
iswarehouserelated = true;
} else {
iswarehouserelated = false;
}
});
},
items: namesList?.map((item) {
return DropdownMenuItem<String>(
value: item,
child: Text(item),
);
}).toList(),
icon: const Icon(Icons.arrow_drop_down),
isExpanded: true,
),
),
),
const SizedBox(
height: 15,
width: 1,
),
TextFormField(
controller: _dateTime,
onTap: () {},
decoration: InputDecoration(
contentPadding:
const EdgeInsets.symmetric(vertical: 15, horizontal: 10),
isDense: true,
hintText: 'Select date',
border: OutlineInputBorder(
child: GestureDetector(
onHorizontalDragUpdate: (dragDetail) {
print('Testing');
if (dragDetail.delta.direction > 0) {
Navigator.pop(context);
print('Hitted =====>');
}
},
child: Container(
margin: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(5.0),
),
suffixIcon: IconButton(
icon: Image.asset(
'assets/images/date_icon.png',
width: 24,
height: 24,
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
menuMaxHeight: Constants.getDropdownItemHeight(context),
value: selectedDropdownItem,
onChanged: (newValue) {
setState(() {
selectedDropdownItem = newValue;
getupdateData(selectedDropdownItem);
if (selectedDropdownItem == 'WH KISMATPUR' ||
selectedDropdownItem == 'WH BANGALORE' ||
selectedDropdownItem == 'WH VIJAYAWADA' ||
selectedDropdownItem == 'WH KANCHI') {
iswarehouserelated = true;
} else {
iswarehouserelated = false;
}
});
},
items: namesList?.map((item) {
return DropdownMenuItem<String>(
value: item,
child: Text(item),
);
}).toList(),
icon: const Icon(Icons.arrow_drop_down),
isExpanded: true,
),
onPressed: () => _selectDate(context),
),
),
),
const SizedBox(height: 10),
const Text('AI Powered Alerts',
textAlign: TextAlign.right, style: Constants.headerfontStyle),
const SizedBox(
width: 0,
height: 5,
),
Container(
height: 2,
width: 60,
color: const Color.fromARGB(255, 170, 57, 243),
),
const SizedBox(
height: 15,
width: 1,
),
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: const Offset(0, 2),
),
],
const SizedBox(
height: 15,
width: 1,
),
child: SfCircularChart(
//backgroundColor: Colors.white,
margin: const EdgeInsets.all(10),
legend: Legend(
isVisible: true,
position: LegendPosition.top,
),
tooltipBehavior: TooltipBehavior(
enable: true,
textStyle:
const TextStyle(fontSize: 22.0, color: Colors.white),
),
palette: const <Color>[
Color.fromARGB(255, 4, 145, 74),
Color.fromARGB(255, 241, 92, 34)
],
series: <CircularSeries>[
PieSeries<GDPData, String>(
dataSource: _chartData,
xValueMapper: (GDPData data, _) => data.continent,
yValueMapper: (GDPData data, _) => data.gdp,
dataLabelSettings: const DataLabelSettings(
isVisible: true,
textStyle:
TextStyle(fontSize: 32.0, color: Colors.white),
TextFormField(
controller: _dateTime,
onTap: () {},
decoration: InputDecoration(
contentPadding: const EdgeInsets.symmetric(
vertical: 15, horizontal: 10),
isDense: true,
hintText: 'Select date',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
),
suffixIcon: IconButton(
icon: Image.asset(
'assets/images/date_icon.png',
width: 24,
height: 24,
),
enableTooltip: true,
radius: '100%',
explode: true,
onPressed: () => _selectDate(context),
),
],
onDataLabelRender: (DataLabelRenderArgs args) {
args.textStyle = args.textStyle.copyWith(
fontSize: 18, // Set the desired font size
fontFamily: 'Poppins',
fontWeight: FontWeight.bold,
); // Set the desired font size
},
),
),
),
const SizedBox(
height: 15,
width: 1,
),
Row(mainAxisAlignment: MainAxisAlignment.start, children: [
Expanded(
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.448,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Review(
message: selectedDropdownItem.toString(),
selecteddate:
'${_selectedDate.year}/${_selectedDate.month}/${_selectedDate.day}',
)),
);
},
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 2, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFFF1412),
//Color(0xFFC2185B),
Color(0xFFFF714C),
],
),
borderRadius: BorderRadius.circular(7),
),
child: Row(
children: [
Image.asset(
'assets/images/review.png',
), // replace with your image
],
),
const SizedBox(height: 10),
const Text('AI Powered Alerts',
textAlign: TextAlign.right,
style: Constants.headerfontStyle),
const SizedBox(
width: 0,
height: 5,
),
Container(
height: 2,
width: 60,
color: const Color.fromARGB(255, 170, 57, 243),
),
const SizedBox(
height: 15,
width: 1,
),
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10.0),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 2,
blurRadius: 5,
offset: const Offset(0, 2),
),
],
),
child: SfCircularChart(
//backgroundColor: Colors.white,
margin: const EdgeInsets.all(10),
legend: Legend(
isVisible: true,
position: LegendPosition.top,
),
tooltipBehavior: TooltipBehavior(
enable: true,
textStyle:
const TextStyle(fontSize: 22.0, color: Colors.white),
),
palette: const <Color>[
Color.fromARGB(255, 4, 145, 74),
Color.fromARGB(255, 241, 92, 34)
],
series: <CircularSeries>[
PieSeries<GDPData, String>(
dataSource: _chartData,
xValueMapper: (GDPData data, _) => data.continent,
yValueMapper: (GDPData data, _) => data.gdp,
dataLabelSettings: const DataLabelSettings(
isVisible: true,
textStyle:
TextStyle(fontSize: 32.0, color: Colors.white),
),
enableTooltip: true,
radius: '100%',
explode: true,
),
],
onDataLabelRender: (DataLabelRenderArgs args) {
args.textStyle = args.textStyle.copyWith(
fontSize: 18, // Set the desired font size
fontFamily: 'Poppins',
fontWeight: FontWeight.bold,
); // Set the desired font size
},
),
),
const VerticalDivider(width: 10.0),
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: Visibility(
//visible: isAuthenticated,
const SizedBox(
height: 15,
width: 1,
),
Row(mainAxisAlignment: MainAxisAlignment.start, children: [
Expanded(
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.448,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => EmployeeStatus(
message: selectedDropdownItem.toString())),
builder: (context) => Review(
message: selectedDropdownItem.toString(),
selecteddate:
'${_selectedDate.year}/${_selectedDate.month}/${_selectedDate.day}',
)),
);
},
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 2, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomCenter,
end: Alignment.bottomRight,
colors: [
Color(0xFFc89181),
Color(0xFFf5b97e),
Color(0xFFFF1412),
//Color(0xFFC2185B),
Color(0xFFFF714C),
],
),
borderRadius: BorderRadius.circular(7),
......@@ -353,29 +318,19 @@ class _Home extends State<Home> {
child: Row(
children: [
Image.asset(
'assets/images/emp.png',
// width: 145,
// height: 160,
),
'assets/images/review.png',
), // replace with your image
],
),
),
),
),
),
),
]),
const SizedBox(
height: 10,
width: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
const VerticalDivider(width: 10.0),
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 2, bottom: 0),
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: Visibility(
//visible: isAuthenticated,
......@@ -384,12 +339,9 @@ class _Home extends State<Home> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => NotificationReport(
message:
selectedDropdownItem.toString(),
selecteddate:
'${_selectedDate.year}/${_selectedDate.month}/${_selectedDate.day}',
)),
builder: (context) => EmployeeStatus(
message:
selectedDropdownItem.toString())),
);
},
child: Container(
......@@ -401,9 +353,9 @@ class _Home extends State<Home> {
begin: Alignment.bottomLeft,
end: Alignment.bottomCenter,
colors: [
Color(0xFF6e87d6),
Color(0xFFc89181),
Color(0xFFf5b97e),
//Color(0xFFC2185B),
Color(0xFF48c5ef),
],
),
borderRadius: BorderRadius.circular(7),
......@@ -411,22 +363,10 @@ class _Home extends State<Home> {
child: Row(
children: [
Image.asset(
'assets/images/accuracy.png',
'assets/images/emp.png',
// width: 145,
// height: 160,
),
// replace with your image
// const SizedBox(
// width:
// 10), // add some space between the image and the text
// const Expanded(
// child: Text(
// 'Accuracy',
// overflow: TextOverflow.ellipsis,
// style: Constants.buttonsfontStyle,
// textAlign: TextAlign.center,
// ),
// ),
],
),
),
......@@ -434,158 +374,175 @@ class _Home extends State<Home> {
),
),
),
const VerticalDivider(width: 10.0),
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: Visibility(
//visible: isAuthenticated,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FootFall(
message:
selectedDropdownItem.toString(),
selecteddate:
'${_selectedDate.year}/${_selectedDate.month}/${_selectedDate.day}',
)),
);
},
child: Container(
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(3),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomCenter,
colors: [
Color(0xFF872b8e),
//Color(0xFFC2185B),
Color(0xFFcf2b72),
]),
const SizedBox(
height: 10,
width: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 2, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: Visibility(
//visible: isAuthenticated,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => NotificationReport(
message:
selectedDropdownItem.toString(),
selecteddate:
'${_selectedDate.year}/${_selectedDate.month}/${_selectedDate.day}',
)),
);
},
child: Container(
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomCenter,
colors: [
Color(0xFF6e87d6),
//Color(0xFFC2185B),
Color(0xFF48c5ef),
],
),
borderRadius: BorderRadius.circular(7),
),
child: Row(
children: [
Image.asset(
'assets/images/accuracy.png',
// width: 145,
// height: 160,
),
// replace with your image
// const SizedBox(
// width:
// 10), // add some space between the image and the text
// const Expanded(
// child: Text(
// 'Accuracy',
// overflow: TextOverflow.ellipsis,
// style: Constants.buttonsfontStyle,
// textAlign: TextAlign.center,
// ),
// ),
],
),
borderRadius: BorderRadius.circular(7),
),
child: Row(
children: [
Image.asset(
'assets/images/footfall.png',
// width: 145,
// height: 160,
),
// replace with your image
// const SizedBox(
// width:
// 10), // add some space between the image and the text
// const Expanded(
// child: Text(
// 'Foot Fall',
// overflow: TextOverflow.ellipsis,
// style: Constants.buttonsfontStyle,
// textAlign: TextAlign.center,
// ),
// ),
],
),
),
),
),
),
),
],
),
const SizedBox(
height: 10,
width: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => UserRegistration(
message: selectedDropdownItem.toString())),
);
},
child: Container(
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF6a706f),
//Color(0xFFC2185B),
Color(0xFF91b3b1),
],
),
borderRadius: BorderRadius.circular(7),
),
child: Row(
children: [
Image.asset(
'assets/images/emp_registration.png',
// width: 145,
// height: 160,
const VerticalDivider(width: 10.0),
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: Visibility(
//visible: isAuthenticated,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FootFall(
message:
selectedDropdownItem.toString(),
selecteddate:
'${_selectedDate.year}/${_selectedDate.month}/${_selectedDate.day}',
)),
);
},
child: Container(
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(3),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomCenter,
colors: [
Color(0xFF872b8e),
//Color(0xFFC2185B),
Color(0xFFcf2b72),
],
),
borderRadius: BorderRadius.circular(7),
),
],
child: Row(
children: [
Image.asset(
'assets/images/footfall.png',
// width: 145,
// height: 160,
),
// replace with your image
// const SizedBox(
// width:
// 10), // add some space between the image and the text
// const Expanded(
// child: Text(
// 'Foot Fall',
// overflow: TextOverflow.ellipsis,
// style: Constants.buttonsfontStyle,
// textAlign: TextAlign.center,
// ),
// ),
],
),
),
),
),
),
),
),
const VerticalDivider(width: 10.0),
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: Visibility(
//visible: iswarehouserelated,
],
),
const SizedBox(
height: 10,
width: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => IssueVideos(
message:
selectedDropdownItem.toString(),
)),
builder: (context) => UserRegistration(
message:
selectedDropdownItem.toString())),
);
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => CameraGridItems()),
// );
},
child: Container(
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(3),
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF525589),
Color(0xFFaca8e0),
Color(0xFF6a706f),
//Color(0xFFC2185B),
Color(0xFF91b3b1),
],
),
borderRadius: BorderRadius.circular(7),
......@@ -593,7 +550,7 @@ class _Home extends State<Home> {
child: Row(
children: [
Image.asset(
'assets/images/videos.png',
'assets/images/emp_registration.png',
// width: 145,
// height: 160,
),
......@@ -603,10 +560,65 @@ class _Home extends State<Home> {
),
),
),
),
],
),
],
const VerticalDivider(width: 10.0),
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 0, top: 0, right: 0, bottom: 0),
width: MediaQuery.of(context).size.width * 0.44,
child: Visibility(
//visible: iswarehouserelated,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => IssueVideos(
message:
selectedDropdownItem.toString(),
)),
);
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => CameraGridItems()),
// );
},
child: Container(
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).size.width * 0.22,
padding: const EdgeInsets.all(3),
decoration: BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF525589),
Color(0xFFaca8e0),
//Color(0xFFC2185B),
],
),
borderRadius: BorderRadius.circular(7),
),
child: Row(
children: [
Image.asset(
'assets/images/videos.png',
// width: 145,
// height: 160,
),
],
),
),
),
),
),
),
],
),
],
),
),
),
),
......
......@@ -5,7 +5,7 @@ import 'package:permission_handler/permission_handler.dart';
//import 'package:need_resume/need_resume.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:storemonitor/Screens/Issue.dart';
import 'package:storemonitor/Screens/MyHomePage.dart';
import 'package:storemonitor/Screens/SurvellianceView.dart';
import '../Services/RemoteData.dart';
import 'Constants.dart';
......@@ -263,35 +263,35 @@ class _IssueVideos extends State<IssueVideos> {
child: GestureDetector(
onTap: () {
requestStoragePermission();
// Navigator.of(context)
// .push(
// MaterialPageRoute(
// builder: (_) => SurvellianceView(
// message: notificationslist![index]
// .VIDEOURL,
// id: notificationslist![index]
// .VIDNOTID
// .toString(),
// comment: notificationslist![index]
// .COMMENTS,
// desc: notificationslist![index]
// .DESCRIPTION,
// store:
// notificationslist![index].STORE,
// location: notificationslist![index]
// .LOCATION,
// time: notificationslist![index]
// .TIMESTAMP,
// )),
// )
// .then((val) => (val != null)
// ? (val
// ? getData(selectedDropdownItem!)
// : true)
// : false);
Navigator.of(context)
.push(
MaterialPageRoute(
builder: (_) => SurvellianceView(
message: notificationslist![index]
.VIDEOURL,
id: notificationslist![index]
.VIDNOTID
.toString(),
comment: notificationslist![index]
.COMMENTS,
desc: notificationslist![index]
.DESCRIPTION,
store:
notificationslist![index].STORE,
location: notificationslist![index]
.LOCATION,
time: notificationslist![index]
.TIMESTAMP,
)),
)
.then((val) => (val != null)
? (val
? getData(selectedDropdownItem!)
: true)
: false);
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => MyHomePage()));
// Navigator.of(context).push(MaterialPageRoute(
// builder: (_) => MyHomePage()));
},
child: Row(
children: [
......
......@@ -49,7 +49,7 @@ class LoginPage extends StatelessWidget {
// 'assets/images/login_header_image.png',
// height: 350,
// width: 350,
// ),
//),
const SizedBox(height: 30),
const LoginForm(),
],
......
......@@ -3,7 +3,6 @@ import 'dart:core';
import 'package:flutter/material.dart';
import 'package:http/src/response.dart';
import 'package:shared_preferences/shared_preferences.dart';
//this below one is DateFormat Libray its not imported automatically
import 'package:intl/intl.dart';
import '../Models/Notifications.dart';
import '../Services/RemoteData.dart';
......@@ -13,8 +12,9 @@ class NotificationReport extends StatefulWidget {
final String message;
final String selecteddate;
const NotificationReport({super.key, required this.message, required this.selecteddate});
const NotificationReport(
{super.key, required this.message, required this.selecteddate});
@override
_NotificationReport createState() => _NotificationReport();
}
......@@ -115,8 +115,7 @@ class _NotificationReport extends State<NotificationReport> {
data = await RemoteData().getNotificationReport(selectedDropdownItem!,
'${_selectedDate1.year}-$selectedmonth-$selectedday');
if (data.statusCode != 200) {
Constants('NotificationReport', data.statusCode.toString())
.showAlertDialog(context, false);
Constants('NotificationReport', data.statusCode.toString()).showAlertDialog(context, false);
return;
}
Navigator.of(context).pop();
......@@ -293,9 +292,9 @@ class _NotificationReport extends State<NotificationReport> {
width: 0,
height: 15,
),
Row(
const Row(
mainAxisAlignment: MainAxisAlignment.start,
children: const [
children: [
Text('Summary',
textAlign: TextAlign.left,
style: Constants.headerfontStyle),
......@@ -411,9 +410,9 @@ class _NotificationReport extends State<NotificationReport> {
height: 15,
width: 1,
),
Row(
const Row(
mainAxisAlignment: MainAxisAlignment.start,
children: const [
children: [
Text('Details',
textAlign: TextAlign.left,
style: Constants.headerfontStyle),
......@@ -449,8 +448,8 @@ class _NotificationReport extends State<NotificationReport> {
),
//color: Color.fromARGB(255, 123, 50, 254),
height: 40,
child: Row(
children: const [
child: const Row(
children: [
Expanded(
child: Text(
'REASON',
......@@ -517,10 +516,11 @@ class _NotificationReport extends State<NotificationReport> {
width: MediaQuery.of(context).size.width / 4.3,
// height: 40,
child: Text(
notificationslist![index]
.reason
.toString()
.toLowerCase(),
Constants.capitalizeFirstLetter(
notificationslist![index]
.reason
.toString()
.toLowerCase()),
style: Constants.headerlistitems,
maxLines: 5,
overflow: TextOverflow.ellipsis,
......
......@@ -16,7 +16,6 @@ import '../Services/RemoteData.dart';
import 'Constants.dart';
import 'ImageZoomin.dart';
class Review extends StatefulWidget {
//const Review({super.key});
final String message;
......@@ -407,8 +406,8 @@ class _Review extends State<Review> {
child: Container(
margin: const EdgeInsets.all(15.0),
child: Column(
//crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
......
......@@ -16,7 +16,7 @@ class NetworkApiServices extends BaseApiServices {
} on SocketException {
throw FetchDataException('No Internet Connection');
}
return responseJson;
}
......
name: storemonitor
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: 'none'
version: 1.0.4+4
environment:
sdk: '>=2.18.4 <3.0.0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment