Merge branch 'design_changes' into 'development'

delivery info design update

See merge request Cloud_Solution/driver-app!101
merge-requests/102/head
Elham 5 years ago
commit bdcec73c58

File diff suppressed because one or more lines are too long

@ -55,7 +55,7 @@ class Utils {
List<String> formattedNamesList = []; List<String> formattedNamesList = [];
names.forEach((name) { names.forEach((name) {
name = name.toLowerCase(); name = name.toLowerCase();
name = name[0].toUpperCase() + name.substring(1); name = name != "" ? name[0].toUpperCase() + name.substring(1) : "";
formattedNamesList.add(name); formattedNamesList.add(name);
}); });

@ -2,6 +2,7 @@ import 'package:driverapp/config/size_config.dart';
import 'package:driverapp/uitl/utils.dart'; import 'package:driverapp/uitl/utils.dart';
import 'package:driverapp/widgets/delivery/distance_in_kilometers.dart'; import 'package:driverapp/widgets/delivery/distance_in_kilometers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../uitl/date_uitl.dart'; import '../../uitl/date_uitl.dart';
import '../../uitl/translations_delegate_base.dart'; import '../../uitl/translations_delegate_base.dart';
@ -36,145 +37,147 @@ class CustomerBriefCard extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Center( return Center(
child: Container( child: Padding(
width: MediaQuery.of(context).orientation == Orientation.landscape padding: EdgeInsets.only(bottom: 0.0),
? SizeConfig.widthMultiplier * 125.0
: SizeConfig.widthMultiplier * 90.0,
height: 290,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30),
topRight: Radius.circular(30),
bottomRight: Radius.circular(30),
bottomLeft: Radius.circular(30)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3),
),
],
),
child: Container( child: Container(
padding: EdgeInsets.only(left: 30, top: 20, right: 30), width: MediaQuery.of(context).orientation == Orientation.landscape
child: Column( ? SizeConfig.widthMultiplier * 125.0
crossAxisAlignment: CrossAxisAlignment.start, : SizeConfig.widthMultiplier * 90.0,
children: <Widget>[ height: 290,
Row( decoration: BoxDecoration(
children: <Widget>[ color: Colors.white,
Expanded( borderRadius: BorderRadius.only(
flex: 3, topLeft: Radius.circular(30),
child: Text( topRight: Radius.circular(30),
'ID: ${itemId}', bottomRight: Radius.circular(30),
style: TextStyle( bottomLeft: Radius.circular(30)),
color: Color(0xff636363), boxShadow: [
fontWeight: FontWeight.w500, BoxShadow(
fontSize: 17.5), color: Colors.grey.withOpacity(0.3),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3),
),
],
),
child: Container(
padding: EdgeInsets.only(left: 30, top: 20, right: 30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 3,
child: Text(
'ID: ${itemId}',
style: TextStyle(
color: Color(0xff636363),
fontWeight: FontWeight.w500,
fontSize: 17.5),
),
), ),
), Expanded(
Expanded( child: Padding(
child: Padding( padding: EdgeInsets.all(8.0),
padding: EdgeInsets.all(8.0), child: DistanceInKilometers(
child: DistanceInKilometers( distanceInKilometers: 0.0,
distanceInKilometers: 0.0, ),
), ),
), ),
],
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.02,
),
Text(
Utils.formatStringToPascalCase(
'${customerFirstName} ${customerLastName}'),
style: TextStyle(
color: Color(0xff343333),
fontWeight: FontWeight.bold,
fontSize: 20.0,
), ),
],
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.02,
),
Text(
Utils.formatStringToPascalCase(
'${customerFirstName} ${customerLastName}'),
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
color: Color(0xff343333),
fontFamily: 'Metropolis',
), ),
), SizedBox(
SizedBox( height: MediaQuery.of(context).size.width * 0.019,
height: MediaQuery.of(context).size.width * 0.019, ),
), Text(
Text( mobileNo,
mobileNo, style: TextStyle(
style: TextStyle( color: Color(0xff14A0A9), fontWeight: FontWeight.w400),
color: Color(0xff14A0A9), fontWeight: FontWeight.w400), ),
), SizedBox(
SizedBox( height: MediaQuery.of(context).size.width * 0.005,
height: MediaQuery.of(context).size.width * 0.005, ),
),
// Text( // Text(
// 'Olaya street, behind KFC resturant, next to kingdom towers 2nd floor ofice 277', // 'Olaya street, behind KFC resturant, next to kingdom towers 2nd floor ofice 277',
// style: TextStyle( // style: TextStyle(
// color: Color(0xFF464748), fontWeight: FontWeight.w600), // color: Color(0xFF464748), fontWeight: FontWeight.w600),
// ), // ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsetsDirectional.only(start: 1.0, end: 1.0), margin: EdgeInsetsDirectional.only(start: 1.0, end: 1.0),
height: 1.0, height: 1.0,
color: Colors.grey, color: Colors.grey,
),
), ),
), ),
), SizedBox(
SizedBox( height: 20,
height: 20, ),
), Column(
Column( children: <Widget>[
children: <Widget>[ Row(
Row( children: <Widget>[
children: <Widget>[ Expanded(
Expanded( flex: 2,
flex: 2, child: Text(
child: Text( TranslationBase.of(context).payment,
TranslationBase.of(context).payment, textAlign: TextAlign.start,
textAlign: TextAlign.start, ),
),
),
SizedBox(
width: 170,
),
Expanded(
child: Text(
totalPayment.toString(),
textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w400),
), ),
), SizedBox(
], width: 170,
),
SizedBox(
height: MediaQuery.of(context).size.width * 0.03,
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).delivryTime,
textAlign: TextAlign.start,
), ),
), Expanded(
Expanded( child: Text(
child: Text( totalPayment.toString(),
'${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}',
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w400)), style: TextStyle(fontWeight: FontWeight.w400),
), ),
], ),
) ],
], ),
), SizedBox(
], height: MediaQuery.of(context).size.width * 0.03,
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).delivryTime,
textAlign: TextAlign.start,
),
),
Expanded(
child: Text(
'${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}',
textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w400)),
),
],
)
],
),
],
),
), ),
), ),
), ),

Loading…
Cancel
Save