Merge branch 'master' of gitlab.com:Cloud_Solution/driver-app into setting_branch
commit
7f8b4e9d22
File diff suppressed because one or more lines are too long
@ -0,0 +1,44 @@
|
|||||||
|
import 'package:driverapp/widgets/data_display/circle-container.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DistanceInKilometers extends StatelessWidget {
|
||||||
|
const DistanceInKilometers({
|
||||||
|
@required this.distanceInKilometers,
|
||||||
|
Key key,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final dynamic distanceInKilometers;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CircleContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
distanceInKilometers.toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff42B6AD),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontStyle: FontStyle.normal),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'K.m',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff42B6AD),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontStyle: FontStyle.normal),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'away',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff42B6AD),
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontStyle: FontStyle.normal),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
import 'package:driverapp/uitl/utils.dart';
|
||||||
|
import 'package:driverapp/widgets/delivery/distance_in_kilometers.dart';
|
||||||
|
import 'package:driverapp/widgets/others/rounded_container.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class OrderInfoCard extends StatelessWidget {
|
||||||
|
const OrderInfoCard({Key key, this.order, this.onTap}) : super(key: key);
|
||||||
|
|
||||||
|
final dynamic order;
|
||||||
|
final Function onTap;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return InkWell(
|
||||||
|
child: Container(
|
||||||
|
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,
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 5,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 20.0),
|
||||||
|
child: Text(
|
||||||
|
Utils.formatName(
|
||||||
|
order.firstName + ' ' + order.lastName),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.0,
|
||||||
|
color: Hexcolor("#343333"),
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
order.mobileNumber,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff30B7B9),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontSize: 15.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
order.orderID.toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
letterSpacing: 8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: DistanceInKilometers(
|
||||||
|
distanceInKilometers: order.distanceInKilometers,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
onTap();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue