Update: 2026-06-14 05:48:58
This commit is contained in:
@@ -293,7 +293,7 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
const Icon(Icons.star_rounded,
|
||||
color: Colors.amber, size: 14),
|
||||
Text(
|
||||
" ${controller.driverRate} • ${controller.model}",
|
||||
" ${controller.driverRate} • ${controller.model}${controller.carColor.isNotEmpty ? ' • ${controller.carColor.tr}' : ''}",
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey[700],
|
||||
@@ -356,23 +356,25 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
final bool isBike = vehicleText.contains('scooter') ||
|
||||
vehicleText.contains('bike') ||
|
||||
vehicleText.contains('دراجة');
|
||||
return Container(
|
||||
height: 40, // تصغير من 50
|
||||
width: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: carColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: ColorFiltered(
|
||||
colorFilter: ColorFilter.mode(carColor, BlendMode.srcIn),
|
||||
child: Image.asset(
|
||||
isBike ||
|
||||
box.read(BoxName.carType) == 'Scooter' ||
|
||||
box.read(BoxName.carType) == 'Pink Bike'
|
||||
? 'assets/images/moto.png'
|
||||
: 'assets/images/car3.png',
|
||||
fit: BoxFit.contain,
|
||||
return AnimatedCarIcon(
|
||||
child: Container(
|
||||
height: 40, // تصغير من 50
|
||||
width: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: carColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: ColorFiltered(
|
||||
colorFilter: ColorFilter.mode(carColor, BlendMode.srcIn),
|
||||
child: Image.asset(
|
||||
isBike ||
|
||||
box.read(BoxName.carType) == 'Scooter' ||
|
||||
box.read(BoxName.carType) == 'Pink Bike'
|
||||
? 'assets/images/moto.png'
|
||||
: 'assets/images/car3.png',
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -841,3 +843,48 @@ class TimeDriverToPassenger extends StatelessWidget {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedCarIcon extends StatefulWidget {
|
||||
final Widget child;
|
||||
const AnimatedCarIcon({Key? key, required this.child}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AnimatedCarIcon> createState() => _AnimatedCarIconState();
|
||||
}
|
||||
|
||||
class _AnimatedCarIconState extends State<AnimatedCarIcon>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late final AnimationController _controller;
|
||||
late final Animation<Offset> _animation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(seconds: 2),
|
||||
)..repeat(reverse: true);
|
||||
|
||||
_animation = Tween<Offset>(
|
||||
begin: const Offset(-0.06, 0.0),
|
||||
end: const Offset(0.06, 0.0),
|
||||
).animate(CurvedAnimation(
|
||||
parent: _controller,
|
||||
curve: Curves.easeInOut,
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SlideTransition(
|
||||
position: _animation,
|
||||
child: widget.child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
'${controller.model} • ',
|
||||
'${controller.model}${controller.carColor.isNotEmpty ? " • ${controller.carColor.tr}" : ""} • ',
|
||||
style: TextStyle(fontSize: 12, color: AppColor.grayColor),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
@@ -97,6 +97,15 @@ class VipRideBeginPassenger extends StatelessWidget {
|
||||
controller.model,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
if (controller.carColor.isNotEmpty) ...[
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text(
|
||||
controller.carColor.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user