Commit e2657fa9 by Ramesh Babu Puvvadi

added changes

parent a96d8a62
...@@ -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(
......
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);
} }
} }
}, },
......
...@@ -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);
......
...@@ -73,7 +73,8 @@ class _EmployeeReport extends State<EmployeeReport> { ...@@ -73,7 +73,8 @@ class _EmployeeReport extends State<EmployeeReport> {
), ),
), ),
), ),
body: Container( body: SingleChildScrollView(
child: Container(
margin: const EdgeInsets.all(15.0), margin: const EdgeInsets.all(15.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -174,7 +175,8 @@ class _EmployeeReport extends State<EmployeeReport> { ...@@ -174,7 +175,8 @@ class _EmployeeReport extends State<EmployeeReport> {
' Registered :', ' Registered :',
style: Constants.headerlistitems, style: Constants.headerlistitems,
), ),
Text(' $registered', style: Constants.headerlistitems1), Text(' $registered',
style: Constants.headerlistitems1),
], ],
), ),
const SizedBox(width: 1, height: 10), const SizedBox(width: 1, height: 10),
...@@ -255,7 +257,7 @@ class _EmployeeReport extends State<EmployeeReport> { ...@@ -255,7 +257,7 @@ class _EmployeeReport extends State<EmployeeReport> {
), ),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * 0.42, height: MediaQuery.of(context).size.height * 0.48,
child: ListView.builder( child: ListView.builder(
itemCount: empreportlist?.length, itemCount: empreportlist?.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
...@@ -372,6 +374,7 @@ class _EmployeeReport extends State<EmployeeReport> { ...@@ -372,6 +374,7 @@ class _EmployeeReport extends State<EmployeeReport> {
], ],
), ),
), ),
),
); );
} }
...@@ -388,7 +391,7 @@ class _EmployeeReport extends State<EmployeeReport> { ...@@ -388,7 +391,7 @@ class _EmployeeReport extends State<EmployeeReport> {
); );
}, },
); );
} }
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);
} }
} }
} }
...@@ -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(
......
...@@ -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,
......
...@@ -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) {
if (kDebugMode) {
print('Granted'); 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) {
if (kDebugMode) {
print('Not Granted'); 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,6 +68,9 @@ class _IssueVideos extends State<IssueVideos> { ...@@ -65,6 +68,9 @@ 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(
...@@ -119,7 +125,8 @@ class _IssueVideos extends State<IssueVideos> { ...@@ -119,7 +125,8 @@ class _IssueVideos extends State<IssueVideos> {
), ),
), ),
), ),
body: Container( body: SingleChildScrollView(
child: Container(
margin: const EdgeInsets.all(15.0), margin: const EdgeInsets.all(15.0),
child: Column( child: Column(
//crossAxisAlignment: CrossAxisAlignment.center, //crossAxisAlignment: CrossAxisAlignment.center,
...@@ -260,35 +267,30 @@ class _IssueVideos extends State<IssueVideos> { ...@@ -260,35 +267,30 @@ class _IssueVideos extends State<IssueVideos> {
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
requestStoragePermission(); requestStoragePermission();
Navigator.of(context)
.push( Navigator.push(
context,
MaterialPageRoute( MaterialPageRoute(
builder: (_) => SurvellianceView( builder: (context) => SurvellianceView(
message: notificationslist![index] message:
.VIDEOURL, notificationslist![index].VIDEOURL,
id: notificationslist![index] id: notificationslist![index]
.VIDNOTID .VIDNOTID
.toString(), .toString(),
comment: notificationslist![index] comment:
.COMMENTS, notificationslist![index].COMMENTS,
desc: notificationslist![index] desc: notificationslist![index]
.DESCRIPTION, .DESCRIPTION,
store: store: notificationslist![index].STORE,
notificationslist![index].STORE, location:
location: notificationslist![index] notificationslist![index].LOCATION,
.LOCATION, time:
time: notificationslist![index] notificationslist![index].TIMESTAMP,
.TIMESTAMP,
)), )),
) ).then((value) => setState(() {
.then((val) => (val != null) getData(selectedDropdownItem!);
? (val }));
? getData(selectedDropdownItem!) print("refresh done ");
: true)
: false);
// Navigator.of(context).push(MaterialPageRoute(
// builder: (_) => MyHomePage()));
}, },
child: Row( child: Row(
children: [ children: [
...@@ -310,7 +312,9 @@ class _IssueVideos extends State<IssueVideos> { ...@@ -310,7 +312,9 @@ class _IssueVideos extends State<IssueVideos> {
), ),
Expanded( Expanded(
child: Text( child: Text(
notificationslist![index].TIMESTAMP.toString(), notificationslist![index]
.TIMESTAMP
.toString(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: Constants.headerlistitems1, style: Constants.headerlistitems1,
), ),
...@@ -320,8 +324,9 @@ class _IssueVideos extends State<IssueVideos> { ...@@ -320,8 +324,9 @@ class _IssueVideos extends State<IssueVideos> {
color: Colors.white, color: Colors.white,
), ),
Expanded( Expanded(
child: child: notificationslist![index]
notificationslist![index].STATUS.toString() == .STATUS
.toString() ==
'CLOSED' 'CLOSED'
? const Text( ? const Text(
'VIEWED', 'VIEWED',
...@@ -469,6 +474,7 @@ class _IssueVideos extends State<IssueVideos> { ...@@ -469,6 +474,7 @@ class _IssueVideos extends State<IssueVideos> {
], ],
), ),
), ),
),
); );
} }
} }
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 !"),
......
...@@ -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 {}
} }
......
...@@ -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 {
......
...@@ -88,9 +88,9 @@ class _CheckBoxListState extends State<WeeklyAudit> { ...@@ -88,9 +88,9 @@ class _CheckBoxListState extends State<WeeklyAudit> {
), ),
), ),
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 20), padding: EdgeInsets.symmetric(horizontal: 10),
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, 20, 4), padding: const EdgeInsets.fromLTRB(4, 2, 10, 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
......
...@@ -5,6 +5,7 @@ import 'package:storemonitor/FirebaseApi.dart'; ...@@ -5,6 +5,7 @@ import 'package:storemonitor/FirebaseApi.dart';
import 'Screens/SplashScreen.dart'; import 'Screens/SplashScreen.dart';
Future<void> main() async { Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
if (Platform.isAndroid) { if (Platform.isAndroid) {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(); await Firebase.initializeApp();
...@@ -12,7 +13,6 @@ Future<void> main() async { ...@@ -12,7 +13,6 @@ Future<void> main() async {
} }
runApp(const MaterialApp( runApp(const MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
home: SplashScreen(), home: SplashScreen(),)
)
); );
} }
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