design updates

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

@ -283,7 +283,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
), ),
Text( Text(
'1', '3',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 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/pages/delivery/information_page.dart';
import 'package:driverapp/widgets/data_display/circle-container.dart'; import 'package:driverapp/widgets/data_display/circle-container.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.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:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -29,115 +30,128 @@ class _DeliverdOrdersPageState extends State<DeliverdOrdersPage> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Expanded( NetworkBaseView(
child: ListView.builder( baseViewModel: model,
shrinkWrap: true, child: Expanded(
scrollDirection: Axis.vertical, child: ListView.builder(
itemCount: model.deliverdOrders == null shrinkWrap: true,
? 0 scrollDirection: Axis.vertical,
: model.deliverdOrders.length, itemCount: model.deliverdOrders == null
itemBuilder: (BuildContext context, int index) { ? 0
return Padding( : model.deliverdOrders.length,
padding: EdgeInsets.symmetric(horizontal: 12.2), itemBuilder: (BuildContext context, int index) {
child: InkWell( return Padding(
child: RoundedContainer( padding: EdgeInsets.symmetric(horizontal: 12.2),
raduis: 25.0, child: InkWell(
height: MediaQuery.of(context).orientation == child: RoundedContainer(
Orientation.portrait raduis: 25.0,
? MediaQuery.of(context).size.height * 0.120 height: MediaQuery.of(context).orientation ==
: MediaQuery.of(context).size.height * 0.209, Orientation.portrait
child: Row( ? MediaQuery.of(context).size.height * 0.120
mainAxisAlignment: MainAxisAlignment.spaceBetween, : MediaQuery.of(context).size.height * 0.209,
children: <Widget>[ child: Row(
Expanded( mainAxisAlignment: MainAxisAlignment.spaceBetween,
flex: 1, children: <Widget>[
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)
Expanded( Expanded(
flex: 5, flex: 1,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: EdgeInsets.only(top: 20.0), padding: EdgeInsets.only(
child: Text( left: 15.0, top: 14.0),
model.deliverdOrders[index].firstName + child: Image.asset(
' ' + 'assets/images/location.png',
model.orders[index].lastName, height: MediaQuery.of(context)
style: TextStyle( .orientation ==
fontSize: 18.0, Orientation.portrait
color: Hexcolor("#343333"), ? MediaQuery.of(context)
fontWeight: FontWeight.bold), .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), if (model.orders.length != 0)
fontWeight: FontWeight.w600, Expanded(
fontSize: 15.0, 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),
),
), ),
), Text(
Expanded( model
child: Text( .deliverdOrders[index].mobileNumber,
model.deliverdOrders[index].orderID
.toString(),
style: TextStyle( style: TextStyle(
fontSize: 18.0, color: Color(0xff30B7B9),
fontWeight: FontWeight.w400, fontWeight: FontWeight.w600,
letterSpacing: 8.0), fontSize: 15.0,
),
), ),
), Expanded(
], child: Text(
model.deliverdOrders[index].orderID
.toString(),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w400,
letterSpacing: 8.0),
),
),
],
),
), ),
), Padding(
Padding( padding: EdgeInsets.all(8.0),
padding: EdgeInsets.all(8.0), child: CircleContainer(
child: CircleContainer( child: Text(
child: Text( model.deliverdOrders[index]
model.deliverdOrders[index] .distanceInKilometers
.distanceInKilometers .toString() +
.toString() + '\nK.m\naway',
'\nK.m\naway', textAlign: TextAlign.center,
textAlign: TextAlign.center, style: TextStyle(
style: TextStyle( color: Color(0xff42B6AD),
color: Color(0xff42B6AD), fontWeight: FontWeight.w800,
fontWeight: FontWeight.w800, fontStyle: FontStyle.normal,
fontStyle: FontStyle.normal, ),
), ),
), ),
), ),
), ],
], ),
), ),
),
// onTap: () { // onTap: () {
// Navigator.push( // Navigator.push(
// context, // context,
@ -145,9 +159,10 @@ class _DeliverdOrdersPageState extends State<DeliverdOrdersPage> {
// builder: (context) => // builder: (context) =>
// InformationPage(model.orders[index]))); // InformationPage(model.orders[index])));
// }, // },
), ),
); );
}, },
),
), ),
), ),
], ],

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

Loading…
Cancel
Save