import 'package:a1_aufgabenverwaltung/components/table_header_element.dart'; import 'package:flutter/material.dart'; class TableHeader extends StatelessWidget { const TableHeader({ super.key, required this.numberWidth, required this.statusWidth, required this.descriptionWidth, required this.todoWidth, }); final double numberWidth; final double todoWidth; final double statusWidth; final double descriptionWidth; static const backgroundColor = Color(0xFF0B0E16); static const borderColor = Color(0xFF1E2D3D); @override Widget build(BuildContext context) { return Container( height: 32, decoration: BoxDecoration( color: backgroundColor, border: Border(bottom: BorderSide(color: borderColor, width: 1)), ), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8), child: Row( spacing: 12, children: [ TableHeaderElement(text: "#", width: numberWidth), Expanded( child: TableHeaderElement(text: "Aufgabe", width: todoWidth), ), Expanded( child: TableHeaderElement(text: "Status", width: statusWidth), ), Expanded( child: TableHeaderElement( text: "Beschreibung", width: descriptionWidth, ), ), SizedBox(width: 36), ], ), ), ); } }