12/22/1
This commit is contained in:
@@ -107,114 +107,210 @@ class HomeCaptain extends StatelessWidget {
|
||||
left: Get.width * .1,
|
||||
child: const ConnectWidget()),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: Get.width * .05,
|
||||
left: Get.width * .05,
|
||||
child: GetBuilder<HomeCaptainController>(
|
||||
builder: (homeCaptainController) {
|
||||
top: 5,
|
||||
right: Get.width * .05,
|
||||
left: Get.width * .05,
|
||||
child: GetBuilder<HomeCaptainController>(
|
||||
builder: (homeCaptainController) {
|
||||
return Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
width: Get.width * .8,
|
||||
height: 104,
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Entypo.wallet,
|
||||
color: AppColor.greenColor,
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [Colors.white, Colors.white70],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
width: Get.width * .8,
|
||||
height: 120,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.greenColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
Text(
|
||||
' You Earn today is '.tr +
|
||||
homeCaptainController.totalMoneyToday,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Entypo.wallet,
|
||||
color: AppColor.yellowColor,
|
||||
),
|
||||
Text(
|
||||
'${' You Have in'.tr} ${AppInformation.appName} ${homeCaptainController.totalMoneyInSEFER} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'Total Budget is '.tr +
|
||||
homeCaptainController.totalPoints,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
color: int.parse(
|
||||
Get.find<HomeCaptainController>()
|
||||
.countRideToday) <
|
||||
5
|
||||
? AppColor.accentColor
|
||||
: int.parse(Get.find<
|
||||
HomeCaptainController>()
|
||||
.countRideToday) >
|
||||
5 &&
|
||||
int.parse(Get.find<
|
||||
HomeCaptainController>()
|
||||
.countRideToday) <
|
||||
10
|
||||
? AppColor.yellowColor
|
||||
: AppColor.greenColor,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8, vertical: 2),
|
||||
child: Text(
|
||||
'Ride Today : '.tr +
|
||||
Get.find<HomeCaptainController>()
|
||||
.countRideToday,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.secondaryColor),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Entypo.wallet,
|
||||
color: AppColor.greenColor,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'${"Today".tr}: ${homeCaptainController.totalMoneyToday}',
|
||||
style: AppStyle.title.copyWith(
|
||||
color: AppColor.greenColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)));
|
||||
})),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.yellowColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Entypo.wallet,
|
||||
color: AppColor.yellowColor,
|
||||
size: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'${AppInformation.appName}: ${homeCaptainController.totalMoneyInSEFER}',
|
||||
style: AppStyle.title.copyWith(
|
||||
color: AppColor.yellowColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${'Total Points is'.tr}: ${homeCaptainController.totalPoints}',
|
||||
style: AppStyle.title.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12, vertical: 6),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: int.parse(homeCaptainController
|
||||
.countRideToday) <
|
||||
5
|
||||
? AppColor.accentColor
|
||||
: int.parse(homeCaptainController
|
||||
.countRideToday) >
|
||||
5 &&
|
||||
int.parse(homeCaptainController
|
||||
.countRideToday) <
|
||||
10
|
||||
? AppColor.yellowColor
|
||||
: AppColor.greenColor,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.directions_car_rounded,
|
||||
color: Colors.white,
|
||||
size: 18,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'${"Ride Today : ".tr}: ${homeCaptainController.countRideToday}',
|
||||
style: AppStyle.title.copyWith(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 65,
|
||||
right: Get.width * .1,
|
||||
left: Get.width * .1,
|
||||
child: GetBuilder<HomeCaptainController>(
|
||||
builder: (homeCaptainController) => Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${'Active Duration:'.tr} ${homeCaptainController.stringActiveDuration} ',
|
||||
style: AppStyle.title,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.timer_outlined,
|
||||
color: AppColor.greenColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Active Duration:'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
homeCaptainController.stringActiveDuration,
|
||||
style: AppStyle.title.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'${'Total Connection Duration:'.tr} ${homeCaptainController.totalDurationToday} ',
|
||||
style: AppStyle.title,
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.access_time,
|
||||
color: AppColor.accentColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Total Connection Duration:'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
homeCaptainController.totalDurationToday,
|
||||
style: AppStyle.title.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.accentColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Positioned(
|
||||
), // Positioned(
|
||||
// bottom: Get.height * .17,
|
||||
// right: Get.width * .01,
|
||||
// child: AnimatedContainer(
|
||||
|
||||
Reference in New Issue
Block a user