Update: 2026-07-11 19:38:43

This commit is contained in:
Hamza-Ayed
2026-07-11 19:38:43 +03:00
parent 9535d702d6
commit de761c1d97
@@ -150,8 +150,9 @@ class CarDetailsTypeToChoose extends StatelessWidget {
// ── Car Selection List ─────────────────────────────── // ── Car Selection List ───────────────────────────────
SizedBox( SizedBox(
height: 96, height: 136,
child: ListView.builder( child: ListView.builder(
clipBehavior: Clip.none,
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
padding: const EdgeInsets.fromLTRB(16, 2, 16, 2), padding: const EdgeInsets.fromLTRB(16, 2, 16, 2),
@@ -161,7 +162,7 @@ class CarDetailsTypeToChoose extends StatelessWidget {
final isSelected = controller.selectedIndex == index; final isSelected = controller.selectedIndex == index;
return Padding( return Padding(
padding: EdgeInsetsDirectional.only( padding: EdgeInsetsDirectional.only(
end: index < carTypes.length - 1 ? 8 : 0), end: index < carTypes.length - 1 ? 12 : 0),
child: _buildCarCard( child: _buildCarCard(
context, controller, carType, isSelected, index), context, controller, carType, isSelected, index),
); );
@@ -793,20 +794,10 @@ class _CarTypeCard extends StatelessWidget {
onTap: onTap, onTap: onTap,
child: AnimatedContainer( child: AnimatedContainer(
duration: AppDurations.base, duration: AppDurations.base,
curve: Curves.easeOutCubic, curve: Curves.easeOutBack,
width: 88, width: 116,
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: isSelected color: isSelected ? AppColor.primaryColor : AppColor.secondaryColor,
? LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
AppColor.primaryColor.withAlpha(22),
AppColor.primaryColor.withAlpha(10),
],
)
: null,
color: isSelected ? null : AppColor.secondaryColor,
borderRadius: AppRadii.all(AppRadii.lg), borderRadius: AppRadii.all(AppRadii.lg),
border: Border.all( border: Border.all(
color: isSelected color: isSelected
@@ -815,61 +806,76 @@ class _CarTypeCard extends StatelessWidget {
width: isSelected ? 2 : 1.2, width: isSelected ? 2 : 1.2,
), ),
boxShadow: [ boxShadow: [
BoxShadow( if (isSelected)
color: isSelected BoxShadow(
? AppColor.primaryColor.withAlpha(50) color: AppColor.primaryColor.withAlpha(100),
: Colors.black.withAlpha(12), blurRadius: 16,
blurRadius: isSelected ? 10 : 4, offset: const Offset(0, 6),
offset: const Offset(0, 2), )
), else
BoxShadow(
color: Colors.black.withAlpha(12),
blurRadius: 4,
offset: const Offset(0, 2),
),
], ],
), ),
child: Stack( child: Stack(
clipBehavior: Clip.none,
children: [ children: [
// Selected indicator // Selected indicator
if (isSelected) if (isSelected)
Positioned( Positioned(
top: 3, top: 4,
right: 3, right: 4,
child: Container( child: Container(
width: 18, width: 20,
height: 18, height: 20,
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( color: Colors.white,
colors: [
AppColor.primaryColor,
AppColor.primaryColor.withAlpha(200),
],
),
shape: BoxShape.circle, shape: BoxShape.circle,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: AppColor.primaryColor.withAlpha(60), color: Colors.black.withAlpha(30),
blurRadius: 4, blurRadius: 4,
offset: const Offset(0, 2),
), ),
], ],
), ),
child: const Icon(Icons.check, size: 11, color: Colors.white), child:
Icon(Icons.check, size: 14, color: AppColor.primaryColor),
), ),
), ),
// Card content // Card content
Padding( Padding(
padding: const EdgeInsets.all(6), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
// Car image // Car image on soft disc
AnimatedScale( Container(
scale: isSelected ? 1.1 : 1.0, width: 52,
duration: AppDurations.base, height: 52,
child: Image.asset( decoration: BoxDecoration(
carType.image, shape: BoxShape.circle,
height: 34, color: isSelected
fit: BoxFit.contain, ? Colors.white.withAlpha(30)
: AppColor.primaryColor.withAlpha(15),
),
alignment: Alignment.center,
child: AnimatedScale(
scale: isSelected ? 1.15 : 1.0,
duration: AppDurations.base,
curve: Curves.easeOutBack,
child: Image.asset(
carType.image,
height: 42,
fit: BoxFit.contain,
),
), ),
), ),
const SizedBox(height: 1), const SizedBox(height: 6),
// Car name // Car name
FittedBox( FittedBox(
@@ -879,26 +885,24 @@ class _CarTypeCard extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
isSelected ? FontWeight.w800 : FontWeight.w600, isSelected ? FontWeight.w800 : FontWeight.w600,
fontSize: 11, fontSize: 13,
color: isSelected color: isSelected ? Colors.white : AppColor.writeColor,
? AppColor.primaryColor
: AppColor.writeColor,
), ),
maxLines: 1, maxLines: 1,
), ),
), ),
const SizedBox(height: 1), const SizedBox(height: 4),
// Price tag // Price tag
Container( Container(
padding: padding:
const EdgeInsets.symmetric(horizontal: 6, vertical: 1), const EdgeInsets.symmetric(horizontal: 10, vertical: 3),
decoration: BoxDecoration( decoration: BoxDecoration(
color: isSelected color: isSelected
? AppColor.primaryColor ? Colors.white
: AppColor.writeColor.withOpacity(0.05), : AppColor.writeColor.withOpacity(0.05),
borderRadius: AppRadii.all(AppRadii.sm), borderRadius: BorderRadius.circular(12),
border: isSelected border: isSelected
? null ? null
: Border.all( : Border.all(
@@ -908,11 +912,11 @@ class _CarTypeCard extends StatelessWidget {
child: Text( child: Text(
priceText, priceText,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 15,
fontWeight: FontWeight.w800, fontWeight: FontWeight.bold,
color: isSelected color: isSelected
? Colors.white ? AppColor.primaryColor
: AppColor.writeColor.withOpacity(0.8), : AppColor.writeColor.withOpacity(0.9),
), ),
), ),
), ),