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, ), ), ], ), ], ), ), ); } }