|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import 'package:barcode_scan/platform_wrapper.dart';
|
|
|
|
|
import 'package:driverapp/config/config.dart';
|
|
|
|
|
import 'package:driverapp/config/size_config.dart';
|
|
|
|
|
import 'package:driverapp/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:driverapp/core/model/scan_qr/scan_qr_request_model.dart';
|
|
|
|
|
@ -93,23 +94,27 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
child:CircleAvatar(
|
|
|
|
|
radius: 25.5,
|
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
radius: 25.5,
|
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
|
maxRadius: 26.0,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/driver.png',
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),),
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
|
maxRadius: 26.0,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/driver.png',
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onTap: (){
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) =>
|
|
|
|
|
SettingPage(driverName:_authenticationViewModel.user.userName, driverID:_authenticationViewModel.user.userID)));
|
|
|
|
|
builder: (context) => SettingPage(
|
|
|
|
|
driverName: _authenticationViewModel
|
|
|
|
|
.user.userName,
|
|
|
|
|
driverID: _authenticationViewModel
|
|
|
|
|
.user.userID)));
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -133,10 +138,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.44,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
Color(0xff17AFB8),
|
|
|
|
|
Color(0xff49C1BC)
|
|
|
|
|
]),
|
|
|
|
|
gradient: LINEAR_GRADIENT,
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
@ -243,10 +245,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.45,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
Color(0xff17AFB8),
|
|
|
|
|
Color(0xff49C1BC)
|
|
|
|
|
]),
|
|
|
|
|
gradient: LINEAR_GRADIENT,
|
|
|
|
|
),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
@ -279,7 +278,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
'5',
|
|
|
|
|
'3',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize:
|
|
|
|
|
@ -288,7 +287,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.undeliveredPackages,
|
|
|
|
|
.deliveredPackages,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: MediaQuery.of(context)
|
|
|
|
|
@ -310,8 +309,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
width: 100,
|
|
|
|
|
height: 100,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white10,
|
|
|
|
|
shape: BoxShape.circle),
|
|
|
|
|
color: Colors.white10,
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
@ -360,30 +360,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
_scanQrAndGetPatient(context, model);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.18
|
|
|
|
|
: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.30,
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width * 0.50,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.18
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.50,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
colors: [
|
|
|
|
|
Hexcolor("#45B7AE"),
|
|
|
|
|
Hexcolor("#119FA9")
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
gradient: LINEAR_GRADIENT,
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
@ -396,32 +380,29 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
width: MediaQuery.of(context).size.width *
|
|
|
|
|
0.26,
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height *
|
|
|
|
|
0.14
|
|
|
|
|
0.14
|
|
|
|
|
: MediaQuery.of(context).size.height *
|
|
|
|
|
0.28,
|
|
|
|
|
0.28,
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 8.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.scan,
|
|
|
|
|
TranslationBase.of(context).scan,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
fontSize: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
? SizeConfig.textMultiplier * 6.0
|
|
|
|
|
: SizeConfig.textMultiplier * 4.0,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
@ -432,14 +413,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 0.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.toAddPackageToQue,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
fontSize: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.landscape
|
|
|
|
|
? SizeConfig.textMultiplier * 3.0
|
|
|
|
|
: SizeConfig.textMultiplier * 2.0,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
@ -465,8 +444,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).nearestDropOffs,
|
|
|
|
|
Text(TranslationBase.of(context).nearestDropOffs,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 18.0,
|
|
|
|
|
color: Hexcolor("#343333"),
|
|
|
|
|
@ -492,12 +470,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
onTap: () =>
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => OrdersListScreen()),
|
|
|
|
|
),
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => OrdersListScreen()),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -521,63 +498,49 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
child: RoundedContainer(
|
|
|
|
|
showShadow: true,
|
|
|
|
|
raduis: 25.0,
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.120
|
|
|
|
|
: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.209,
|
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context).size.height * 0.120
|
|
|
|
|
: MediaQuery.of(context).size.height * 0.209,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 15.0, top: 14.0),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
'assets/images/location.png',
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.06
|
|
|
|
|
: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.11,
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.05
|
|
|
|
|
: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.09,
|
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.06
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height *
|
|
|
|
|
0.11,
|
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
|
.orientation ==
|
|
|
|
|
Orientation.portrait
|
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.05
|
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width *
|
|
|
|
|
0.09,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
@ -588,7 +551,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
flex: 5,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.only(top: 20.0),
|
|
|
|
|
@ -672,4 +635,3 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|