This commit is contained in:
Dennis Nemec
2026-04-28 13:03:09 +02:00
parent de8668c11a
commit 2470299a10
53 changed files with 2409 additions and 1433 deletions

View File

@ -0,0 +1,59 @@
import 'package:flutter/material.dart';
import 'package:hl_lieferservice/model/car.dart';
class CarSelectionCard extends StatelessWidget {
final Car car;
final bool isSelected;
final VoidCallback onTap;
const CarSelectionCard({
super.key,
required this.car,
required this.isSelected,
required this.onTap,
});
@override
Widget build(BuildContext context) {
final color = Theme.of(context).primaryColor;
return Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: isSelected
? BorderSide(color: color, width: 2)
: BorderSide.none,
),
color: isSelected
? color.withValues(alpha: 0.08)
: null,
child: InkWell(
borderRadius: BorderRadius.circular(8),
onTap: onTap,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
child: Row(
children: [
Icon(
Icons.local_shipping,
size: 32,
color: isSelected ? color : Colors.grey,
),
const SizedBox(width: 16),
Expanded(
child: Text(
car.plate,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
),
),
),
if (isSelected)
Icon(Icons.check_circle, color: color),
],
),
),
),
);
}
}