mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 13:38:55 +03:30
Back button of other pages navigate to home
This commit is contained in:
@@ -75,14 +75,17 @@ class _CycleAddScreenState extends State<CycleAddScreen> {
|
|||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return Consumer<CyclesProvider>(builder: (context, cyclesProvider, _) {
|
return Consumer<CyclesProvider>(builder: (context, cyclesProvider, _) {
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
cyclesProvider.resetLoadingButton();
|
onPopInvoked: (didPop) {
|
||||||
Navigator.pushReplacementNamed(
|
if (didPop) return;
|
||||||
context,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
Routes.cycleResultScreen,
|
// cyclesProvider.resetLoadingButton();
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.cycleResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -362,8 +365,7 @@ class _CycleAddScreenState extends State<CycleAddScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),);
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,12 +29,15 @@ class _CycleFilterScreenState extends State<CycleFilterScreen> {
|
|||||||
|
|
||||||
TextEditingController dateCTRL = new TextEditingController();
|
TextEditingController dateCTRL = new TextEditingController();
|
||||||
DateTime? dateTimeFrom;
|
DateTime? dateTimeFrom;
|
||||||
|
|
||||||
// String dateValue;
|
// String dateValue;
|
||||||
|
|
||||||
List<Map<String, String>> hospitalVals = [];
|
List<Map<String, String>> hospitalVals = [];
|
||||||
|
|
||||||
// String curhospitalVal;
|
// String curhospitalVal;
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
CycleFilterObject? filters;
|
CycleFilterObject? filters;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
filters = Provider.of<CyclesProvider>(context, listen: false).filters;
|
filters = Provider.of<CyclesProvider>(context, listen: false).filters;
|
||||||
@@ -88,13 +91,16 @@ class _CycleFilterScreenState extends State<CycleFilterScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.cycleResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.cycleResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -104,7 +110,12 @@ class _CycleFilterScreenState extends State<CycleFilterScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Cycles',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
|
|
||||||
@@ -27,7 +28,13 @@ class _CycleScanScreenState extends State<CycleScanScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -35,7 +42,12 @@ class _CycleScanScreenState extends State<CycleScanScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Cycles',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -193,6 +205,7 @@ class _CycleScanScreenState extends State<CycleScanScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,13 +115,16 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
|||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
final itemProviderObject = Provider.of<ItemProvider>(context);
|
final itemProviderObject = Provider.of<ItemProvider>(context);
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.itemResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.itemResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class _ItemFilterScreenState extends State<ItemFilterScreen> {
|
|||||||
List<Map<String, String>> hospitalVals = [];
|
List<Map<String, String>> hospitalVals = [];
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
ItemFilterObject? filters;
|
ItemFilterObject? filters;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
filters = Provider.of<ItemProvider>(context, listen: false).filters;
|
filters = Provider.of<ItemProvider>(context, listen: false).filters;
|
||||||
@@ -83,13 +84,16 @@ class _ItemFilterScreenState extends State<ItemFilterScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.itemResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.itemResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -99,7 +103,12 @@ class _ItemFilterScreenState extends State<ItemFilterScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Items',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
|
|
||||||
@@ -25,7 +26,13 @@ class _ItemScanScreenState extends State<ItemScanScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -33,7 +40,12 @@ class _ItemScanScreenState extends State<ItemScanScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Items',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -191,6 +203,7 @@ class _ItemScanScreenState extends State<ItemScanScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,14 +77,17 @@ class _LabelAddScreenState extends State<LabelAddScreen> {
|
|||||||
// String initialLabelValue;
|
// String initialLabelValue;
|
||||||
return Consumer<LabelsProvider>(
|
return Consumer<LabelsProvider>(
|
||||||
builder: (context, labelsProvider, _) {
|
builder: (context, labelsProvider, _) {
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
labelsProvider.resetLoadingButton();
|
onPopInvoked: (didPop) {
|
||||||
Navigator.pushReplacementNamed(
|
if (didPop) return;
|
||||||
context,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
Routes.labelResultScreen,
|
// labelsProvider.resetLoadingButton();
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.labelResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class _LabelFilterScreenState extends State<LabelFilterScreen> {
|
|||||||
List<Map<String, String>> hospitalVals = [];
|
List<Map<String, String>> hospitalVals = [];
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
LabelFilterObject? filters;
|
LabelFilterObject? filters;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
filters = Provider.of<LabelsProvider>(context, listen: false).filters;
|
filters = Provider.of<LabelsProvider>(context, listen: false).filters;
|
||||||
@@ -79,13 +80,16 @@ class _LabelFilterScreenState extends State<LabelFilterScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.labelResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.labelResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -95,7 +99,12 @@ class _LabelFilterScreenState extends State<LabelFilterScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Labels',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
import '../../widgets/LabelScreens/Scan/input_box.dart';
|
import '../../widgets/LabelScreens/Scan/input_box.dart';
|
||||||
import '../../widgets/LabelScreens/Scan/save_button.dart';
|
import '../../widgets/LabelScreens/Scan/save_button.dart';
|
||||||
import '../../widgets/LabelScreens/Scan/scan_box.dart';
|
import '../../widgets/LabelScreens/Scan/scan_box.dart';
|
||||||
|
|
||||||
// import 'package:flutter/services.dart';
|
// import 'package:flutter/services.dart';
|
||||||
// import 'package:barcode_scan2/barcode_scan2.dart';
|
// import 'package:barcode_scan2/barcode_scan2.dart';
|
||||||
|
|
||||||
@@ -28,7 +30,13 @@ class _LabelScanScreenState extends State<LabelScanScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -36,7 +44,12 @@ class _LabelScanScreenState extends State<LabelScanScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Labels',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -92,6 +105,7 @@ class _LabelScanScreenState extends State<LabelScanScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class _MyItemsFilterScreenState extends State<MyItemsFilterScreen> {
|
|||||||
|
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
ItemFilterObject? filters;
|
ItemFilterObject? filters;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
filters = Provider.of<ItemProvider>(context, listen: false).filters;
|
filters = Provider.of<ItemProvider>(context, listen: false).filters;
|
||||||
@@ -52,13 +53,16 @@ class _MyItemsFilterScreenState extends State<MyItemsFilterScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.myItemsResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.myItemsResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -68,7 +72,12 @@ class _MyItemsFilterScreenState extends State<MyItemsFilterScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('My Items', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'My Items',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
|
|
||||||
@@ -25,7 +26,13 @@ class _MyItemsScanScreenState extends State<MyItemsScanScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _deviceWidth = _media.size.width;
|
final double _deviceWidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _deviceWidth / 100;
|
final double _deviceBlockSize = _deviceWidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -33,7 +40,12 @@ class _MyItemsScanScreenState extends State<MyItemsScanScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('My Items', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'My Items',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -191,6 +203,7 @@ class _MyItemsScanScreenState extends State<MyItemsScanScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ class _MyPackageFilterScreenState extends State<MyPackageFilterScreen> {
|
|||||||
TextEditingController idCTRL = new TextEditingController();
|
TextEditingController idCTRL = new TextEditingController();
|
||||||
TextEditingController hospitalCTRL = new TextEditingController();
|
TextEditingController hospitalCTRL = new TextEditingController();
|
||||||
TextEditingController nameCTRL = new TextEditingController();
|
TextEditingController nameCTRL = new TextEditingController();
|
||||||
|
|
||||||
// TextEditingController udiCTRL = new TextEditingController();
|
// TextEditingController udiCTRL = new TextEditingController();
|
||||||
|
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
PackageFilterObject? filters;
|
PackageFilterObject? filters;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
filters = Provider.of<PackageProvider>(context, listen: false).filters;
|
filters = Provider.of<PackageProvider>(context, listen: false).filters;
|
||||||
@@ -49,13 +51,16 @@ class _MyPackageFilterScreenState extends State<MyPackageFilterScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.myPackagesResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.myPackagesResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -65,7 +70,12 @@ class _MyPackageFilterScreenState extends State<MyPackageFilterScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('My Packages', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'My Packages',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
|
|
||||||
@@ -25,7 +26,13 @@ class _MyPackagesScanScreenState extends State<MyPackagesScanScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _deviceWidth = _media.size.width;
|
final double _deviceWidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _deviceWidth / 100;
|
final double _deviceBlockSize = _deviceWidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -33,7 +40,12 @@ class _MyPackagesScanScreenState extends State<MyPackagesScanScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('My Packages', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'My Packages',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -191,6 +203,7 @@ class _MyPackagesScanScreenState extends State<MyPackagesScanScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,14 +66,17 @@ class _PackageAddScreenState extends State<PackageAddScreen> {
|
|||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return Consumer<PackageProvider>(
|
return Consumer<PackageProvider>(
|
||||||
builder: (context, packageProvider, _) {
|
builder: (context, packageProvider, _) {
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
packageProvider.resetLoadingButton();
|
onPopInvoked: (didPop) {
|
||||||
Navigator.pushReplacementNamed(
|
if (didPop) return;
|
||||||
context,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
Routes.packageResultScreen,
|
// packageProvider.resetLoadingButton();
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.packageResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
|||||||
@@ -22,11 +22,13 @@ class _PackageFilterScreenState extends State<PackageFilterScreen> {
|
|||||||
TextEditingController idCTRL = new TextEditingController();
|
TextEditingController idCTRL = new TextEditingController();
|
||||||
TextEditingController hospitalCTRL = new TextEditingController();
|
TextEditingController hospitalCTRL = new TextEditingController();
|
||||||
TextEditingController nameCTRL = new TextEditingController();
|
TextEditingController nameCTRL = new TextEditingController();
|
||||||
|
|
||||||
// TextEditingController udiCTRL = new TextEditingController();
|
// TextEditingController udiCTRL = new TextEditingController();
|
||||||
|
|
||||||
List<Map<String, String>> hospitalVals = [];
|
List<Map<String, String>> hospitalVals = [];
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
PackageFilterObject? filters;
|
PackageFilterObject? filters;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
filters = Provider.of<PackageProvider>(context, listen: false).filters;
|
filters = Provider.of<PackageProvider>(context, listen: false).filters;
|
||||||
@@ -76,13 +78,16 @@ class _PackageFilterScreenState extends State<PackageFilterScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.packageResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.packageResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -92,7 +97,12 @@ class _PackageFilterScreenState extends State<PackageFilterScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Packages', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Packages',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
|
|
||||||
@@ -25,7 +26,13 @@ class _PackageScanScreenState extends State<PackageScanScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -33,7 +40,12 @@ class _PackageScanScreenState extends State<PackageScanScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Packages', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Packages',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -191,6 +203,7 @@ class _PackageScanScreenState extends State<PackageScanScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class _TestResultAddScreenState extends State<TestResultAddScreen> {
|
|||||||
|
|
||||||
TextEditingController testCodeCTRL = new TextEditingController();
|
TextEditingController testCodeCTRL = new TextEditingController();
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
@@ -48,19 +49,27 @@ class _TestResultAddScreenState extends State<TestResultAddScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.testResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.testResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Test Results', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Test Results',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
|||||||
@@ -128,13 +128,16 @@ class _TestFilterScreenState extends State<TestFilterScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.testResultScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.testResultScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
|||||||
@@ -96,13 +96,16 @@ class _FormPageState extends State<FormPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return WillPopScope(
|
return PopScope(
|
||||||
onWillPop: () async {
|
canPop: false,
|
||||||
Navigator.pushReplacementNamed(
|
onPopInvoked: (didPop) {
|
||||||
context,
|
if (didPop) return;
|
||||||
Routes.testResultAddScreen,
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
);
|
// Navigator.pushReplacementNamed(
|
||||||
return true;
|
// context,
|
||||||
|
// Routes.testResultAddScreen,
|
||||||
|
// );
|
||||||
|
// return true;
|
||||||
},
|
},
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
|
|
||||||
@@ -26,11 +27,22 @@ class _TestScanScreenState extends State<TestScanScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Test Results', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Test Results',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -183,6 +195,7 @@ class _TestScanScreenState extends State<TestScanScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user