mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 02:38:56 +03:30
beta commit
This commit is contained in:
@@ -0,0 +1,292 @@
|
||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../config/routes.dart';
|
||||
import '../../providers/connectivity.dart';
|
||||
import '../../providers/test_results.dart';
|
||||
import '../../widgets/Global/internet_error.dart';
|
||||
import '../../widgets/TestResultScreens/Add/selector_box.dart';
|
||||
|
||||
class TestResultAddScreen extends StatefulWidget {
|
||||
// static const route = '/TestResultAddScreen';
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _TestResultAddScreenState();
|
||||
}
|
||||
}
|
||||
|
||||
class _TestResultAddScreenState extends State<TestResultAddScreen> {
|
||||
TextEditingController testTypeCTRL = new TextEditingController();
|
||||
final List<String> testTypeVals = [];
|
||||
|
||||
TextEditingController testCodeCTRL = new TextEditingController();
|
||||
bool isInit = true;
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
if (isInit) {
|
||||
var testResultProviderObject =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
testResultProviderObject.getFilterItems().then((result) {
|
||||
for (var testType in result[1].keys) {
|
||||
testTypeVals.add(testType);
|
||||
}
|
||||
testTypeCTRL.text = testTypeVals[0];
|
||||
setState(() {
|
||||
isInit = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _media = MediaQuery.of(context);
|
||||
// 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;
|
||||
},
|
||||
child: SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
size: 35,
|
||||
),
|
||||
// padding: EdgeInsets.all(0),
|
||||
onPressed: () => Navigator.of(context)
|
||||
.popAndPushNamed(Routes.testResultScreen),
|
||||
),
|
||||
),
|
||||
body: Consumer<ConnectivityProvider>(
|
||||
builder: (ct, connection, _) {
|
||||
return connection.conStatus != 'offline'
|
||||
? isInit
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
: ListView(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 20, vertical: 20),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
top: 10,
|
||||
),
|
||||
child: Text(
|
||||
'Add a Test Result',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
letterSpacing: 3,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 5, bottom: 30),
|
||||
padding: EdgeInsets.all(10),
|
||||
height: 200,
|
||||
decoration: BoxDecoration(border: Border.all()),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'PLease Scan The Test Barcode',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
fontWeight: FontWeight.w100,
|
||||
letterSpacing: 3,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
scan().then(
|
||||
(String result) {
|
||||
if (result == 'cancel') {
|
||||
print('cancel');
|
||||
} else if (result == 'error') {
|
||||
print('error');
|
||||
} else if (result == 'access') {
|
||||
print('access');
|
||||
} else {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
Routes.formTestResultScreen,
|
||||
arguments: result,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 70 * _deviceBlockSize,
|
||||
child: TestResultAddSelectorBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
dataCTRL: testTypeCTRL,
|
||||
dataVals: testTypeVals,
|
||||
label: 'Choose a Test Type',
|
||||
),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'OR',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 7 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 8 * _deviceBlockSize,
|
||||
),
|
||||
Container(
|
||||
width: 50 * _deviceBlockSize,
|
||||
child: TextFormField(
|
||||
onChanged: (val) {
|
||||
if (val != '') {
|
||||
setState(() {
|
||||
testTypeCTRL.text = '';
|
||||
});
|
||||
} else {
|
||||
setState(() {
|
||||
testTypeCTRL.text =
|
||||
testTypeVals[0];
|
||||
});
|
||||
}
|
||||
},
|
||||
controller: testCodeCTRL,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
icon: Icon(
|
||||
FontAwesomeIcons
|
||||
.sortNumericDown,
|
||||
),
|
||||
labelText: 'Enter a Test Code',
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
contentPadding: EdgeInsets.only(
|
||||
bottom: 5,
|
||||
top: 5,
|
||||
),
|
||||
),
|
||||
keyboardType:
|
||||
TextInputType.visiblePassword,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 40.0,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 5 * _deviceBlockSize,
|
||||
vertical: 10,
|
||||
),
|
||||
width: 50 * _deviceBlockSize,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black,
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: TextButton(
|
||||
child: Text(
|
||||
'Select',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
if (testCodeCTRL.text != '') {
|
||||
Provider.of<TestResultsProvider>(
|
||||
context,
|
||||
listen: false,
|
||||
).testCode = testCodeCTRL.text;
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
Routes.formTestResultScreen,
|
||||
arguments: testCodeCTRL.text,
|
||||
);
|
||||
} else if (testTypeCTRL.text !=
|
||||
'') {
|
||||
Provider.of<TestResultsProvider>(
|
||||
context,
|
||||
listen: false,
|
||||
).testType = testTypeCTRL.text;
|
||||
Navigator.pushReplacementNamed(
|
||||
context,
|
||||
Routes.formTestResultScreen,
|
||||
arguments: testTypeCTRL.text,
|
||||
);
|
||||
}
|
||||
// print(testCode);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
width: 5 * _deviceBlockSize,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
: ConnectionErrorBox();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<String> scan() async {
|
||||
try {
|
||||
var barcode = await BarcodeScanner.scan();
|
||||
if (barcode.type.name == 'Cancelled') {
|
||||
return 'cancel';
|
||||
} else if (barcode.type.name == 'Failed') {
|
||||
return 'error';
|
||||
}
|
||||
return barcode.rawContent;
|
||||
} on PlatformException catch (_) {
|
||||
return 'access';
|
||||
} catch (_) {
|
||||
return 'error';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import '../../providers/connectivity.dart';
|
||||
import '../../providers/test_results.dart';
|
||||
import '../../widgets/Global/internet_error.dart';
|
||||
import '../../widgets/TestResultScreens/Details/datas_box.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class TestDetailsScreen extends StatefulWidget {
|
||||
// static const route = '/TestDetailsScreen';
|
||||
final String? testResultId;
|
||||
|
||||
TestDetailsScreen({this.testResultId});
|
||||
|
||||
@override
|
||||
_TestDetailsScreenState createState() => _TestDetailsScreenState();
|
||||
}
|
||||
|
||||
class _TestDetailsScreenState extends State<TestDetailsScreen> {
|
||||
bool isInit = true;
|
||||
Map<String, Object>? datas;
|
||||
@override
|
||||
void didChangeDependencies() async {
|
||||
if (isInit) {
|
||||
var _id = ModalRoute.of(context)!.settings.arguments;
|
||||
await Provider.of<TestResultsProvider>(context, listen: false)
|
||||
.showTestResult(_id.toString())
|
||||
.then((result) {
|
||||
setState(() {
|
||||
datas = result.cast<String, Object>();
|
||||
isInit = false;
|
||||
});
|
||||
});
|
||||
// print(datas);
|
||||
}
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _media = MediaQuery.of(context);
|
||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||
final double _devicewidth = _media.size.width;
|
||||
final double _deviceBlockSize = _devicewidth / 100;
|
||||
// print(datas);
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: Consumer<ConnectivityProvider>(
|
||||
builder: (ct, connection, _) {
|
||||
return connection.conStatus != 'offline'
|
||||
? isInit
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
: DatasBox(
|
||||
datas: datas!,
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
)
|
||||
: ConnectionErrorBox();
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,431 @@
|
||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../config/routes.dart';
|
||||
import '../../models/test_result_models.dart';
|
||||
import '../../providers/connectivity.dart';
|
||||
import '../../providers/test_results.dart';
|
||||
import '../../widgets/Global/internet_error.dart';
|
||||
import '../../widgets/TestResultScreens/Filter/date_picker.dart';
|
||||
import '../../widgets/TestResultScreens/Filter/selector_box.dart';
|
||||
|
||||
class TestFilterScreen extends StatefulWidget {
|
||||
// static const route = '/TestFilterScreen';
|
||||
|
||||
@override
|
||||
_TestFilterScreenState createState() => _TestFilterScreenState();
|
||||
}
|
||||
|
||||
class _TestFilterScreenState extends State<TestFilterScreen> {
|
||||
TextEditingController idCTRL = new TextEditingController();
|
||||
TextEditingController labelIdCTRL = new TextEditingController();
|
||||
TextEditingController testTypeCTRL = new TextEditingController();
|
||||
TextEditingController hospitalCTRL = new TextEditingController();
|
||||
TextEditingController fDateCTRL = new TextEditingController();
|
||||
TextEditingController uDateCTRL = new TextEditingController();
|
||||
|
||||
TextEditingController usernameCTRL = new TextEditingController();
|
||||
// TextEditingController dateFrom = new TextEditingController();
|
||||
// TextEditingController dateUntil = new TextEditingController();
|
||||
DateTime? dateTimeFrom;
|
||||
DateTime? dateTimeUntil;
|
||||
|
||||
final List<String> labelIDVals = [
|
||||
'',
|
||||
'Washer ID',
|
||||
'Autoclave ID',
|
||||
'Sterilizer ID',
|
||||
'Seal Machine ID',
|
||||
'Patiant ID',
|
||||
'Set/Pack ID',
|
||||
'Medical Device ID',
|
||||
'OR ID',
|
||||
'Insrtument ID',
|
||||
'Basket ID',
|
||||
'Implant ID',
|
||||
// 'None',
|
||||
];
|
||||
// String curLabelIDVal;
|
||||
|
||||
final List<String> testTypeVals = [];
|
||||
Map<String, String>? testTypes;
|
||||
|
||||
final List<String> hospitalVals = [];
|
||||
Map<String, String> hospitals = {};
|
||||
// String curhospitalVal;
|
||||
|
||||
bool isInit = true;
|
||||
// final List<String> labelIDVals = ['Washer ID'];
|
||||
// String curLabelIDVal;
|
||||
|
||||
// final List<String> labelIDVals = ['Washer ID'];
|
||||
// String curLabelIDVal;
|
||||
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// }
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
if (isInit) {
|
||||
// fDateCTRL.text = DateFormat('y-M-d').format(DateTime.now());
|
||||
// uDateCTRL.text = DateFormat('y-M-d').format(DateTime.now());
|
||||
fDateCTRL.text = '';
|
||||
uDateCTRL.text = '';
|
||||
var testResultProviderObject =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
TestResultFilterObject filters = testResultProviderObject.filters;
|
||||
idCTRL.text = filters.id;
|
||||
usernameCTRL.text = filters.userName;
|
||||
labelIdCTRL.text =
|
||||
filters.labelID == '' ? labelIDVals[0] : filters.labelID;
|
||||
idCTRL.text = filters.id;
|
||||
usernameCTRL.text = filters.userName;
|
||||
testResultProviderObject.getFilterItems().then((result) {
|
||||
hospitals = result[0];
|
||||
testTypes = result[1];
|
||||
hospitalVals.add('');
|
||||
for (var hospital in result[0].keys) {
|
||||
hospitalVals.add(hospital);
|
||||
}
|
||||
testTypeVals.add('');
|
||||
for (var testType in result[1].keys) {
|
||||
testTypeVals.add(testType);
|
||||
}
|
||||
var testTypeKey = testTypes!.keys.firstWhere(
|
||||
(k) => testTypes![k] == filters.testType,
|
||||
orElse: () => ''); // recent testtype name
|
||||
var hospitalKey = hospitals.keys.firstWhere(
|
||||
(k) => hospitals[k] == filters.hospital,
|
||||
orElse: () => ''); // recent testtype name
|
||||
testTypeCTRL.text =
|
||||
filters.testType == '' ? testTypeVals[0] : testTypeKey;
|
||||
hospitalCTRL.text =
|
||||
filters.hospital == '' ? hospitalVals[0] : hospitalKey;
|
||||
// print(result[0]);
|
||||
// print(result[1]);
|
||||
setState(() {
|
||||
isInit = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _media = MediaQuery.of(context);
|
||||
// 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;
|
||||
},
|
||||
child: SafeArea(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).popAndPushNamed(
|
||||
Routes.testResultScreen,
|
||||
),
|
||||
),
|
||||
),
|
||||
body: Consumer<ConnectivityProvider>(
|
||||
builder: (ct, connection, _) {
|
||||
return connection.conStatus != 'offline'
|
||||
? isInit
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.all(20),
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'Filter Test Results',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Flexible(
|
||||
flex: 8,
|
||||
child: TextFormField(
|
||||
controller: idCTRL,
|
||||
decoration: InputDecoration(
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.sortNumericDown,
|
||||
size: 6 * _deviceBlockSize,
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.w100,
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
labelText: 'ID',
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical: 2, horizontal: 3),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
keyboardType: TextInputType.text,
|
||||
textInputAction: TextInputAction.next,
|
||||
// onFieldSubmitted: (_) {
|
||||
// FocusScope.of(context)
|
||||
// .requestFocus(_cycleNumberFocusNode);
|
||||
// },
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
scan().then(
|
||||
(String result) {
|
||||
if (result == 'cancel') {
|
||||
print('cancel');
|
||||
} else if (result == 'error') {
|
||||
print('error');
|
||||
} else if (result == 'access') {
|
||||
print('access');
|
||||
} else {
|
||||
print(result);
|
||||
idCTRL.text = result;
|
||||
// Navigator.of(context).pushNamed(
|
||||
// CycleDetailScreen.route,
|
||||
// arguments: result,
|
||||
// );
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.qr_code_scanner,
|
||||
size: 5 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
TestResultFilterSelectorBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
dataCTRL: labelIdCTRL,
|
||||
dataVals: labelIDVals,
|
||||
label: 'Label ID',
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
|
||||
TextFormField(
|
||||
controller: usernameCTRL,
|
||||
decoration: InputDecoration(
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.sortNumericDown,
|
||||
size: 6 * _deviceBlockSize,
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.w100,
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
labelText: 'Username',
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical: 2, horizontal: 3),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
textInputAction: TextInputAction.next,
|
||||
// onFieldSubmitted: (_) {
|
||||
// FocusScope.of(context)
|
||||
// .requestFocus(_cycleNumberFocusNode);
|
||||
// },
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
TestResultFilterSelectorBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
dataCTRL: testTypeCTRL,
|
||||
dataVals: testTypeVals,
|
||||
label: 'Test Type',
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
TestResultFilterSelectorBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
dataCTRL: hospitalCTRL,
|
||||
dataVals: hospitalVals,
|
||||
label: 'Hospital',
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
|
||||
TestResultFilterDatePicker(
|
||||
dateCTRL: fDateCTRL,
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Date From',
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
TestResultFilterDatePicker(
|
||||
dateCTRL: uDateCTRL,
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Date Until',
|
||||
),
|
||||
SizedBox(
|
||||
height: 70,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Provider.of<TestResultsProvider>(context,
|
||||
listen: false)
|
||||
.setFilters(
|
||||
idCTRL.text,
|
||||
labelIdCTRL.text != ''
|
||||
? labelIdCTRL.text
|
||||
: '',
|
||||
usernameCTRL.text,
|
||||
testTypeCTRL.text != ''
|
||||
? testTypes![testTypeCTRL.text]
|
||||
: '',
|
||||
hospitalCTRL.text != ''
|
||||
? hospitals[hospitalCTRL.text]
|
||||
: '',
|
||||
fDateCTRL.text,
|
||||
uDateCTRL.text,
|
||||
);
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
content: Text('Filters changed.'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(ctx).pop();
|
||||
// Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('Ok'),
|
||||
)
|
||||
],
|
||||
),
|
||||
).then(
|
||||
(_) =>
|
||||
Navigator.of(context).popAndPushNamed(
|
||||
Routes.testResultScreen,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 5 * _deviceBlockSize,
|
||||
vertical: 10,
|
||||
),
|
||||
// margin:
|
||||
// EdgeInsets.symmetric(horizontal: 35, vertical: 15),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Colors.black, Colors.black87],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'Filter',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 70,
|
||||
),
|
||||
// DropDownBox(values: ['Washer ID']),
|
||||
],
|
||||
),
|
||||
)
|
||||
: ConnectionErrorBox();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> scan() async {
|
||||
try {
|
||||
var barcode = await BarcodeScanner.scan();
|
||||
if (barcode.type.name == 'Cancelled') {
|
||||
return 'cancel';
|
||||
} else if (barcode.type.name == 'Failed') {
|
||||
return 'error';
|
||||
}
|
||||
try {
|
||||
var id = barcode.rawContent.contains('www.cssd-doc.com')
|
||||
? barcode.rawContent.split('/')[5]
|
||||
: barcode.rawContent;
|
||||
|
||||
return id;
|
||||
} catch (_) {
|
||||
return 'null';
|
||||
}
|
||||
} on PlatformException catch (_) {
|
||||
return 'access';
|
||||
} catch (_) {
|
||||
return 'error';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:random_string/random_string.dart';
|
||||
|
||||
import '../../config/routes.dart';
|
||||
import '../../providers/input.dart';
|
||||
import '../../providers/test_results.dart';
|
||||
import '../../widgets/TestResultScreens/Add/form_creator.dart';
|
||||
|
||||
class FormPage extends StatefulWidget {
|
||||
final String? name;
|
||||
final String? uniqueCode;
|
||||
final String? testResultId;
|
||||
final String? testTypeId;
|
||||
|
||||
FormPage({this.name, this.uniqueCode, this.testResultId, this.testTypeId});
|
||||
|
||||
@override
|
||||
_FormPageState createState() => _FormPageState();
|
||||
}
|
||||
|
||||
class _FormPageState extends State<FormPage> {
|
||||
bool _isInit = true;
|
||||
bool _isLoading = false;
|
||||
bool isAdding = false;
|
||||
final _form = GlobalKey<FormState>();
|
||||
Map<String, dynamic> values = {};
|
||||
List<Map<String, dynamic>> formInputs = [];
|
||||
|
||||
void _saveForm() {
|
||||
final batchId = randomString(10);
|
||||
formatData(formInputs);
|
||||
var prvObject = Provider.of<TestResultsProvider>(context, listen: false);
|
||||
if (this.widget.testResultId != null && this.widget.testResultId != '') {
|
||||
values['_method'] = 'put';
|
||||
TestResultsProvider.updateTestResult(this.widget.testResultId!, values)
|
||||
.then((_) {
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
} else {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
prvObject.createTestResult(values, batchId).then((result) {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
if (result == 'done') {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
content: Text('Test added.'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(ctx).pop();
|
||||
},
|
||||
child: Text('Ok'),
|
||||
)
|
||||
],
|
||||
),
|
||||
).then((value) =>
|
||||
Navigator.of(context).popAndPushNamed(Routes.testResultScreen));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
if (_isInit) {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
String testTypeName = Provider.of<TestResultsProvider>(context).testType;
|
||||
String testCode = Provider.of<TestResultsProvider>(context).testCode;
|
||||
Provider.of<Inputs>(context, listen: false)
|
||||
.getInputs(
|
||||
testResultId: '',
|
||||
name: testTypeName,
|
||||
uniqueCode: testCode,
|
||||
testTypeId: '',
|
||||
)
|
||||
.then((_) {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
_isInit = false;
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
Navigator.pushReplacementNamed(
|
||||
context,
|
||||
Routes.testResultAddScreen,
|
||||
);
|
||||
return true;
|
||||
},
|
||||
child: SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('Add Test Result'),
|
||||
backgroundColor: Colors.black,
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.save),
|
||||
onPressed: () {
|
||||
_saveForm();
|
||||
},
|
||||
)
|
||||
],
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).popAndPushNamed(Routes.testResultScreen);
|
||||
},
|
||||
),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
_isLoading
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
: Form(
|
||||
key: _form,
|
||||
child: Consumer<Inputs>(
|
||||
builder: (context, inputs, _) {
|
||||
formInputs = inputs.inputItems;
|
||||
print(formInputs);
|
||||
return formInputs.length != 0
|
||||
? FormCreator(
|
||||
form: formInputs,
|
||||
onChanged: (value) {
|
||||
formInputs = value;
|
||||
},
|
||||
)
|
||||
: Center(
|
||||
child: Text('Something went wrong!!!'),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
// https://www.cssd-doc.com/api/GetInfo
|
||||
// InkWell(
|
||||
// onTap: () {
|
||||
// _saveForm();
|
||||
// },
|
||||
// child: Container(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 60, vertical: 15),
|
||||
// margin: EdgeInsets.symmetric(vertical: 20, horizontal: 50),
|
||||
// decoration: BoxDecoration(
|
||||
// gradient: LinearGradient(colors: [Colors.blue, Colors.green]),
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
// ),
|
||||
// child: Text(
|
||||
// 'Save',
|
||||
// style: TextStyle(color: Colors.white, fontSize: 17),
|
||||
// textAlign: TextAlign.center,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void formatData(inputs) {
|
||||
for (var input in inputs) {
|
||||
if (input['type'] != 'Form') {
|
||||
if (input['key'] == 'result') {
|
||||
values[input["key"]] = input["value"] ? "Accept" : "Reject";
|
||||
// print('${input["key"]} : ${input["value"] ? "Accept" : "Reject"}');
|
||||
} else if (input['key'] == 'date') {
|
||||
var date = input["value"];
|
||||
|
||||
values[input["key"]] = "${date.year}-${date.month}-${date.day}";
|
||||
} else {
|
||||
values[input["key"]] = input["value"];
|
||||
// print('${input["key"]} : ${input["value"]}');
|
||||
}
|
||||
}
|
||||
if (input['children'] != null && input['children'].isNotEmpty) {
|
||||
formatData(input['children']);
|
||||
}
|
||||
}
|
||||
// print(values);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,449 @@
|
||||
// import 'package:cssd/providers/test_result.dart';
|
||||
import 'package:cssd/config/colors.dart';
|
||||
import 'package:cssd/providers/auth.dart';
|
||||
import 'package:cssd/providers/test_results.dart';
|
||||
import 'package:cssd/widgets/Global/internet_error.dart';
|
||||
import 'package:cssd/widgets/TestResultScreens/Main/filter_chip_box.dart';
|
||||
import 'package:cssd/widgets/TestResultScreens/Main/floating_button.dart';
|
||||
import 'package:cssd/widgets/TestResultScreens/Main/search_box.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../config/routes.dart';
|
||||
import '../../models/test_result_models.dart';
|
||||
import '../../providers/connectivity.dart';
|
||||
|
||||
class TestResultScreen extends StatefulWidget {
|
||||
// static const route = '/TestResultScreen';
|
||||
final bool? isAdmin;
|
||||
|
||||
TestResultScreen({this.isAdmin});
|
||||
|
||||
@override
|
||||
_TestResultScreenState createState() => _TestResultScreenState();
|
||||
}
|
||||
|
||||
class _TestResultScreenState extends State<TestResultScreen> {
|
||||
TextEditingController searchCTRL = new TextEditingController();
|
||||
ScrollController? sc;
|
||||
|
||||
bool _isInit = true;
|
||||
// List<TestResult> _data = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
sc = new ScrollController();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
if (_isInit) {
|
||||
var testResults =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
// testResults.resetFilters();
|
||||
testResults.setLoading();
|
||||
testResults.resetPageNumber();
|
||||
testResults.getTestResults().then((_) {
|
||||
testResults.resetLoading();
|
||||
sc!.addListener(() {
|
||||
if (sc!.position.pixels == sc!.position.maxScrollExtent &&
|
||||
searchCTRL.text == '') {
|
||||
var labelProviderObject =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
labelProviderObject.getTestResults();
|
||||
}
|
||||
});
|
||||
|
||||
// setState(() {
|
||||
// _isLoading = false;
|
||||
// });
|
||||
});
|
||||
_isInit = false;
|
||||
}
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _media = MediaQuery.of(context);
|
||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||
final double _devicewidth = _media.size.width;
|
||||
final double _deviceBlockSize = _devicewidth / 100;
|
||||
return SafeArea(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
child: Scaffold(
|
||||
floatingActionButton:
|
||||
TestResultFloatingButton(deviceBlockSize: _deviceBlockSize),
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: Consumer<ConnectivityProvider>(
|
||||
builder: (ct, connection, _) {
|
||||
return connection.conStatus != 'offline'
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 20, left: 20, right: 20, bottom: 60),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
// padding: EdgeInsets.only(top: 20, bottom: 40),
|
||||
child: Text(
|
||||
'My Test Results',
|
||||
// textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 6 * _deviceBlockSize,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.of(context)
|
||||
.popAndPushNamed(Routes.testFilterScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(7),
|
||||
child: Icon(
|
||||
FontAwesomeIcons.filter,
|
||||
size: 7 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Consumer<TestResultsProvider>(
|
||||
builder: (context, testResult, _) {
|
||||
return Container(
|
||||
height: 50,
|
||||
child: ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
children: <Widget>[
|
||||
testResult.filters.id != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'ID',
|
||||
id: '',
|
||||
labelID: testResult.filters.labelID,
|
||||
testType:
|
||||
testResult.filters.testType,
|
||||
hospital:
|
||||
testResult.filters.hospital,
|
||||
username:
|
||||
testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.labelID != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Label ID',
|
||||
id: testResult.filters.id,
|
||||
labelID: '',
|
||||
testType:
|
||||
testResult.filters.testType,
|
||||
hospital:
|
||||
testResult.filters.hospital,
|
||||
username:
|
||||
testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.testType != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Test Type',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType: '',
|
||||
hospital:
|
||||
testResult.filters.hospital,
|
||||
username:
|
||||
testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.hospital != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Hospital',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType:
|
||||
testResult.filters.testType,
|
||||
hospital: '',
|
||||
username:
|
||||
testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.userName != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Username',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType:
|
||||
testResult.filters.testType,
|
||||
hospital:
|
||||
testResult.filters.hospital,
|
||||
username: '',
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.fDate != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'From Date',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType:
|
||||
testResult.filters.testType,
|
||||
hospital:
|
||||
testResult.filters.hospital,
|
||||
username:
|
||||
testResult.filters.userName,
|
||||
fDate: '',
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.uDate != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Until Date',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType:
|
||||
testResult.filters.testType,
|
||||
hospital:
|
||||
testResult.filters.hospital,
|
||||
username:
|
||||
testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: '',
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
TestResultSearchBox(
|
||||
searchCTRL: searchCTRL,
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Consumer<TestResultsProvider>(
|
||||
builder: (context, testResults, _) {
|
||||
return testResults.isloading
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
controller: sc,
|
||||
itemBuilder: (context, index) =>
|
||||
TestItemBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
item: testResults.items![index],
|
||||
),
|
||||
itemCount: testResults.items?.length,
|
||||
shrinkWrap: true,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: ConnectionErrorBox();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class TestItemBox extends StatelessWidget {
|
||||
final TestResultObject? item;
|
||||
const TestItemBox({
|
||||
Key? key,
|
||||
required double deviceBlockSize,
|
||||
required this.item,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
super(key: key);
|
||||
|
||||
final double _deviceBlockSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// print(item.result);
|
||||
final userData = Provider.of<Auth>(context, listen: false).user;
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pushNamed(
|
||||
Routes.testDetailsScreen,
|
||||
arguments: item!.id,
|
||||
),
|
||||
child: Card(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 57 * _deviceBlockSize,
|
||||
child: Text(
|
||||
item!.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
// style: TextStyle(fontSize: 20),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 57 * _deviceBlockSize,
|
||||
child: Text(
|
||||
item!.hospital,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
item!.result == 'Accepted'
|
||||
? Text(
|
||||
'Accepted',
|
||||
style: TextStyle(
|
||||
color: kLightBlue,
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'Rejected',
|
||||
style: TextStyle(
|
||||
color: kPink,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Text(item!.date),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
userData['roles']?.contains('User') ?? false
|
||||
? Container()
|
||||
: InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text('Delete'),
|
||||
content: Text(
|
||||
'Are you sure you want delete this Test?'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: Text('Yes'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
Provider.of<TestResultsProvider>(
|
||||
context,
|
||||
listen: false)
|
||||
.removeTestResult(item!.id);
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: Text('No'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
size: 5 * _deviceBlockSize,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 7.5,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(
|
||||
Routes.testDetailsScreen,
|
||||
arguments: item!.id,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(7),
|
||||
width: 9 * _deviceBlockSize,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black,
|
||||
),
|
||||
child: Icon(
|
||||
FontAwesomeIcons.fileAlt,
|
||||
size: 5 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
import 'package:cssd/utils/scan.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../providers/connectivity.dart';
|
||||
import '../../widgets/Global/internet_error.dart';
|
||||
|
||||
class TestScanScreen extends StatefulWidget {
|
||||
// static const route = '/TestScanScreen';
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _TestScanScreenState();
|
||||
}
|
||||
}
|
||||
|
||||
class _TestScanScreenState extends State<TestScanScreen> {
|
||||
String testCode = "";
|
||||
TextEditingController idCTRL = new TextEditingController();
|
||||
final _form = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _media = MediaQuery.of(context);
|
||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||
final double _devicewidth = _media.size.width;
|
||||
final double _deviceBlockSize = _devicewidth / 100;
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: Consumer<ConnectivityProvider>(
|
||||
builder: (ct, connection, _) {
|
||||
return connection.conStatus != 'offline'
|
||||
? ListView(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 30),
|
||||
child: Text(
|
||||
'Looking for a Test Result?',
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 5.5 * _deviceBlockSize,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: 3,
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 10),
|
||||
height: 200,
|
||||
decoration: BoxDecoration(border: Border.all()),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Please Scan The Test Result Barcode',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
fontWeight: FontWeight.w100,
|
||||
letterSpacing: 3,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
scan().then(
|
||||
(String result) {
|
||||
if (result == 'cancel') {
|
||||
print('cancel');
|
||||
} else if (result == 'error') {
|
||||
print('error');
|
||||
} else if (result == 'access') {
|
||||
print('access');
|
||||
} else {
|
||||
launch(
|
||||
'https://cssd-doc.com/Show/TestResult/$result',
|
||||
);
|
||||
// Navigator.of(context).pushNamed(
|
||||
// Routes.cycleDetailScreen,
|
||||
// arguments: result,
|
||||
// );
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
Form(
|
||||
key: _form,
|
||||
child: TextFormField(
|
||||
validator: (val) {
|
||||
if (val!.isEmpty) {
|
||||
return 'Id required!!';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
controller: idCTRL,
|
||||
decoration: InputDecoration(
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.sortNumericDown,
|
||||
size: 6 * _deviceBlockSize,
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.w100,
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
isDense: true,
|
||||
labelText: 'Or enter a Test Result ID',
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical: 2,
|
||||
horizontal: 3,
|
||||
),
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
// borderRadius: BorderRadius.only(Radius.circular(4)),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 70,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (!_form.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
launch(
|
||||
'https://cssd-doc.com/Show/TestResult/${idCTRL.text}',
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 5 * _deviceBlockSize,
|
||||
vertical: 10,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [Colors.black, Colors.black87],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
'Search',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: ConnectionErrorBox();
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,466 @@
|
||||
import 'package:cssd/config/colors.dart';
|
||||
import 'package:cssd/widgets/TestResultScreens/Main/filter_chip_box.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../config/routes.dart';
|
||||
import '../../models/test_result_models.dart';
|
||||
import '../../providers/auth.dart';
|
||||
import '../../providers/test_results.dart';
|
||||
import '../../widgets/TestResultScreens/Main/search_box.dart';
|
||||
|
||||
class TestVerifyScreen extends StatefulWidget {
|
||||
// static const route = '/TestVerifyScreen';
|
||||
// final bool isAdmin;
|
||||
|
||||
// TestVerifyScreen({this.isAdmin});
|
||||
|
||||
@override
|
||||
_TestVerifyScreenState createState() => _TestVerifyScreenState();
|
||||
}
|
||||
|
||||
class _TestVerifyScreenState extends State<TestVerifyScreen> {
|
||||
TextEditingController searchCTRL = new TextEditingController();
|
||||
ScrollController? sc;
|
||||
|
||||
bool _isInit = true;
|
||||
// List<TestResult> _data = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
sc = new ScrollController();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
if (_isInit) {
|
||||
// setState(() {
|
||||
// _isLoading = true;
|
||||
// });
|
||||
var testResults =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
testResults.setLoading();
|
||||
testResults.resetFilters();
|
||||
testResults.resetPageNumber();
|
||||
testResults.getTestResults().then((_) {
|
||||
testResults.resetLoading();
|
||||
sc!.addListener(() {
|
||||
if (sc!.position.pixels == sc!.position.maxScrollExtent &&
|
||||
searchCTRL.text == '') {
|
||||
var labelProviderObject =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
labelProviderObject.getTestResults();
|
||||
}
|
||||
});
|
||||
|
||||
// setState(() {
|
||||
// _isLoading = false;
|
||||
// });
|
||||
});
|
||||
_isInit = false;
|
||||
}
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final userData = Provider.of<Auth>(context, listen: false).user;
|
||||
|
||||
final _media = MediaQuery.of(context);
|
||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||
final double _devicewidth = _media.size.width;
|
||||
final double _deviceBlockSize = _devicewidth / 100;
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 60),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
// padding: EdgeInsets.only(top: 20, bottom: 40),
|
||||
child: Text(
|
||||
'Tests To Verify',
|
||||
// textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 6 * _deviceBlockSize,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Consumer<TestResultsProvider>(
|
||||
builder: (context, testResult, _) {
|
||||
return Container(
|
||||
height: 50,
|
||||
child: ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
children: <Widget>[
|
||||
testResult.filters.id != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'ID',
|
||||
id: '',
|
||||
labelID: testResult.filters.labelID,
|
||||
testType: testResult.filters.testType,
|
||||
hospital: testResult.filters.hospital,
|
||||
username: testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.labelID != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Label ID',
|
||||
id: testResult.filters.id,
|
||||
labelID: '',
|
||||
testType: testResult.filters.testType,
|
||||
hospital: testResult.filters.hospital,
|
||||
username: testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.testType != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Test Type',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType: '',
|
||||
hospital: testResult.filters.hospital,
|
||||
username: testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.hospital != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Hospital',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType: testResult.filters.testType,
|
||||
hospital: '',
|
||||
username: testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.userName != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Username',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType: testResult.filters.testType,
|
||||
hospital: testResult.filters.hospital,
|
||||
username: '',
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.fDate != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'From Date',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType: testResult.filters.testType,
|
||||
hospital: testResult.filters.hospital,
|
||||
username: testResult.filters.userName,
|
||||
fDate: '',
|
||||
uDate: testResult.filters.uDate,
|
||||
)
|
||||
: Container(),
|
||||
testResult.filters.uDate != ''
|
||||
? TestResultChip(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
label: 'Until Date',
|
||||
id: testResult.filters.id,
|
||||
labelID: testResult.filters.labelID,
|
||||
testType: testResult.filters.testType,
|
||||
hospital: testResult.filters.hospital,
|
||||
username: testResult.filters.userName,
|
||||
fDate: testResult.filters.fDate,
|
||||
uDate: '',
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
TestResultSearchBox(
|
||||
searchCTRL: searchCTRL,
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Consumer<TestResultsProvider>(
|
||||
builder: (context, testResults, _) {
|
||||
return testResults.isloading
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
controller: sc,
|
||||
itemBuilder: (context, index) =>
|
||||
(testResults.items![index].verified == 'None' &&
|
||||
userData['roles']
|
||||
.contains('Supervisor')) ||
|
||||
userData['roles'].contains('Admin')
|
||||
? TestItemBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
item: testResults.items![index],
|
||||
id: testResults.items![index].id,
|
||||
userData: userData,
|
||||
)
|
||||
: Container(),
|
||||
itemCount: testResults.items?.length,
|
||||
shrinkWrap: true,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class TestItemBox extends StatelessWidget {
|
||||
final TestResultObject item;
|
||||
const TestItemBox({
|
||||
Key? key,
|
||||
required String id,
|
||||
required double deviceBlockSize,
|
||||
required this.item,
|
||||
required this.userData,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
// _id = id,
|
||||
super(key: key);
|
||||
final Map<String, dynamic> userData;
|
||||
final double _deviceBlockSize;
|
||||
// final String _id;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pushNamed(
|
||||
Routes.testDetailsScreen,
|
||||
arguments: item.id,
|
||||
),
|
||||
child: Card(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 57 * _deviceBlockSize,
|
||||
child: Text(
|
||||
item.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
// style: TextStyle(fontSize: 20),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 57 * _deviceBlockSize,
|
||||
child: Text(
|
||||
item.hospital,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
item.verified == 'None'
|
||||
? Text(
|
||||
'Awaiting Verification',
|
||||
style: TextStyle(color: Colors.orange),
|
||||
)
|
||||
: item.verified == 'Verified'
|
||||
? Text(
|
||||
'Verified',
|
||||
style: TextStyle(
|
||||
color: kBlue,
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'Rejected',
|
||||
style: TextStyle(
|
||||
color: kPink,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Text(item.date),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text('Verify'),
|
||||
content: Text(
|
||||
'Are you sure for verify this test?'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Provider.of<TestResultsProvider>(
|
||||
context,
|
||||
listen: false)
|
||||
.changeVerification(
|
||||
item.id, 'Verified')
|
||||
.then((result) {
|
||||
if (result) {
|
||||
print('true');
|
||||
}
|
||||
Navigator.of(ctx).pop();
|
||||
Navigator.of(context).popAndPushNamed(
|
||||
Routes.testVerifyScreen);
|
||||
});
|
||||
},
|
||||
child: Text('Yes'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(ctx).pop();
|
||||
},
|
||||
child: Text('No'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(7),
|
||||
width: 10 * _deviceBlockSize,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: kBlue,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.check,
|
||||
size: 6 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 3,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text('Reject'),
|
||||
content: Text(
|
||||
'Are you sure for reject this test?'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await Provider.of<TestResultsProvider>(
|
||||
context,
|
||||
listen: false)
|
||||
.changeVerification(
|
||||
item.id, 'NotVerified')
|
||||
.then((result) {
|
||||
if (result) {
|
||||
print('true');
|
||||
}
|
||||
Navigator.of(ctx).pop();
|
||||
Navigator.of(context).popAndPushNamed(
|
||||
Routes.testVerifyScreen);
|
||||
});
|
||||
},
|
||||
child: Text('Yes'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(ctx).pop();
|
||||
},
|
||||
child: Text('No'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(7),
|
||||
width: 10 * _deviceBlockSize,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: kPink,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
size: 6 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
width: _deviceBlockSize,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user