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