|
|
|
@ -93,23 +93,27 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
|
child:CircleAvatar(
|
|
|
|
|
|
|
|
radius: 25.5,
|
|
|
|
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
|
|
|
|
child: CircleAvatar(
|
|
|
|
child: CircleAvatar(
|
|
|
|
|
|
|
|
radius: 25.5,
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
maxRadius: 26.0,
|
|
|
|
child: CircleAvatar(
|
|
|
|
child: Image.asset(
|
|
|
|
backgroundColor: Color(0xff30B7B9),
|
|
|
|
'assets/images/driver.png',
|
|
|
|
maxRadius: 26.0,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
child: Image.asset(
|
|
|
|
),),
|
|
|
|
'assets/images/driver.png',
|
|
|
|
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: (){
|
|
|
|
onTap: () {
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (context) =>
|
|
|
|
builder: (context) => SettingPage(
|
|
|
|
SettingPage(driverName:_authenticationViewModel.user.userName, driverID:_authenticationViewModel.user.userID)));
|
|
|
|
driverName: _authenticationViewModel
|
|
|
|
|
|
|
|
.user.userName,
|
|
|
|
|
|
|
|
driverID: _authenticationViewModel
|
|
|
|
|
|
|
|
.user.userID)));
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -279,7 +283,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
'5',
|
|
|
|
'3',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize:
|
|
|
|
fontSize:
|
|
|
|
@ -288,7 +292,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context)
|
|
|
|
.undeliveredPackages,
|
|
|
|
.deliveredPackages,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: MediaQuery.of(context)
|
|
|
|
fontSize: MediaQuery.of(context)
|
|
|
|
@ -360,22 +364,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
_scanQrAndGetPatient(context, model);
|
|
|
|
_scanQrAndGetPatient(context, model);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: MediaQuery
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
.of(context)
|
|
|
|
Orientation.portrait
|
|
|
|
.orientation ==
|
|
|
|
? MediaQuery.of(context).size.height * 0.18
|
|
|
|
Orientation.portrait
|
|
|
|
: MediaQuery.of(context).size.height * 0.30,
|
|
|
|
? MediaQuery
|
|
|
|
width: MediaQuery.of(context).size.width * 0.50,
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.18
|
|
|
|
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.30,
|
|
|
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.50,
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
borderRadius: BorderRadius.circular(15.0),
|
|
|
|
gradient: LinearGradient(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
@ -396,32 +389,29 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
width: MediaQuery.of(context).size.width *
|
|
|
|
width: MediaQuery.of(context).size.width *
|
|
|
|
0.26,
|
|
|
|
0.26,
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context).size.height *
|
|
|
|
? MediaQuery.of(context).size.height *
|
|
|
|
0.14
|
|
|
|
0.14
|
|
|
|
: MediaQuery.of(context).size.height *
|
|
|
|
: MediaQuery.of(context).size.height *
|
|
|
|
0.28,
|
|
|
|
0.28,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
MainAxisAlignment.spaceEvenly,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 8.0),
|
|
|
|
padding: EdgeInsets.only(top: 8.0),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase
|
|
|
|
TranslationBase.of(context).scan,
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.scan,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: MediaQuery
|
|
|
|
fontSize: MediaQuery.of(context)
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.landscape
|
|
|
|
Orientation.landscape
|
|
|
|
|
|
|
|
? SizeConfig.textMultiplier * 6.0
|
|
|
|
? SizeConfig.textMultiplier * 6.0
|
|
|
|
: SizeConfig.textMultiplier * 4.0,
|
|
|
|
: SizeConfig.textMultiplier * 4.0,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
@ -432,14 +422,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 0.0),
|
|
|
|
padding: EdgeInsets.only(top: 0.0),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase
|
|
|
|
TranslationBase.of(context)
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.toAddPackageToQue,
|
|
|
|
.toAddPackageToQue,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: MediaQuery
|
|
|
|
fontSize: MediaQuery.of(context)
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.landscape
|
|
|
|
Orientation.landscape
|
|
|
|
|
|
|
|
? SizeConfig.textMultiplier * 3.0
|
|
|
|
? SizeConfig.textMultiplier * 3.0
|
|
|
|
: SizeConfig.textMultiplier * 2.0,
|
|
|
|
: SizeConfig.textMultiplier * 2.0,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
@ -465,8 +453,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
Text(TranslationBase.of(context).nearestDropOffs,
|
|
|
|
TranslationBase.of(context).nearestDropOffs,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 18.0,
|
|
|
|
fontSize: 18.0,
|
|
|
|
color: Hexcolor("#343333"),
|
|
|
|
color: Hexcolor("#343333"),
|
|
|
|
@ -492,12 +479,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () =>
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (context) => OrdersListScreen()),
|
|
|
|
builder: (context) => OrdersListScreen()),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -521,63 +507,49 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
child: RoundedContainer(
|
|
|
|
child: RoundedContainer(
|
|
|
|
showShadow: true,
|
|
|
|
showShadow: true,
|
|
|
|
raduis: 25.0,
|
|
|
|
raduis: 25.0,
|
|
|
|
height: MediaQuery
|
|
|
|
height: MediaQuery.of(context).orientation ==
|
|
|
|
.of(context)
|
|
|
|
Orientation.portrait
|
|
|
|
.orientation ==
|
|
|
|
? MediaQuery.of(context).size.height * 0.120
|
|
|
|
Orientation.portrait
|
|
|
|
: MediaQuery.of(context).size.height * 0.209,
|
|
|
|
? MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.120
|
|
|
|
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.height * 0.209,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: 15.0, top: 14.0),
|
|
|
|
left: 15.0, top: 14.0),
|
|
|
|
child: Image.asset(
|
|
|
|
child: Image.asset(
|
|
|
|
'assets/images/location.png',
|
|
|
|
'assets/images/location.png',
|
|
|
|
height: MediaQuery
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
.of(context)
|
|
|
|
.orientation ==
|
|
|
|
.orientation ==
|
|
|
|
Orientation.portrait
|
|
|
|
Orientation.portrait
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
? MediaQuery
|
|
|
|
.size
|
|
|
|
.of(context)
|
|
|
|
.height *
|
|
|
|
.size
|
|
|
|
0.06
|
|
|
|
.height *
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
0.06
|
|
|
|
.size
|
|
|
|
: MediaQuery
|
|
|
|
.height *
|
|
|
|
.of(context)
|
|
|
|
0.11,
|
|
|
|
.size
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
.height *
|
|
|
|
.orientation ==
|
|
|
|
0.11,
|
|
|
|
Orientation.portrait
|
|
|
|
width: MediaQuery
|
|
|
|
? MediaQuery.of(context)
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.orientation ==
|
|
|
|
.width *
|
|
|
|
Orientation.portrait
|
|
|
|
0.05
|
|
|
|
? MediaQuery
|
|
|
|
: MediaQuery.of(context)
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width *
|
|
|
|
0.09,
|
|
|
|
0.05
|
|
|
|
|
|
|
|
: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width *
|
|
|
|
|
|
|
|
0.09,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -588,7 +560,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
flex: 5,
|
|
|
|
flex: 5,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 20.0),
|
|
|
|
padding: EdgeInsets.only(top: 20.0),
|
|
|
|
@ -672,4 +644,3 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|