|
|
|
@ -92,8 +92,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
height: MediaQuery
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.15,
|
|
|
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.44,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
gradient: LinearGradient(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
@ -139,11 +145,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
padding: EdgeInsets.only(right: 9.5),
|
|
|
|
padding: EdgeInsets.only(right: 9.5),
|
|
|
|
child: Image.asset(
|
|
|
|
child: Image.asset(
|
|
|
|
'assets/images/closed_box.png',
|
|
|
|
'assets/images/closed_box.png',
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.09,
|
|
|
|
0.09,
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width *
|
|
|
|
0.20,
|
|
|
|
0.20,
|
|
|
|
@ -166,7 +174,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.44,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
gradient: LinearGradient(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
@ -236,8 +247,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.16,
|
|
|
|
height: MediaQuery
|
|
|
|
width: MediaQuery.of(context).size.width * 0.50,
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.16,
|
|
|
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.50,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
@ -253,9 +270,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Image.asset(
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/qr_code.png',
|
|
|
|
'assets/images/qr_code.png',
|
|
|
|
width:
|
|
|
|
width:
|
|
|
|
MediaQuery.of(context).size.width * 0.25,
|
|
|
|
MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.25,
|
|
|
|
height:
|
|
|
|
height:
|
|
|
|
MediaQuery.of(context).size.height * 0.14,
|
|
|
|
MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.14,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -265,8 +288,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
|
onTap:(){
|
|
|
|
onTap: () {
|
|
|
|
_scanQrAndGetPatient(context,model);
|
|
|
|
_scanQrAndGetPatient(context, model);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'SCAN',
|
|
|
|
'SCAN',
|
|
|
|
@ -349,7 +372,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.2),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.2),
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
child: RoundedContainer(
|
|
|
|
child: RoundedContainer(
|
|
|
|
height: MediaQuery.of(context).size.height * 0.108,
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.108,
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
@ -362,11 +388,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
padding: EdgeInsets.only(left: 22.0),
|
|
|
|
padding: EdgeInsets.only(left: 22.0),
|
|
|
|
child: Image.asset(
|
|
|
|
child: Image.asset(
|
|
|
|
'assets/images/location.png',
|
|
|
|
'assets/images/location.png',
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.height *
|
|
|
|
.height *
|
|
|
|
0.10,
|
|
|
|
0.10,
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width *
|
|
|
|
0.09,
|
|
|
|
0.09,
|
|
|
|
@ -453,7 +481,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_scanQrAndGetPatient(BuildContext context,OrdersViewModel model) async {
|
|
|
|
_scanQrAndGetPatient(BuildContext context, OrdersViewModel model) async {
|
|
|
|
/// When give qr we will change this method to get data
|
|
|
|
/// When give qr we will change this method to get data
|
|
|
|
/// var result = await BarcodeScanner.scan();
|
|
|
|
/// var result = await BarcodeScanner.scan();
|
|
|
|
/// int patientID = get from qr result
|
|
|
|
/// int patientID = get from qr result
|
|
|
|
@ -464,10 +492,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
await model.insertOrder();
|
|
|
|
await model.insertOrder();
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
Utils.showErrorToast(model.error);
|
|
|
|
Utils.showErrorToast(model.error);
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
AppToast.showSuccessToast(message: "Order Added");
|
|
|
|
AppToast.showSuccessToast(message: "Order Added");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|