/////////////// senin trip info dialog un içi :
Color startColor = Colors.amber.shade600;
Color endColor = Colors.amber.shade200;
showDialog(
context: context,
builder: (builder) {
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(15),
),
),
contentPadding: EdgeInsets.all(0),
content: Container(
width: width * 0.95,
height: height * 0.625,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(15)),
color: Colors.white,
gradient: LinearGradient(
colors: const [Colors.black87, Colors.amber])),
child: Column(
children: [
Expanded(
flex: 3,
child: Container(
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.only(
topRight: Radius.circular(15),
topLeft: Radius.circular(15)),
),
child: Row(
children: [
Expanded(
flex: 1,
child: SizedBox(),
),
Expanded(
flex: 4,
child: FittedBox(
fit: BoxFit.contain,
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.amber),
borderRadius:
BorderRadius.all(Radius.circular(5))),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Text("İş Detayı",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w600,
color: Colors.amber)),
),
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(3.0),
child: SizedBox(
height: height,
child: FittedBox(
fit: BoxFit.contain,
child: Icon(
Icons.cancel_outlined,
color: Colors.deepOrange,
),
),
),
),
),
),
],
),
),
),
Expanded(
flex: 19,
child: Column(
children: [
Expanded(
flex: 45,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: SizedBox(
height: height * 0.3,
child: Column(
children: [
Expanded(
child: Container(
width: width,
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius: BorderRadius.all(
Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [startColor, endColor],
),
),
child: Column(
children: [
Expanded(
flex: 15,
child: AutoSizeText(
"Müşteri İsmi",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
Expanded(
flex: 25,
child: AutoSizeText(
tripHistoryModelList[index]
.customerName ??
"-",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
),
Expanded(
child: Container(
width: width,
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius: BorderRadius.all(
Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [
startColor,
endColor
] // red to yellow
),
),
child: Column(
children: [
Expanded(
flex: 15,
child: AutoSizeText(
"Mesafe",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
tripHistoryModelList[index]
.tripInfo !=
null
? Expanded(
flex: 25,
child: AutoSizeText(
tripHistoryModelList[
index]
.tripInfo
.rentedTripDistance ==
null ||
(tripHistoryModelList[index]
.tripInfo
.rentedTripDistance !=
null &&
tripHistoryModelList[index]
.tripInfo
.rentedTripDistance ==
-1)
? "-"
: (double.parse(tripHistoryModelList[
index]
.tripInfo
.rentedTripDistance
.toString()) /
1000)
.toString(),
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight:
FontWeight.bold,
),
),
)
: Expanded(
flex: 25,
child: AutoSizeText(
"-",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight:
FontWeight.bold,
),
),
),
],
),
),
),
Expanded(
child: Container(
width: width,
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius: BorderRadius.all(
Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [
startColor,
endColor
] // red to yellow
),
),
child: Column(
children: [
Expanded(
flex: 15,
child: AutoSizeText(
"Ücret",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
tripHistoryModelList[index]
.tripInfo !=
null
? Expanded(
flex: 25,
child: AutoSizeText(
tripHistoryModelList[
index]
.tripInfo
.rentedTripFare ==
null ||
(tripHistoryModelList[index]
.tripInfo
.rentedTripFare !=
null &&
tripHistoryModelList[index]
.tripInfo
.rentedTripFare ==
-1)
? " -"
: (double.parse(tripHistoryModelList[
index]
.tripInfo
.rentedTripFare
.toString()) /
1000)
.toString(),
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight:
FontWeight.bold,
),
),
)
: Expanded(
flex: 25,
child: AutoSizeText(
" -",
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight:
FontWeight.bold,
),
),
),
],
),
),
),
],
),
),
),
Expanded(
child: SizedBox(
height: height * 0.3,
width: width,
child: Column(
children: [
Expanded(
child: Container(
width: width,
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius: BorderRadius.all(
Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [
startColor,
endColor
] // red to yellow
),
),
child: Column(
children: [
Expanded(
flex: 15,
child: AutoSizeText(
"İş Durumu",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
Expanded(
flex: 25,
child: AutoSizeText(
tripHistoryModelList[index]
.lastState ==
2
? "Tamamlandı"
: tripHistoryModelList[
index]
.lastState ==
200
? "İptal Edildi"
: "-",
maxLines: 1,
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
),
Expanded(
child: Container(
width: width,
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius: BorderRadius.all(
Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [
startColor,
endColor
] // red to yellow
),
),
child: Column(
children: [
Expanded(
flex: 15,
child: AutoSizeText(
"İş Tarihi ve Saati",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
Expanded(
flex: 25,
child: AutoSizeText(
DateFormat(
'dd/MM/yyy - kk:mm')
.format(DateTime
.fromMillisecondsSinceEpoch(
tripHistoryModelList[
index]
.saveTime
.toLocal()
.millisecondsSinceEpoch)),
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight: FontWeight.bold,
),
maxLines: 1,
maxFontSize: 25,
),
),
],
),
),
),
Expanded(
child: Container(
width: width,
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius: BorderRadius.all(
Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [
startColor,
endColor
] // red to yellow
),
),
child: Column(
children: [
Expanded(
flex: 15,
child: AutoSizeText(
"Ödeme Yöntemi",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
Expanded(
flex: 25,
child: AutoSizeText(
tripHistoryModelList[
index] !=
null &&
tripHistoryModelList[
index]
.customerRequest !=
null &&
tripHistoryModelList[
index]
.customerRequest
.payMethods !=
null
? tripHistoryModelList[
index]
.customerRequest
.payMethods ==
0
? "Nakit"
: "Online Ödeme"
: "-",
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight: FontWeight.bold,
),
maxLines: 1,
maxFontSize: 25,
),
),
],
),
),
),
],
),
),
),
],
),
),
Expanded(
flex: 20,
child: Container(
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius:
BorderRadius.all(Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [startColor, endColor]),
),
child: Column(
children: [
Expanded(
flex: 1,
child: AutoSizeText(
"Başlangıç Adresi",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
Expanded(
flex: 2,
child: AutoSizeText(
startAdressTripHistory == ""
? "-"
: startAdressTripHistory,
maxLines: 2,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
),
Expanded(
flex: 20,
child: Container(
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2.0,
spreadRadius: 0.0,
offset: Offset(2.0,
2.0), // shadow direction: bottom right
)
],
borderRadius:
BorderRadius.all(Radius.circular(15)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment(0.8,
0.0), // 10% of the width, so there are ten blinds.
colors: [
startColor,
endColor
] // red to yellow
),
),
child: Column(
children: [
Expanded(
flex: 1,
child: AutoSizeText(
"Varış Adresi",
maxLines: 1,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
),
Expanded(
flex: 2,
child: AutoSizeText(
destinationAdressTripHistory == ""
? "-"
: "" + destinationAdressTripHistory,
maxLines: 2,
maxFontSize: 50,
style: TextStyle(
color: Colors.black,
fontSize: 25,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
),
],
),
),
],
),
),
);
});