design updates

merge_design_canges_into_dev^2
hussam al-habibeh 5 years ago
parent 7178f693e7
commit a077e77f71

@ -283,7 +283,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
),
Text(
'1',
'3',
style: TextStyle(
color: Colors.white,
fontSize:

File diff suppressed because one or more lines are too long

@ -2,6 +2,7 @@ import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/widgets/data_display/circle-container.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';
@ -29,115 +30,128 @@ 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: CircleContainer(
child: Text(
model.deliverdOrders[index]
.distanceInKilometers
.toString() +
'\nK.m\naway',
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal,
Padding(
padding: EdgeInsets.all(8.0),
child: CircleContainer(
child: Text(
model.deliverdOrders[index]
.distanceInKilometers
.toString() +
'\nK.m\naway',
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xff42B6AD),
fontWeight: FontWeight.w800,
fontStyle: FontStyle.normal,
),
),
),
),
),
],
],
),
),
),
// onTap: () {
// Navigator.push(
// context,
@ -145,9 +159,10 @@ class _DeliverdOrdersPageState extends State<DeliverdOrdersPage> {
// builder: (context) =>
// InformationPage(model.orders[index])));
// },
),
);
},
),
);
},
),
),
),
],

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

@ -16,7 +16,6 @@ class AppScaffold extends StatelessWidget {
final Color titleColor;
final Color arrowColor;
final Color appBarColor;
final BoxDecoration boxDecoration;
AppScaffold({
@required this.body,
@ -28,7 +27,6 @@ class AppScaffold extends StatelessWidget {
this.titleColor,
this.arrowColor,
this.appBarColor,
this.boxDecoration,
});
@override

Loading…
Cancel
Save