Merge branch 'merge_design_canges_into_dev' into 'development'

Merge design canges into dev

See merge request Cloud_Solution/driver-app!89
merge-requests/90/head
Elham 5 years ago
commit 51a1e311f1

@ -93,23 +93,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)));
},
),
],
@ -279,7 +283,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
),
Text(
'5',
'3',
style: TextStyle(
color: Colors.white,
fontSize:
@ -288,7 +292,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
Text(
TranslationBase.of(context)
.undeliveredPackages,
.deliveredPackages,
style: TextStyle(
color: Colors.white,
fontSize: MediaQuery.of(context)
@ -360,22 +364,11 @@ 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(
@ -396,32 +389,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 +422,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 +453,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 +479,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
],
),
onTap: () =>
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => OrdersListScreen()),
),
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => OrdersListScreen()),
),
),
],
),
@ -521,63 +507,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 +560,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 +644,3 @@ class _DashboardScreenState extends State<DashboardScreen> {
}
}
}

@ -88,10 +88,10 @@ class DeliveryConfirmedPage extends StatelessWidget {
),
],
),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
),
// Container(
// width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.width,
// ),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width * 1.0,
@ -105,12 +105,15 @@ class DeliveryConfirmedPage extends StatelessWidget {
topRight: Radius.circular(80)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
mainAxisAlignment: MediaQuery.of(context).orientation ==
Orientation.landscape
? MainAxisAlignment.center
: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(
bottom: MediaQuery.of(context).size.width * 0.09,
bottom: MediaQuery.of(context).size.width * 0.00,
),
child: Column(
children: <Widget>[

File diff suppressed because one or more lines are too long

@ -1,6 +1,7 @@
import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/widgets/delivery/distance_in_kilometers.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:driverapp/widgets/others/network_base_view.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -28,109 +29,129 @@ class _DeliverdOrdersPageState extends State<DeliverdOrdersPage> {
SizedBox(
height: 20,
),
Expanded(
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: model.deliverdOrders == null
? 0
: model.deliverdOrders.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
raduis: 25.0,
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,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: 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,
),
)
],
),
),
if (model.orders.length != 0)
NetworkBaseView(
baseViewModel: model,
child: Expanded(
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: model.deliverdOrders == null
? 0
: model.deliverdOrders.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
raduis: 25.0,
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,
children: <Widget>[
Expanded(
flex: 5,
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Text(
model.deliverdOrders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(
fontSize: 18.0,
color: Hexcolor("#343333"),
fontWeight: FontWeight.bold),
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,
),
),
Text(
model.deliverdOrders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0,
)
],
),
),
if (model.orders.length != 0)
Expanded(
flex: 5,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Text(
model.deliverdOrders[index]
.firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(
fontSize: 18.0,
color: Hexcolor("#343333"),
fontWeight: FontWeight.bold),
),
),
),
Expanded(
child: Text(
model.deliverdOrders[index].orderID
.toString(),
Text(
model
.deliverdOrders[index].mobileNumber,
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0,
),
),
),
],
Expanded(
child: Text(
model.deliverdOrders[index].orderID
.toString(),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
),
),
],
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: DistanceInKilometers(
distanceInKilometers: model
.deliverdOrders[index].distanceInKilometers,
),
),
Padding(
padding: EdgeInsets.all(8.0),
child: DistanceInKilometers(
distanceInKilometers: model
.deliverdOrders[index].distanceInKilometers,
),
//
),
],
],
),
),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// InformationPage(model.orders[index])));
// },
),
),
);
},
);
},
),
),
),
],

@ -27,4 +27,4 @@ class packageContent extends StatelessWidget {
],
);
}
}
}

@ -17,17 +17,17 @@ class AppScaffold extends StatelessWidget {
final Color arrowColor;
final Color appBarColor;
AppScaffold(
{@required this.body,
this.appBarTitle = '',
this.isLoading = false,
this.isShowAppBar = false,
this.baseViewModel,
this.bottomSheet,
this.titleColor,
this.arrowColor,
this.appBarColor,
});
AppScaffold({
@required this.body,
this.appBarTitle = '',
this.isLoading = false,
this.isShowAppBar = false,
this.baseViewModel,
this.bottomSheet,
this.titleColor,
this.arrowColor,
this.appBarColor,
});
@override
Widget build(BuildContext context) {
@ -46,14 +46,16 @@ class AppScaffold extends StatelessWidget {
headline6: TextStyle(
color: titleColor ?? Colors.white,
fontWeight: FontWeight.bold),
),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack(arrowColor: arrowColor,);
},
),
centerTitle: true,
),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack(
arrowColor: arrowColor,
);
},
),
centerTitle: true,
// actions: <Widget>[
// IconButton(
// icon: Icon(FontAwesomeIcons.home),
@ -63,14 +65,15 @@ class AppScaffold extends StatelessWidget {
// },
// ),
// ],
)
)
: null,
body: baseViewModel != null
? NetworkBaseView(
child: buildBodyWidget(),
baseViewModel: baseViewModel,
)
: buildBodyWidget(), bottomSheet: bottomSheet,
child: buildBodyWidget(),
baseViewModel: baseViewModel,
)
: buildBodyWidget(),
bottomSheet: bottomSheet,
),
);
}

Loading…
Cancel
Save