Files
flutter_tank_web_app/lib/widgets/detail_header_widget.dart
2026-01-23 08:33:58 +01:00

77 lines
2.3 KiB
Dart

import 'package:flutter/material.dart';
import '../models/tank_model.dart';
class DetailHeaderWidget extends StatelessWidget {
final TankModel tank;
const DetailHeaderWidget({super.key, required this.tank});
@override
Widget build(BuildContext context) {
return Card(
elevation: 4,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [Colors.green[600]!, Colors.green[800]!],
),
borderRadius: BorderRadius.circular(16),
),
padding: const EdgeInsets.all(24),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Tankvorgang',
style: TextStyle(
color: Colors.white.withAlpha(230),
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 4),
Text(
tank.szDate,
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'Gesamtpreis',
style: TextStyle(
color: Colors.white.withAlpha(230),
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 4),
Text(
'${tank.szPriceTotal}',
style: const TextStyle(
color: Colors.white,
fontSize: 28,
fontWeight: FontWeight.bold,
),
),
],
),
],
),
),
);
}
}