Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
StoreMonitor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramesh Babu Puvvadi
StoreMonitor
Commits
e2657fa9
Commit
e2657fa9
authored
Nov 10, 2023
by
Ramesh Babu Puvvadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added changes
parent
a96d8a62
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
742 additions
and
754 deletions
+742
-754
CameraGridItems.dart
lib/Screens/CameraGridItems.dart
+4
-1
CheckList.dart
lib/Screens/CheckList.dart
+15
-3
Constants.dart
lib/Screens/Constants.dart
+1
-1
EmployeeReport.dart
lib/Screens/EmployeeReport.dart
+296
-292
FootFall.dart
lib/Screens/FootFall.dart
+30
-32
Home.dart
lib/Screens/Home.dart
+8
-4
IssueVideos.dart
lib/Screens/IssueVideos.dart
+341
-335
MyHomePage.dart
lib/Screens/MyHomePage.dart
+25
-26
Review.dart
lib/Screens/Review.dart
+8
-0
SurvellianceView.dart
lib/Screens/SurvellianceView.dart
+3
-49
WeeklyAudit.dart
lib/Screens/WeeklyAudit.dart
+3
-3
main.dart
lib/main.dart
+8
-8
No files found.
lib/Screens/CameraGridItems.dart
View file @
e2657fa9
...
@@ -46,7 +46,10 @@ class _CameraGridItemsState extends State<CameraGridItems> {
...
@@ -46,7 +46,10 @@ class _CameraGridItemsState extends State<CameraGridItems> {
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
()),
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
(
message:
''
,
)),
);
);
},
},
child:
Container
(
child:
Container
(
...
...
lib/Screens/CheckList.dart
View file @
e2657fa9
import
'dart:convert'
;
import
'dart:convert'
;
import
'package:flutter/foundation.dart'
;
import
'package:intl/intl.dart'
;
import
'package:intl/intl.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
...
@@ -229,7 +230,7 @@ class _CheckList extends State<CheckList> {
...
@@ -229,7 +230,7 @@ class _CheckList extends State<CheckList> {
),
),
const
SizedBox
(
width:
8
),
const
SizedBox
(
width:
8
),
SizedBox
(
SizedBox
(
width:
60
,
//
Adjust the width as needed
width:
60
,
//Adjust the width as needed
child:
TextFormField
(
child:
TextFormField
(
controller:
six
,
controller:
six
,
keyboardType:
TextInputType
.
number
,
keyboardType:
TextInputType
.
number
,
...
@@ -250,7 +251,7 @@ class _CheckList extends State<CheckList> {
...
@@ -250,7 +251,7 @@ class _CheckList extends State<CheckList> {
),
),
const
SizedBox
(
width:
8
),
const
SizedBox
(
width:
8
),
SizedBox
(
SizedBox
(
width:
60
,
//
Adjust the width as needed
width:
60
,
//Adjust the width as needed
child:
TextFormField
(
child:
TextFormField
(
controller:
seven
,
controller:
seven
,
keyboardType:
TextInputType
.
number
,
keyboardType:
TextInputType
.
number
,
...
@@ -404,6 +405,7 @@ class _CheckList extends State<CheckList> {
...
@@ -404,6 +405,7 @@ class _CheckList extends State<CheckList> {
color:
Color
.
fromARGB
(
255
,
173
,
57
,
230
),
color:
Color
.
fromARGB
(
255
,
173
,
57
,
230
),
));
));
});
});
List
<
Map
<
String
,
dynamic
>>
jsonArray
=
[
List
<
Map
<
String
,
dynamic
>>
jsonArray
=
[
{
{
'hour'
:
'10-11'
,
'hour'
:
'10-11'
,
...
@@ -462,8 +464,14 @@ class _CheckList extends State<CheckList> {
...
@@ -462,8 +464,14 @@ class _CheckList extends State<CheckList> {
'
${_selectedDate.year}
/
${_selectedDate.month}
/
${_selectedDate.day}
'
);
'
${_selectedDate.year}
/
${_selectedDate.month}
/
${_selectedDate.day}
'
);
Map
<
String
,
dynamic
>
responseMap
=
Map
<
String
,
dynamic
>
responseMap
=
jsonDecode
(
res
!.
body
);
jsonDecode
(
res
!.
body
);
if
(
kDebugMode
)
{
print
(
responseMap
);
}
if
(
responseMap
[
'status'
]
==
'Success'
)
{
if
(
responseMap
[
'status'
]
==
'Success'
)
{
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
Constants
(
'Footfall Verification'
,
responseMap
[
'status'
])
.
showAlertDialog
(
context
,
false
);
setState
(()
{
setState
(()
{
one
.
text
=
''
;
one
.
text
=
''
;
two
.
text
=
''
;
two
.
text
=
''
;
...
@@ -480,9 +488,13 @@ class _CheckList extends State<CheckList> {
...
@@ -480,9 +488,13 @@ class _CheckList extends State<CheckList> {
});
});
}
else
{
}
else
{
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
Constants
(
'Footfall Verification'
,
responseMap
[
'status'
])
.
showAlertDialog
(
context
,
false
);
}
}
}
else
{
}
else
{
Constants
(
'CheckList'
,
'Enter Atleast one item'
).
showAlertDialog
(
context
,
false
);
Constants
(
'CheckList'
,
'Enter Atleast one item'
)
.
showAlertDialog
(
context
,
false
);
}
}
}
}
},
},
...
...
lib/Screens/Constants.dart
View file @
e2657fa9
...
@@ -253,7 +253,7 @@ class Constants {
...
@@ -253,7 +253,7 @@ class Constants {
showAlertDialog
(
BuildContext
context
,
bool
val
)
{
showAlertDialog
(
BuildContext
context
,
bool
val
)
{
Widget
okButton
=
TextButton
(
Widget
okButton
=
TextButton
(
child:
const
Text
(
"
Cancel
"
),
child:
const
Text
(
"
Ok
"
),
onPressed:
()
{
onPressed:
()
{
if
(
val
)
{
if
(
val
)
{
Navigator
.
popUntil
(
context
,
(
route
)
=>
route
.
isFirst
);
Navigator
.
popUntil
(
context
,
(
route
)
=>
route
.
isFirst
);
...
...
lib/Screens/EmployeeReport.dart
View file @
e2657fa9
...
@@ -73,322 +73,325 @@ class _EmployeeReport extends State<EmployeeReport> {
...
@@ -73,322 +73,325 @@ class _EmployeeReport extends State<EmployeeReport> {
),
),
),
),
),
),
body:
Container
(
body:
SingleChildScrollView
(
margin:
const
EdgeInsets
.
all
(
15.0
),
child:
Container
(
child:
Column
(
margin:
const
EdgeInsets
.
all
(
15.0
),
crossAxisAlignment:
CrossAxisAlignment
.
start
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
//mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
//mainAxisAlignment: MainAxisAlignment.center,
// SizedBox(
children:
[
// width: double.infinity,
// SizedBox(
// child: DropdownButton(
// width: double.infinity,
// isExpanded: true,
// child: DropdownButton(
// value: selectedItem,
// isExpanded: true,
// onChanged: (value) {
// value: selectedItem,
// setState(() {
// onChanged: (value) {
// selectedItem = value;
// setState(() {
// getupdateData(selectedItem);
// selectedItem = value;
// });
// getupdateData(selectedItem);
// },
// });
// items: storesList?.map((value) {
// },
// return DropdownMenuItem(
// items: storesList?.map((value) {
// value: value,
// return DropdownMenuItem(
// child: Text(value),
// value: value,
// );
// child: Text(value),
// }).toList(),
// );
// ),
// }).toList(),
// ),
// ),
// ),
Container
(
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10.0
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10.0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Colors
.
grey
),
border:
Border
.
all
(
color:
Colors
.
grey
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
),
),
child:
DropdownButtonHideUnderline
(
child:
DropdownButtonHideUnderline
(
child:
DropdownButton
<
String
>(
child:
DropdownButton
<
String
>(
menuMaxHeight:
Constants
.
getDropdownItemHeight
(
context
),
menuMaxHeight:
Constants
.
getDropdownItemHeight
(
context
),
value:
selectedItem
,
value:
selectedItem
,
onChanged:
(
newValue
)
{
onChanged:
(
newValue
)
{
setState
(()
{
setState
(()
{
selectedItem
=
newValue
;
selectedItem
=
newValue
;
getupdateData
(
selectedItem
);
getupdateData
(
selectedItem
);
});
});
},
},
items:
storesList
?.
map
((
item
)
{
items:
storesList
?.
map
((
item
)
{
return
DropdownMenuItem
<
String
>(
return
DropdownMenuItem
<
String
>(
value:
item
,
value:
item
,
child:
Text
(
item
),
child:
Text
(
item
),
);
);
}).
toList
(),
}).
toList
(),
icon:
const
Icon
(
Icons
.
arrow_drop_down
),
icon:
const
Icon
(
Icons
.
arrow_drop_down
),
isExpanded:
true
,
isExpanded:
true
,
),
),
),
),
),
),
const
SizedBox
(
const
SizedBox
(
height:
10
,
height:
10
,
width:
1
,
width:
1
,
),
),
const
Text
(
'Summary'
,
const
Text
(
'Summary'
,
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
const
SizedBox
(
const
SizedBox
(
width:
0
,
width:
0
,
height:
3
,
height:
3
,
),
),
Container
(
Container
(
height:
2
,
height:
2
,
width:
40
,
width:
40
,
color:
const
Color
.
fromARGB
(
255
,
170
,
57
,
230
),
color:
const
Color
.
fromARGB
(
255
,
170
,
57
,
230
),
),
),
const
SizedBox
(
const
SizedBox
(
height:
15
,
height:
15
,
width:
1
,
width:
1
,
),
),
Container
(
Container
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
5.0
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
boxShadow:
[
boxShadow:
[
BoxShadow
(
BoxShadow
(
color:
Colors
.
grey
.
withOpacity
(
0.5
),
color:
Colors
.
grey
.
withOpacity
(
0.5
),
spreadRadius:
2
,
spreadRadius:
2
,
blurRadius:
5
,
blurRadius:
5
,
offset:
const
Offset
(
0
,
2
),
offset:
const
Offset
(
0
,
2
),
),
),
],
],
),
child:
Column
(
children:
[
Container
(
margin:
const
EdgeInsets
.
fromLTRB
(
5.0
,
5.0
,
5.0
,
5.0
),
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
const
Text
(
' Registered :'
,
style:
Constants
.
headerlistitems
,
),
Text
(
'
$registered
'
,
style:
Constants
.
headerlistitems1
),
],
),
const
SizedBox
(
width:
1
,
height:
10
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
const
Text
(
' UnRegistered :'
,
style:
Constants
.
headerlistitems
),
Text
(
'
$unregistered
'
,
style:
Constants
.
headerlistitems1
),
],
),
const
SizedBox
(
width:
1
,
height:
10
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
const
Text
(
' Total :'
,
style:
Constants
.
headerlistitems
),
Text
(
'
$total
'
,
style:
Constants
.
headerlistitems1
),
],
),
const
SizedBox
(
width:
1
,
height:
10
),
],
),
),
),
child:
Column
(
const
SizedBox
(
children:
[
height:
15
,
Container
(
width:
1
,
margin:
const
EdgeInsets
.
fromLTRB
(
5.0
,
5.0
,
5.0
,
5.0
),
),
),
const
Text
(
'Details'
,
Row
(
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
mainAxisAlignment:
MainAxisAlignment
.
start
,
const
SizedBox
(
children:
[
width:
0
,
const
Text
(
height:
3
,
' Registered :'
,
style:
Constants
.
headerlistitems
,
),
Text
(
'
$registered
'
,
style:
Constants
.
headerlistitems1
),
],
),
const
SizedBox
(
width:
1
,
height:
10
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
const
Text
(
' UnRegistered :'
,
style:
Constants
.
headerlistitems
),
Text
(
'
$unregistered
'
,
style:
Constants
.
headerlistitems1
),
],
),
const
SizedBox
(
width:
1
,
height:
10
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
const
Text
(
' Total :'
,
style:
Constants
.
headerlistitems
),
Text
(
'
$total
'
,
style:
Constants
.
headerlistitems1
),
],
),
const
SizedBox
(
width:
1
,
height:
10
),
],
),
),
),
Container
(
const
SizedBox
(
height:
2
,
height:
15
,
width:
30
,
width:
1
,
color:
const
Color
.
fromARGB
(
255
,
170
,
57
,
230
),
),
const
Text
(
'Details'
,
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
const
SizedBox
(
width:
0
,
height:
3
,
),
Container
(
height:
2
,
width:
30
,
color:
const
Color
.
fromARGB
(
255
,
170
,
57
,
230
),
),
const
SizedBox
(
height:
15
,
width:
1
,
),
Container
(
decoration:
BoxDecoration
(
// border: Border.all(
// color: const Color.fromARGB(255, 123, 50, 254),
// style: BorderStyle.solid,
// width: 1.0,
// ),
color:
const
Color
.
fromARGB
(
255
,
35
,
22
,
66
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
),
),
//color: Color.fromARGB(255, 123, 50, 254),
const
SizedBox
(
height:
40
,
height:
15
,
child:
const
Row
(
width:
1
,
children:
[
),
Expanded
(
Container
(
child:
Text
(
decoration:
BoxDecoration
(
'EMP ID'
,
// border: Border.all(
textAlign:
TextAlign
.
center
,
// color: const Color.fromARGB(255, 123, 50, 254),
style:
Constants
.
whitefontStyle
,
// style: BorderStyle.solid,
// width: 1.0,
// ),
color:
const
Color
.
fromARGB
(
255
,
35
,
22
,
66
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
),
//color: Color.fromARGB(255, 123, 50, 254),
height:
40
,
child:
const
Row
(
children:
[
Expanded
(
child:
Text
(
'EMP ID'
,
textAlign:
TextAlign
.
center
,
style:
Constants
.
whitefontStyle
,
),
),
),
),
VerticalDivider
(
VerticalDivider
(
width:
1.0
,
width:
1.0
,
color:
Colors
.
white
,
color:
Colors
.
white
,
),
Expanded
(
child:
Text
(
'EMP STATUS'
,
textAlign:
TextAlign
.
center
,
style:
Constants
.
whitefontStyle
,
),
),
),
Expanded
(
],
child:
Text
(
'EMP STATUS'
,
textAlign:
TextAlign
.
center
,
style:
Constants
.
whitefontStyle
,
),
),
],
),
),
),
),
SizedBox
(
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.48
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.42
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
empreportlist
?.
length
,
itemCount:
empreportlist
?.
length
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Padding
(
return
Padding
(
padding:
const
EdgeInsets
.
all
(
0.0
),
padding:
const
EdgeInsets
.
all
(
0.0
),
child:
Container
(
child:
Container
(
height:
40
,
height:
40
,
color:
index
%
2
==
0
color:
index
%
2
==
0
?
const
Color
.
fromARGB
(
255
,
245
,
242
,
251
)
?
const
Color
.
fromARGB
(
255
,
245
,
242
,
251
)
:
Colors
.
white
,
:
Colors
.
white
,
child:
Row
(
child:
Row
(
children:
[
children:
[
if
(
empreportlist
![
index
].
rEGSTATUS
==
if
(
empreportlist
![
index
].
rEGSTATUS
==
'NOT REGISTERED'
||
'NOT REGISTERED'
||
empreportlist
![
index
].
rEGSTATUS
==
empreportlist
![
index
].
rEGSTATUS
==
'Not Registered'
)
...[
'Not Registered'
)
...[
SizedBox
(
SizedBox
(
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
// height: 40
,
// height: 40,
child:
Text
(
child:
Text
(
empreportlist
![
index
].
eMPId
.
toString
(),
empreportlist
![
index
].
eMPId
.
toString
()
,
style:
Constants
.
reviewbuttonsfontStyle
,
style:
Constants
.
reviewbuttonsfontStyle
,
maxLines:
5
,
maxLines:
5
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
)
,
),
),
),
const
VerticalDivider
(
const
VerticalDivider
(
width:
1.0
,
width:
1.0
,
color:
Colors
.
white
,
color:
Colors
.
white
,
),
SizedBox
(
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
child:
Text
(
empreportlist
![
index
]
.
rEGSTATUS
.
toString
()
.
toUpperCase
(),
style:
Constants
.
unregisterfontStyle
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
center
,
),
),
),
SizedBox
(
// Expanded(
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
// child: Text(
child:
Text
(
// empreportlist![index].eMPId.toString(),
empreportlist
![
index
]
// textAlign: TextAlign.center,
.
rEGSTATUS
// style: Constants.unregisterfontStyle),
.
toString
()
// ),
.
toUpperCase
(),
// VerticalDivider(
style:
Constants
.
unregisterfontStyle
,
// width: 20.0,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
center
,
),
),
// Expanded(
// child: Text(
// empreportlist![index].eMPId.toString(),
// textAlign: TextAlign.center,
// style: Constants.unregisterfontStyle),
// ),
// VerticalDivider(
// width: 20.0,
// color: Colors.white,
// color: Colors.white,
// ),
// ),
// Expanded(
// Expanded(
// child: Text(
// child: Text(
// empreportlist![index].rEGSTATUS.toString(),
// empreportlist![index].rEGSTATUS.toString(),
// textAlign: TextAlign.center,
// textAlign: TextAlign.center,
// style: Constants.unregisterfontStyle,
// style: Constants.unregisterfontStyle,
// ),
// ),
// ),
// ),
],
],
if
(
empreportlist
![
index
].
rEGSTATUS
==
if
(
empreportlist
![
index
].
rEGSTATUS
==
'Registered'
)
...[
'Registered'
)
...[
SizedBox
(
SizedBox
(
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
// height: 40,
// height: 40,
child:
Text
(
child:
Text
(
empreportlist
![
index
].
eMPId
.
toString
(),
empreportlist
![
index
].
eMPId
.
toString
(),
style:
Constants
.
reviewbuttonsfontStyle
,
style:
Constants
.
reviewbuttonsfontStyle
,
maxLines:
5
,
maxLines:
5
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
),
),
const
VerticalDivider
(
width:
1.0
,
color:
Colors
.
white
,
),
),
),
SizedBox
(
const
VerticalDivider
(
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
width:
1.0
,
child:
Text
(
color:
Colors
.
white
,
empreportlist
![
index
]
),
.
rEGSTATUS
SizedBox
(
.
toString
()
width:
MediaQuery
.
of
(
context
).
size
.
width
/
2.2
,
.
toUpperCase
(),
child:
Text
(
style:
Constants
.
registerfontStyle
,
empreportlist
![
index
]
overflow:
TextOverflow
.
ellipsis
,
.
rEGSTATUS
textAlign:
TextAlign
.
center
,
.
toString
()
),
.
toUpperCase
(),
style:
Constants
.
registerfontStyle
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
center
,
),
),
),
// Expanded(
// Expanded
(
// child: Text
(
// child: Text(
// empreportlist![index].eMPId.toString(),
// empreportlist![index].eMPId.toString()
,
// textAlign: TextAlign.center
,
// textAlign: TextAlign.center
,
// style: Constants.registerfontStyle
,
// style: Constants.registerfontStyle
,
// )
,
//
),
//
),
// ),
// Expanded(
// Expanded
(
// child: Text
(
// child: Text(
// empreportlist![index].rEGSTATUS.toString(),
// empreportlist![index].rEGSTATUS.toString()
,
// textAlign: TextAlign.center
,
// textAlign: TextAlign.center
,
// style: Constants.registerfontStyle
,
// style: Constants.registerfontStyle
,
// )
,
//
),
//
),
// ),
]
]
]
,
]
,
)
,
),
),
)
,
)
;
);
},
}
,
)
,
),
),
)
,
]
,
]
,
)
,
),
),
),
),
);
);
}
}
void
showProgressDialog
(
BuildContext
context
)
{
void
showProgressDialog
(
BuildContext
context
)
{
// Capture the context in a local variable
// Capture the context in a local variable
BuildContext
dialogContext
=
context
;
BuildContext
dialogContext
=
context
;
showDialog
(
showDialog
(
context:
dialogContext
,
context:
dialogContext
,
builder:
(
BuildContext
context
)
{
builder:
(
BuildContext
context
)
{
return
const
Center
(
return
const
Center
(
child:
CircularProgressIndicator
(
child:
CircularProgressIndicator
(
color:
Color
.
fromARGB
(
255
,
173
,
57
,
230
),
color:
Color
.
fromARGB
(
255
,
173
,
57
,
230
),
),
),
);
);
},
},
);
);
}
}
Future
<
void
>
getupdateData
(
String
?
selectedDropdownItem
)
async
{
Future
<
void
>
getupdateData
(
String
?
selectedDropdownItem
)
async
{
if
(
await
Constants
.
checkInternetConnectivity
())
{
if
(
await
Constants
.
checkInternetConnectivity
())
{
...
@@ -429,7 +432,8 @@ class _EmployeeReport extends State<EmployeeReport> {
...
@@ -429,7 +432,8 @@ class _EmployeeReport extends State<EmployeeReport> {
});
});
}
else
{
}
else
{
Navigator
.
of
(
context
).
pop
();
Navigator
.
of
(
context
).
pop
();
Constants
(
'Employee Report'
,
'Please check your internet connection'
).
showAlertDialog
(
context
,
false
);
Constants
(
'Employee Report'
,
'Please check your internet connection'
)
.
showAlertDialog
(
context
,
false
);
}
}
}
}
}
}
lib/Screens/FootFall.dart
View file @
e2657fa9
...
@@ -148,17 +148,7 @@ class _FootFall extends State<FootFall> {
...
@@ -148,17 +148,7 @@ class _FootFall extends State<FootFall> {
onHorizontalDragStart:
(
details
)
{
onHorizontalDragStart:
(
details
)
{
print
(
'force press start'
);
print
(
'force press start'
);
},
},
onHorizontalDragDown:
(
details
)
{
onHorizontalDragDown:
(
details
)
{},
print
(
'force press down'
);
//if (details.globalPosition.direction > 0) {
// print('force press down1$details');
//}
//if (details.globalPosition.direction < 0) {
// print('force press down$details');
//}
//Navigator.of(context).pop();
},
child:
FutureBuilder
<
Foot
?>(
child:
FutureBuilder
<
Foot
?>(
future:
_futureFoot
,
future:
_futureFoot
,
builder:
(
context
,
snapshot
)
{
builder:
(
context
,
snapshot
)
{
...
@@ -403,6 +393,13 @@ class _FootFall extends State<FootFall> {
...
@@ -403,6 +393,13 @@ class _FootFall extends State<FootFall> {
style:
Constants
.
listitems
,
style:
Constants
.
listitems
,
),
),
),
),
Expanded
(
child:
Text
(
'MTeens'
,
textAlign:
TextAlign
.
center
,
style:
Constants
.
listitems
,
),
),
],
],
),
),
const
SizedBox
(
const
SizedBox
(
...
@@ -454,17 +451,17 @@ class _FootFall extends State<FootFall> {
...
@@ -454,17 +451,17 @@ class _FootFall extends State<FootFall> {
),
),
),
),
),
),
//
Expanded(
Expanded
(
//
child: Text(
child:
Text
(
//
foot.mteens.toString(),
foot
.
mteens
.
toString
(),
//
textAlign: TextAlign.center,
textAlign:
TextAlign
.
center
,
//
style: const TextStyle(
style:
const
TextStyle
(
// color:
color:
Color
.
fromARGB
(
// Color.fromARGB(
255, 63, 123, 173),
255
,
63
,
123
,
173
),
//
fontWeight: FontWeight.bold,
fontWeight:
FontWeight
.
bold
,
//
),
),
//
),
),
//
),
),
],
],
),
),
const
SizedBox
(
const
SizedBox
(
...
@@ -517,16 +514,17 @@ class _FootFall extends State<FootFall> {
...
@@ -517,16 +514,17 @@ class _FootFall extends State<FootFall> {
),
),
),
),
),
),
// Expanded(
Expanded
(
// child: Text(
child:
Text
(
// foot.fteens.toString(),
foot
.
fteens
.
toString
(),
// textAlign: TextAlign.center,
textAlign:
TextAlign
.
center
,
// style: const TextStyle(
style:
const
TextStyle
(
// color: Color.fromARGB(255, 235, 25, 42),
color:
Color
.
fromARGB
(
// fontWeight: FontWeight.bold,
255
,
235
,
25
,
42
),
// ),
fontWeight:
FontWeight
.
bold
,
// ),
),
// ),
),
),
],
],
),
),
const
SizedBox
(
const
SizedBox
(
...
...
lib/Screens/Home.dart
View file @
e2657fa9
...
@@ -6,9 +6,9 @@ import 'package:shared_preferences/shared_preferences.dart';
...
@@ -6,9 +6,9 @@ import 'package:shared_preferences/shared_preferences.dart';
import
'package:storemonitor/Models/chartdata.dart'
;
import
'package:storemonitor/Models/chartdata.dart'
;
import
'package:storemonitor/Screens/EmployeeStatus.dart'
;
import
'package:storemonitor/Screens/EmployeeStatus.dart'
;
import
'package:storemonitor/Screens/IssueVideos.dart'
;
import
'package:storemonitor/Screens/IssueVideos.dart'
;
import
'package:storemonitor/Screens/MyHomePage.dart'
;
import
'package:storemonitor/Screens/NavBar.dart'
;
import
'package:storemonitor/Screens/NavBar.dart'
;
import
'package:intl/intl.dart'
;
import
'package:intl/intl.dart'
;
import
'package:storemonitor/Screens/WeeklyAudit.dart'
;
import
'package:storemonitor/Services/RemoteData.dart'
;
import
'package:storemonitor/Services/RemoteData.dart'
;
import
'package:syncfusion_flutter_charts/charts.dart'
;
import
'package:syncfusion_flutter_charts/charts.dart'
;
import
'Constants.dart'
;
import
'Constants.dart'
;
...
@@ -27,6 +27,7 @@ class Home extends StatefulWidget {
...
@@ -27,6 +27,7 @@ class Home extends StatefulWidget {
class
_Home
extends
State
<
Home
>
{
class
_Home
extends
State
<
Home
>
{
String
?
selectedDropdownItem
;
String
?
selectedDropdownItem
;
String
?
empId
;
List
<
String
>?
namesList
;
List
<
String
>?
namesList
;
late
List
<
GDPData
>
_chartData
;
late
List
<
GDPData
>
_chartData
;
DateTime
_selectedDate
=
DateTime
.
now
();
DateTime
_selectedDate
=
DateTime
.
now
();
...
@@ -46,6 +47,8 @@ class _Home extends State<Home> {
...
@@ -46,6 +47,8 @@ class _Home extends State<Home> {
loadData
()
async
{
loadData
()
async
{
SharedPreferences
prefs
=
await
SharedPreferences
.
getInstance
();
SharedPreferences
prefs
=
await
SharedPreferences
.
getInstance
();
String
?
userId
=
prefs
.
getString
(
"stores_list"
);
String
?
userId
=
prefs
.
getString
(
"stores_list"
);
empId
=
prefs
.
getString
(
'empId'
);
print
(
empId
);
namesList
=
(
json
.
decode
(
userId
!)
as
List
<
dynamic
>)
namesList
=
(
json
.
decode
(
userId
!)
as
List
<
dynamic
>)
.
map
((
map
)
=>
map
[
'name'
]
as
String
)
.
map
((
map
)
=>
map
[
'name'
]
as
String
)
.
toList
();
.
toList
();
...
@@ -647,9 +650,10 @@ class _Home extends State<Home> {
...
@@ -647,9 +650,10 @@ class _Home extends State<Home> {
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
(
context
)
=>
WeeklyAudit
(
builder:
(
context
)
=>
MyHomePage
(
message:
message:
selectedDropdownItem
.
toString
())));
'https://vaman.plutokm.com/sa_mob_report/
$empId
'
,
)));
},
},
child:
Container
(
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.44
,
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.44
,
...
...
lib/Screens/IssueVideos.dart
View file @
e2657fa9
...
@@ -2,7 +2,6 @@ import 'dart:convert';
...
@@ -2,7 +2,6 @@ import 'dart:convert';
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:permission_handler/permission_handler.dart'
;
import
'package:permission_handler/permission_handler.dart'
;
//import 'package:need_resume/need_resume.dart';
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:storemonitor/Screens/Issue.dart'
;
import
'package:storemonitor/Screens/Issue.dart'
;
import
'package:storemonitor/Screens/SurvellianceView.dart'
;
import
'package:storemonitor/Screens/SurvellianceView.dart'
;
...
@@ -36,10 +35,14 @@ class _IssueVideos extends State<IssueVideos> {
...
@@ -36,10 +35,14 @@ class _IssueVideos extends State<IssueVideos> {
Future
<
void
>
requestStoragePermission
()
async
{
Future
<
void
>
requestStoragePermission
()
async
{
final
status
=
await
Permission
.
storage
.
request
();
final
status
=
await
Permission
.
storage
.
request
();
if
(
status
.
isGranted
)
{
if
(
status
.
isGranted
)
{
print
(
'Granted'
);
if
(
kDebugMode
)
{
print
(
'Granted'
);
}
// You have the permission, you can now access storage.
// You have the permission, you can now access storage.
}
else
if
(
status
.
isDenied
)
{
}
else
if
(
status
.
isDenied
)
{
print
(
'Not Granted'
);
if
(
kDebugMode
)
{
print
(
'Not Granted'
);
}
// The user denied the permission. You can explain why you need it and request again.
// The user denied the permission. You can explain why you need it and request again.
}
else
if
(
status
.
isPermanentlyDenied
)
{
}
else
if
(
status
.
isPermanentlyDenied
)
{
// The user permanently denied the permission. You can open the app settings to let the user manually enable it.
// The user permanently denied the permission. You can open the app settings to let the user manually enable it.
...
@@ -65,9 +68,12 @@ class _IssueVideos extends State<IssueVideos> {
...
@@ -65,9 +68,12 @@ class _IssueVideos extends State<IssueVideos> {
}
}
void
getData
(
String
name
)
async
{
void
getData
(
String
name
)
async
{
if
(
kDebugMode
)
{
print
(
"Second Class Hitting"
);
}
bool
isInternetConnected
=
await
Constants
.
checkInternetConnectivity
();
bool
isInternetConnected
=
await
Constants
.
checkInternetConnectivity
();
if
(
isInternetConnected
)
{
if
(
isInternetConnected
)
{
showDialog
(
showDialog
(
context:
context
,
context:
context
,
builder:
(
context
)
{
builder:
(
context
)
{
return
const
Center
(
return
const
Center
(
...
@@ -119,354 +125,354 @@ class _IssueVideos extends State<IssueVideos> {
...
@@ -119,354 +125,354 @@ class _IssueVideos extends State<IssueVideos> {
),
),
),
),
),
),
body:
Container
(
body:
SingleChildScrollView
(
margin:
const
EdgeInsets
.
all
(
15.0
),
child:
Container
(
child:
Column
(
margin:
const
EdgeInsets
.
all
(
15.0
),
//crossAxisAlignment: CrossAxisAlignment.center,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
//crossAxisAlignment: CrossAxisAlignment.center,
children:
[
mainAxisAlignment:
MainAxisAlignment
.
start
,
// SizedBox(
children:
[
// width: double.infinity,
// SizedBox(
// //height: double.infinity,
// width: double.infinity,
// child: DropdownButton(
// //height: double.infinity,
// isExpanded: true,
// child: DropdownButton(
// value: selectedDropdownItem,
// isExpanded: true,
// onChanged: (value) {
// value: selectedDropdownItem,
// setState(() {
// onChanged: (value) {
// selectedDropdownItem = value;
// setState(() {
// //getupdateData(selectedDropdownItem);
// selectedDropdownItem = value;
// });
// //getupdateData(selectedDropdownItem);
// },
// });
// items: storesList?.map((value) {
// },
// return DropdownMenuItem(
// items: storesList?.map((value) {
// value: value,
// return DropdownMenuItem(
// child: Text(value),
// value: value,
// );
// child: Text(value),
// }).toList(),
// );
// ),
// }).toList(),
// ),
// ),
Container
(
// ),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10.0
),
Container
(
decoration:
BoxDecoration
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10.0
),
border:
Border
.
all
(
color:
Colors
.
grey
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
5.0
),
border:
Border
.
all
(
color:
Colors
.
grey
),
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
child:
DropdownButtonHideUnderline
(
),
child:
DropdownButton
<
String
>(
child:
DropdownButtonHideUnderline
(
menuMaxHeight:
Constants
.
getDropdownItemHeight
(
context
),
child:
DropdownButton
<
String
>(
value:
selectedDropdownItem
,
menuMaxHeight:
Constants
.
getDropdownItemHeight
(
context
),
onChanged:
(
newValue
)
{
value:
selectedDropdownItem
,
setState
(()
{
onChanged:
(
newValue
)
{
selectedDropdownItem
=
newValue
;
setState
(()
{
getData
(
selectedDropdownItem
!);
selectedDropdownItem
=
newValue
;
});
getData
(
selectedDropdownItem
!);
},
});
items:
storesList
?.
map
((
item
)
{
},
return
DropdownMenuItem
<
String
>(
items:
storesList
?.
map
((
item
)
{
value:
item
,
return
DropdownMenuItem
<
String
>(
child:
Text
(
item
),
value:
item
,
);
child:
Text
(
item
),
}).
toList
(),
);
icon:
const
Icon
(
Icons
.
arrow_drop_down
),
}).
toList
(),
isExpanded:
true
,
icon:
const
Icon
(
Icons
.
arrow_drop_down
),
isExpanded:
true
,
),
),
),
),
),
),
const
SizedBox
(
width:
0
,
height:
15
,
),
const
Row
(
const
SizedBox
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
width:
0
,
children:
[
height:
15
,
Text
(
'Details'
,
textAlign:
TextAlign
.
left
,
style:
Constants
.
headerfontStyle
),
],
),
Container
(
decoration:
BoxDecoration
(
// border: Border.all(
// color: const Color.fromARGB(255, 123, 50, 254),
// style: BorderStyle.solid,
// width: 1.0,
// ),
color:
const
Color
.
fromARGB
(
255
,
35
,
22
,
66
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
),
),
//color: Color.fromARGB(255, 123, 50, 254),
height:
40
,
const
Row
(
child:
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
Expanded
(
Text
(
'Details'
,
child:
Text
(
textAlign:
TextAlign
.
left
,
'VIDNOTID'
,
style:
Constants
.
headerfontStyle
),
textAlign:
TextAlign
.
center
,
],
style:
Constants
.
whitefontStyle
,
),
Container
(
decoration:
BoxDecoration
(
// border: Border.all(
// color: const Color.fromARGB(255, 123, 50, 254),
// style: BorderStyle.solid,
// width: 1.0,
// ),
color:
const
Color
.
fromARGB
(
255
,
35
,
22
,
66
),
borderRadius:
BorderRadius
.
circular
(
5.0
),
),
//color: Color.fromARGB(255, 123, 50, 254),
height:
40
,
child:
const
Row
(
children:
[
Expanded
(
child:
Text
(
'VIDNOTID'
,
textAlign:
TextAlign
.
center
,
style:
Constants
.
whitefontStyle
,
),
),
),
),
SizedBox
(
width:
10
),
SizedBox
(
width:
10
),
VerticalDivider
(
VerticalDivider
(
width:
1.0
,
width:
1.0
,
color:
Colors
.
white
,
color:
Colors
.
white
,
),
Expanded
(
child:
Text
(
'Time'
,
textAlign:
TextAlign
.
center
,
style:
Constants
.
whitefontStyle
,
),
),
),
Expanded
(
VerticalDivider
(
child:
Text
(
width:
1.0
,
'Time'
,
color:
Colors
.
white
,
textAlign:
TextAlign
.
center
,
),
style:
Constants
.
whitefontStyle
,
Expanded
(
),
child:
Text
(
'STATUS'
,
textAlign:
TextAlign
.
center
,
style:
Constants
.
whitefontStyle
,
),
),
),
VerticalDivider
(
// VerticalDivider(
width:
1.0
,
// width: 1.0,
color:
Colors
.
white
,
// color: Colors.white,
),
// ),
Expanded
(
// Expanded(
child:
Text
(
// child: Text(
'STATUS'
,
// 'LINK',
textAlign:
TextAlign
.
center
,
// textAlign: TextAlign.center,
style:
Constants
.
whitefontStyle
,
// style: Constants.whitefontStyle,
),
// ),
),
// ),
// VerticalDivider(
],
// width: 1.0,
// color: Colors.white,
// ),
// Expanded(
// child: Text(
// 'LINK',
// textAlign: TextAlign.center,
// style: Constants.whitefontStyle,
// ),
// ),
],
),
),
),
),
SizedBox
(
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.65
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.65
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
notificationslist
?.
length
,
itemCount:
notificationslist
?.
length
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Padding
(
return
Padding
(
padding:
const
EdgeInsets
.
all
(
2.0
),
padding:
const
EdgeInsets
.
all
(
2.0
),
child:
Container
(
child:
Container
(
height:
60
,
height:
60
,
color:
index
%
2
==
0
color:
index
%
2
==
0
?
const
Color
.
fromARGB
(
255
,
245
,
242
,
251
)
?
const
Color
.
fromARGB
(
255
,
245
,
242
,
251
)
:
Colors
.
white
,
:
Colors
.
white
,
child:
GestureDetector
(
child:
GestureDetector
(
onTap:
()
{
onTap:
()
{
requestStoragePermission
();
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(
Navigator
.
push
(
// builder: (_) => MyHomePage()));
context
,
},
MaterialPageRoute
(
child:
Row
(
builder:
(
context
)
=>
SurvellianceView
(
children:
[
message:
Expanded
(
notificationslist
![
index
].
VIDEOURL
,
child:
Text
(
id:
notificationslist
![
index
]
notificationslist
![
index
]
.
VIDNOTID
.
VIDNOTID
.
toString
(),
.
toString
()
comment:
.
toLowerCase
(),
notificationslist
![
index
].
COMMENTS
,
style:
Constants
.
headerlistitems
,
desc:
notificationslist
![
index
]
textAlign:
TextAlign
.
center
,
.
DESCRIPTION
,
overflow:
TextOverflow
.
ellipsis
,
store:
notificationslist
![
index
].
STORE
,
location:
notificationslist
![
index
].
LOCATION
,
time:
notificationslist
![
index
].
TIMESTAMP
,
)),
).
then
((
value
)
=>
setState
(()
{
getData
(
selectedDropdownItem
!);
}));
print
(
"refresh done "
);
},
child:
Row
(
children:
[
Expanded
(
child:
Text
(
notificationslist
![
index
]
.
VIDNOTID
.
toString
()
.
toLowerCase
(),
style:
Constants
.
headerlistitems
,
textAlign:
TextAlign
.
center
,
overflow:
TextOverflow
.
ellipsis
,
),
),
const
SizedBox
(
width:
10
),
const
VerticalDivider
(
width:
1.0
,
color:
Colors
.
white
,
),
Expanded
(
child:
Text
(
notificationslist
![
index
]
.
TIMESTAMP
.
toString
(),
textAlign:
TextAlign
.
center
,
style:
Constants
.
headerlistitems1
,
),
),
),
),
const
VerticalDivider
(
const
SizedBox
(
width:
10
),
width:
1.0
,
const
VerticalDivider
(
color:
Colors
.
white
,
width:
1.0
,
color:
Colors
.
white
,
),
Expanded
(
child:
Text
(
notificationslist
![
index
].
TIMESTAMP
.
toString
(),
textAlign:
TextAlign
.
center
,
style:
Constants
.
headerlistitems1
,
),
),
),
Expanded
(
const
VerticalDivider
(
child:
notificationslist
![
index
]
width:
1.0
,
.
STATUS
color:
Colors
.
white
,
.
toString
()
==
),
'CLOSED'
Expanded
(
?
const
Text
(
child:
'VIEWED'
,
notificationslist
![
index
].
STATUS
.
toString
()
==
style:
Constants
.
close
,
'CLOSED'
overflow:
TextOverflow
.
ellipsis
,
?
const
Text
(
textAlign:
TextAlign
.
center
,
'VIEWED'
,
)
style:
Constants
.
close
,
:
Text
(
overflow:
TextOverflow
.
ellipsis
,
notificationslist
![
index
]
textAlign:
TextAlign
.
center
,
.
STATUS
)
.
toString
(),
:
Text
(
style:
Constants
.
open
,
notificationslist
![
index
]
overflow:
TextOverflow
.
ellipsis
,
.
STATUS
textAlign:
TextAlign
.
center
,
.
toString
(),
),
style:
Constants
.
open
,
),
overflow:
TextOverflow
.
ellipsis
,
// VerticalDivider(
textAlign:
TextAlign
.
center
,
// width: 1.0,
),
// color: Colors.white,
),
// ),
// VerticalDivider(
// Expanded(
// width: 1.0,
// child: Text(
// color: Colors.white,
// 'LINK',
// ),
// textAlign: TextAlign.center,
// Expanded(
// style: Constants.whitefontStyle,
// child: Text(
// ),
// 'LINK',
// textAlign: TextAlign.center,
// style: Constants.whitefontStyle,
// ),
// ),
// ),
],
],
),
),
),
),
// child: Row(
// child: Row(
// children: [
// children: [
// const SizedBox(
// const SizedBox(
// width: 5,
// width: 5,
// height: 2,
// height: 2,
// ),
// ),
// SizedBox(
// SizedBox(
// width: MediaQuery.of(context).size.width / 3.3,
// width: MediaQuery.of(context).size.width / 3.3,
// // height: 40,
// // height: 40,
// child: Text(
// child: Text(
// notificationslist![index]
// notificationslist![index]
// .DESCRIPTION
// .DESCRIPTION
// .toString()
// .toString()
// .toLowerCase(),
// .toLowerCase(),
// style: Constants.headerlistitems,
// style: Constants.headerlistitems,
// maxLines: 5,
// maxLines: 5,
// overflow: TextOverflow.ellipsis,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.left,
// textAlign: TextAlign.left,
// ),
// ),
// ),
// ),
// const VerticalDivider(
// const VerticalDivider(
// width: 1.0,
// width: 1.0,
// color: Colors.white,
// color: Colors.white,
// ),
// ),
// // SizedBox(
// // SizedBox(
// // width: MediaQuery.of(context).size.width / 4.6,
// // width: MediaQuery.of(context).size.width / 4.6,
// // child: Text(
// // child: Text(
// // notificationslist![index].STATUS.toString(),
// // notificationslist![index].STATUS.toString(),
// // style: Constants.headerlistitems1,
// // style: Constants.headerlistitems1,
// // overflow: TextOverflow.ellipsis,
// // overflow: TextOverflow.ellipsis,
// // textAlign: TextAlign.center,
// // textAlign: TextAlign.center,
// // ),
// // ),
// // ),
// // ),
// // const VerticalDivider(
// // const VerticalDivider(
// // width: 1.0,
// // width: 1.0,
// // color: Colors.white,
// // color: Colors.white,
// // ),
// // ),
// SizedBox(
// SizedBox(
// width: MediaQuery.of(context).size.width / 3.4,
// width: MediaQuery.of(context).size.width / 3.4,
// child:
// child:
// notificationslist![index].STATUS.toString() ==
// notificationslist![index].STATUS.toString() ==
// 'CLOSED'
// 'CLOSED'
// ? const Text(
// ? const Text(
// 'VIEWED',
// 'VIEWED',
// style: Constants.headerlistitems1,
// style: Constants.headerlistitems1,
// overflow: TextOverflow.ellipsis,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.center,
// textAlign: TextAlign.center,
// )
// )
// : Text(
// : Text(
// notificationslist![index]
// notificationslist![index]
// .STATUS
// .STATUS
// .toString(),
// .toString(),
// style: Constants.headerlistitems1,
// style: Constants.headerlistitems1,
// overflow: TextOverflow.ellipsis,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.center,
// textAlign: TextAlign.center,
// ),
// ),
// ),
// ),
// const VerticalDivider(
// const VerticalDivider(
// width: 1.0,
// width: 1.0,
// color: Colors.white,
// color: Colors.white,
// ),
// ),
// SizedBox(
// SizedBox(
// width: MediaQuery.of(context).size.width / 3.6,
// width: MediaQuery.of(context).size.width / 3.6,
// child: Align(
// child: Align(
// alignment: Alignment.center,
// alignment: Alignment.center,
// child: IconButton(
// child: IconButton(
// icon: const Icon(Icons.play_arrow,
// icon: const Icon(Icons.play_arrow,
// size: 32.0), // Play arrow icon
// size: 32.0), // Play arrow icon
// onPressed: () {
// onPressed: () {
// // Add your play button action here
// // Add your play button action here
// // For example, start playing a video or audio
// // For example, start playing a video or audio
// // Navigator.push(
// // Navigator.push(
// // context,
// // context,
// // MaterialPageRoute(
// // MaterialPageRoute(
// // builder: (context) => SurvellianceView(
// // builder: (context) => SurvellianceView(
// // message: notificationslist![index]
// // message: notificationslist![index]
// // .VIDEOURL,
// // .VIDEOURL,
// // id: notificationslist![index]
// // id: notificationslist![index]
// // .VIDNOTID
// // .VIDNOTID
// // .toString(),
// // .toString(),
// // ),
// // ),
// // ),
// // ),
// // );
// // );
// Navigator.of(context)
// Navigator.of(context)
// .push(
// .push(
// MaterialPageRoute(
// MaterialPageRoute(
// builder: (_) => SurvellianceView(
// builder: (_) => SurvellianceView(
// message: notificationslist![
// message: notificationslist![
// index]
// index]
// .VIDEOURL,
// .VIDEOURL,
// id: notificationslist![
// id: notificationslist![
// index]
// index]
// .VIDNOTID
// .VIDNOTID
// .toString(),
// .toString(),
// )),
// )),
// )
// )
// .then((val) => val
// .then((val) => val
// ? getData(selectedDropdownItem!)
// ? getData(selectedDropdownItem!)
// : null);
// : null);
// //.then((value) => setState(() {}));
// //.then((value) => setState(() {}));
// },
// },
// ),
// ),
// ),
// ),
// ),
// ),
// ],
// ],
// ),
// ),
),
),
);
);
},
},
),
),
),
)
,
]
,
]
,
)
,
),
),
),
),
);
);
...
...
lib/Screens/MyHomePage.dart
View file @
e2657fa9
import
'package:
chewie/chewie
.dart'
;
import
'package:
flutter/foundation
.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_inappwebview/flutter_inappwebview.dart'
;
import
'package:flutter_inappwebview/flutter_inappwebview.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
import
'package:storemonitor/Screens/Constants.dart'
;
import
'package:storemonitor/Screens/Constants.dart'
;
import
'package:video_player/video_player.dart'
;
class
MyHomePage
extends
StatefulWidget
{
class
MyHomePage
extends
StatefulWidget
{
const
MyHomePage
({
super
.
key
});
final
String
message
;
const
MyHomePage
({
super
.
key
,
required
this
.
message
});
@override
@override
_VideoPlayerScreenState
createState
()
=>
_VideoPlayerScreenState
();
_VideoPlayerScreenState
createState
()
=>
_VideoPlayerScreenState
();
}
}
class
_VideoPlayerScreenState
extends
State
<
MyHomePage
>
{
class
_VideoPlayerScreenState
extends
State
<
MyHomePage
>
{
late
VideoPlayerController
_videoPlayerController
;
var
isMeeters
=
''
;
late
ChewieController
_chewieController
;
InAppWebViewController
?
webViewController
;
InAppWebViewController
?
webViewController
;
String
?
userId
=
''
;
//double _scale = 1.0;
//double _scale = 1.0;
String
?
url
=
'http://192.168.65.111:8100/restream'
;
//String? url = 'http://192.168.65.111:8100/restream';
String
?
urlData
=
String
urlData
=
''
;
'https://www.flutterdecode.com/play-video-from-url-in-flutter'
;
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
isMeeters
=
widget
.
message
;
//getLoadData();
}
Future
<
void
>
getLoadData
()
async
{
SharedPreferences
prefs
=
await
SharedPreferences
.
getInstance
();
userId
=
prefs
.
getString
(
'empId'
);
urlData
=
'https://vaman.plutokm.com/sa_mob_report/
$userId
'
;
//await Future.delayed(Duration(seconds: 1));
if
(
kDebugMode
)
{
print
(
urlData
);
}
}
}
@override
@override
void
dispose
()
{
void
dispose
()
{
super
.
dispose
();
super
.
dispose
();
_videoPlayerController
.
dispose
();
_chewieController
.
dispose
();
}
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
// leading: IconButton(
// icon: const Icon(Icons.arrow_back),
// onPressed: () async {
// Navigator.pop(context, true);
// },
// ),
title:
const
Text
(
title:
const
Text
(
'
Video Playing
'
,
'
Weekly Report
'
,
style:
Constants
.
fontStyle
,
style:
Constants
.
fontStyle
,
),
),
flexibleSpace:
Container
(
flexibleSpace:
Container
(
...
@@ -52,11 +57,12 @@ class _VideoPlayerScreenState extends State<MyHomePage> {
...
@@ -52,11 +57,12 @@ class _VideoPlayerScreenState extends State<MyHomePage> {
),
),
),
),
),
),
body:
SizedBox
(
body:
SizedBox
(
height:
MediaQuery
.
of
(
context
).
size
.
height
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
InAppWebView
(
child:
InAppWebView
(
initialUrlRequest:
URLRequest
(
initialUrlRequest:
URLRequest
(
url:
Uri
.
parse
(
"http://192.168.65.111:8100"
),
url:
Uri
.
parse
(
isMeeters
),
),
),
onWebViewCreated:
(
controller
)
{
onWebViewCreated:
(
controller
)
{
webViewController
=
controller
;
webViewController
=
controller
;
...
@@ -77,29 +83,23 @@ class _VideoPlayerScreenState extends State<MyHomePage> {
...
@@ -77,29 +83,23 @@ class _VideoPlayerScreenState extends State<MyHomePage> {
}
}
// class VideoStream extends StatefulWidget {
// class VideoStream extends StatefulWidget {
// const VideoStream({Key? key}) : super(key: key);
// const VideoStream({Key? key}) : super(key: key);
// @override
// @override
// State<VideoStream> createState() => _VideoStreamState();
// State<VideoStream> createState() => _VideoStreamState();
// }
// }// class _VideoStreamState extends State<VideoStream> {
// class _VideoStreamState extends State<VideoStream> {
// final WebSocket _socket = WebSocket('http://192.168.65.111:8100/restream');
// final WebSocket _socket = WebSocket('http://192.168.65.111:8100/restream');
// bool _isConnected = false;
// bool _isConnected = false;
// void connect(BuildContext context) async {
// void connect(BuildContext context) async {
// _socket.connect();
// _socket.connect();
// setState(() {
// setState(() {
// _isConnected = true;
// _isConnected = true;
// });
// });
// }
// }
// void disconnect() {
// void disconnect() {
// _socket.disconnect();
// _socket.disconnect();
// setState(() {
// setState(() {
// _isConnected = false;
// _isConnected = false;
// });
// });
// }
// }
// @override
// @override
// Widget build(BuildContext context) {
// Widget build(BuildContext context) {
// return Scaffold(
// return Scaffold(
...
@@ -136,7 +136,6 @@ class _VideoPlayerScreenState extends State<MyHomePage> {
...
@@ -136,7 +136,6 @@ class _VideoPlayerScreenState extends State<MyHomePage> {
// if (!snapshot.hasData) {
// if (!snapshot.hasData) {
// return const CircularProgressIndicator();
// return const CircularProgressIndicator();
// }
// }
// if (snapshot.connectionState == ConnectionState.done) {
// if (snapshot.connectionState == ConnectionState.done) {
// return const Center(
// return const Center(
// child: Text("Connection Closed !"),
// child: Text("Connection Closed !"),
...
...
lib/Screens/Review.dart
View file @
e2657fa9
...
@@ -170,6 +170,14 @@ class _Review extends State<Review> {
...
@@ -170,6 +170,14 @@ class _Review extends State<Review> {
Navigator
.
of
(
context
).
pop
();
Navigator
.
of
(
context
).
pop
();
Constants
(
'Review'
,
data
.
statusCode
.
toString
())
Constants
(
'Review'
,
data
.
statusCode
.
toString
())
.
showAlertDialog
(
context
,
false
);
.
showAlertDialog
(
context
,
false
);
setState
(()
{
filteredAlerts
?.
clear
();
if
(
filteredAlerts
!.
isNotEmpty
)
{
_controller
.
text
=
'
${1}
/
${filteredAlerts?.length ?? 0}
'
;
}
else
{
_controller
.
text
=
'
${0}
/
${filteredAlerts?.length ?? 0}
'
;
}
});
}
}
}
else
{}
}
else
{}
}
}
...
...
lib/Screens/SurvellianceView.dart
View file @
e2657fa9
...
@@ -25,7 +25,7 @@ class SurvellianceView extends StatefulWidget {
...
@@ -25,7 +25,7 @@ class SurvellianceView extends StatefulWidget {
required
this
.
location
,
required
this
.
location
,
required
this
.
time
})
required
this
.
time
})
:
super
(
key:
key
);
:
super
(
key:
key
);
@override
@override
_SurvellianceViewState
createState
()
=>
_SurvellianceViewState
();
_SurvellianceViewState
createState
()
=>
_SurvellianceViewState
();
}
}
...
@@ -39,7 +39,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -39,7 +39,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
var
location
=
''
;
var
location
=
''
;
var
des
=
''
;
var
des
=
''
;
var
time
=
''
;
var
time
=
''
;
//late VlcPlayerController? controller;
final
TextEditingController
_textFieldController3
=
TextEditingController
();
final
TextEditingController
_textFieldController3
=
TextEditingController
();
final
_focusNode
=
FocusNode
();
final
_focusNode
=
FocusNode
();
...
@@ -53,17 +52,13 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -53,17 +52,13 @@ class _SurvellianceViewState extends State<SurvellianceView> {
}
}
void
initilize
(
String
url
)
{
void
initilize
(
String
url
)
{
_videoPlayerController
=
VideoPlayerController
.
networkUrl
(
_videoPlayerController
=
VideoPlayerController
.
networkUrl
(
Uri
.
parse
(
url
));
Uri
.
parse
(
url
),
);
_chewieController
=
ChewieController
(
_chewieController
=
ChewieController
(
videoPlayerController:
_videoPlayerController
,
videoPlayerController:
_videoPlayerController
,
aspectRatio:
16
/
9
,
// Set your desired aspect ratio
aspectRatio:
16
/
9
,
// Set your desired aspect ratio
autoPlay:
true
,
autoPlay:
true
,
looping:
false
,
// Set to true if you want the video to loop
looping:
false
,
// Set to true if you want the video to loop
// Other customization options can be set here
showControls:
true
,
// Show video controls
showControls:
true
,
// Show video controls
// Other customization options can be set here
materialProgressColors:
ChewieProgressColors
(
materialProgressColors:
ChewieProgressColors
(
playedColor:
playedColor:
const
Color
.
fromARGB
(
255
,
205
,
96
,
196
),
// Change played color
const
Color
.
fromARGB
(
255
,
205
,
96
,
196
),
// Change played color
...
@@ -105,7 +100,7 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -105,7 +100,7 @@ class _SurvellianceViewState extends State<SurvellianceView> {
final
respon
=
await
RemoteData
().
getUpdateIssueVideos1
(
Id
,
comment
);
final
respon
=
await
RemoteData
().
getUpdateIssueVideos1
(
Id
,
comment
);
Map
<
String
,
dynamic
>
responseMap
=
jsonDecode
(
respon
);
Map
<
String
,
dynamic
>
responseMap
=
jsonDecode
(
respon
);
Navigator
.
of
(
context
).
pop
();
Navigator
.
of
(
context
).
pop
();
hideKeyboard
(
context
);
if
(
responseMap
[
'status'
]
==
'Updated'
)
{
if
(
responseMap
[
'status'
]
==
'Updated'
)
{
Constants
.
dialogMessage
(
context
,
'Video Playing'
,
responseMap
[
'status'
]);
Constants
.
dialogMessage
(
context
,
'Video Playing'
,
responseMap
[
'status'
]);
//Navigator.of(context).pop();
//Navigator.of(context).pop();
...
@@ -120,7 +115,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -120,7 +115,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
void
hideKeyboard
(
BuildContext
context
)
{
void
hideKeyboard
(
BuildContext
context
)
{
// Use FocusScope to find the current FocusNode
// Use FocusScope to find the current FocusNode
final
currentFocus
=
FocusScope
.
of
(
context
);
final
currentFocus
=
FocusScope
.
of
(
context
);
// Unfocus the current FocusNode to hide the keyboard
// Unfocus the current FocusNode to hide the keyboard
if
(!
currentFocus
.
hasPrimaryFocus
)
{
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
currentFocus
.
unfocus
();
...
@@ -169,35 +163,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -169,35 +163,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
width:
1
,
width:
1
,
height:
15
,
height:
15
,
),
),
// SizedBox(
// width: 90,
// height: 40,
// child: ElevatedButton(
// onPressed: () {
// setState(() {
// _isPlaying = !_isPlaying;
// if (_isPlaying) {
// controller!.play();
// } else {
// controller!.pause();
// }
// });
// },
// style: ButtonStyle(
// backgroundColor: MaterialStateProperty.all<Color>(
// const Color.fromARGB(255, 35, 22, 66)),
// ),
// child: Text(_isPlaying ? 'Pause' : 'Play'),
// ),
// ),
// Center(
// child: isLoading
// ? const CircularProgressIndicator(
// color: Color.fromARGB(255, 173, 57, 230),
// )
// : const Text(''),
// ),
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
children:
[
...
@@ -208,12 +173,9 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -208,12 +173,9 @@ class _SurvellianceViewState extends State<SurvellianceView> {
width:
10
,
width:
10
,
height:
1
,
height:
1
,
),
),
Text
(
id
,
Text
(
id
,
style:
Constants
.
listHeaderoppfontStyle
,
style:
Constants
.
listHeaderoppfontStyle
,
overflow:
TextOverflow
.
ellipsis
),
overflow:
TextOverflow
.
ellipsis
),
//isvisible =false;
],
],
),
),
const
SizedBox
(
height:
10.0
),
const
SizedBox
(
height:
10.0
),
...
@@ -227,12 +189,9 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -227,12 +189,9 @@ class _SurvellianceViewState extends State<SurvellianceView> {
width:
10
,
width:
10
,
height:
1
,
height:
1
,
),
),
Text
(
store
,
Text
(
store
,
style:
Constants
.
listHeaderoppfontStyle
,
style:
Constants
.
listHeaderoppfontStyle
,
overflow:
TextOverflow
.
ellipsis
),
overflow:
TextOverflow
.
ellipsis
),
//isvisible =false;
],
],
),
),
const
SizedBox
(
height:
10.0
),
const
SizedBox
(
height:
10.0
),
...
@@ -254,10 +213,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -254,10 +213,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
style:
Constants
.
listHeaderoppfontStyle
,
style:
Constants
.
listHeaderoppfontStyle
,
),
),
),
),
// Text(location,
// textAlign: TextAlign.right,
// style: Constants.listHeaderoppfontStyle,
// overflow: TextOverflow.ellipsis),
],
],
),
),
const
SizedBox
(
height:
10.0
),
const
SizedBox
(
height:
10.0
),
...
@@ -358,7 +313,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
...
@@ -358,7 +313,6 @@ class _SurvellianceViewState extends State<SurvellianceView> {
color:
color:
Color
.
fromARGB
(
255
,
173
,
57
,
230
)));
Color
.
fromARGB
(
255
,
173
,
57
,
230
)));
});
});
//getUpdate(id, _textFieldController3.text);
//getUpdate(id, _textFieldController3.text);
getUpdate1
(
id
,
_textFieldController3
.
text
);
getUpdate1
(
id
,
_textFieldController3
.
text
);
}
else
{
}
else
{
...
...
lib/Screens/WeeklyAudit.dart
View file @
e2657fa9
...
@@ -88,9 +88,9 @@ class _CheckBoxListState extends State<WeeklyAudit> {
...
@@ -88,9 +88,9 @@ class _CheckBoxListState extends State<WeeklyAudit> {
),
),
),
),
Padding
(
Padding
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
2
0
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
1
0
),
child:
Text
(
child:
Text
(
'
Audited?'
,
'Audited?'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
16
,
fontSize:
16
,
fontWeight:
FontWeight
.
bold
,
fontWeight:
FontWeight
.
bold
,
...
@@ -102,7 +102,7 @@ class _CheckBoxListState extends State<WeeklyAudit> {
...
@@ -102,7 +102,7 @@ class _CheckBoxListState extends State<WeeklyAudit> {
),
),
),
),
body:
ListView
(
body:
ListView
(
padding:
const
EdgeInsets
.
fromLTRB
(
4
,
2
,
2
0
,
4
),
padding:
const
EdgeInsets
.
fromLTRB
(
4
,
2
,
1
0
,
4
),
children:
List
<
Widget
>.
generate
(
_items
.
length
,
(
index
)
{
children:
List
<
Widget
>.
generate
(
_items
.
length
,
(
index
)
{
final
SimpleModel
item
=
_items
[
index
];
final
SimpleModel
item
=
_items
[
index
];
final
Color
backgroundColor
=
index
%
2
==
0
final
Color
backgroundColor
=
index
%
2
==
0
...
...
lib/main.dart
View file @
e2657fa9
...
@@ -5,14 +5,14 @@ import 'package:storemonitor/FirebaseApi.dart';
...
@@ -5,14 +5,14 @@ import 'package:storemonitor/FirebaseApi.dart';
import
'Screens/SplashScreen.dart'
;
import
'Screens/SplashScreen.dart'
;
Future
<
void
>
main
()
async
{
Future
<
void
>
main
()
async
{
if
(
Platform
.
isAndroid
)
{
WidgetsFlutterBinding
.
ensureInitialized
();
WidgetsFlutterBinding
.
ensureInitialized
();
await
Firebase
.
initializeApp
();
if
(
Platform
.
isAndroid
)
{
await
FirebaseApi
().
initNotifications
();
WidgetsFlutterBinding
.
ensureInitialized
();
}
await
Firebase
.
initializeApp
();
runApp
(
const
MaterialApp
(
await
FirebaseApi
().
initNotifications
();
}
runApp
(
const
MaterialApp
(
debugShowCheckedModeBanner:
false
,
debugShowCheckedModeBanner:
false
,
home:
SplashScreen
(),
home:
SplashScreen
(),)
)
);
);
}
}
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