2wenty1ne 2026-11-13 00:41:37 +01:00
parent ac792f5e76
commit 9936172f3e
4 changed files with 72 additions and 23 deletions

View File

@ -0,0 +1,42 @@
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});
final double numberWidth;
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),
child: Row(
spacing: 12,
children: [
TableHeaderElement(text: "#", width: 25),
Expanded(child: TableHeaderElement(text: "Aufgabe", width: 240)),
Expanded(child: TableHeaderElement(text: "Status", width: 200)),
Expanded(child: TableHeaderElement(text: "Beschreibung", width: 493,)),
SizedBox(width: 36),
],
),
),
);
}
}

View File

@ -0,0 +1,26 @@
import 'package:flutter/material.dart';
class TableHeaderElement extends StatelessWidget {
const TableHeaderElement({super.key, required this.text, required this.width});
final String text;
final double width;
static const textColor = Color(0xFF64748B);
@override
Widget build(BuildContext context) {
return SizedBox(
width: width,
child: Text(
text.toUpperCase(),
style: TextStyle(
color: textColor,
fontWeight: FontWeight(600),
fontSize: 10,
letterSpacing: 1,
),
),
);
}
}

View File

@ -1,22 +0,0 @@
import 'package:flutter/material.dart';
class TablesHeaderElement extends StatelessWidget {
const TablesHeaderElement({super.key, required this.text});
final String text;
static const textColor = Color(0xFF64748B);
@override
Widget build(BuildContext context) {
return Text(
text.toUpperCase(),
style: TextStyle(
color: textColor,
fontWeight: FontWeight(600),
fontSize: 10,
letterSpacing: 1,
),
);
}
}

View File

@ -1,4 +1,5 @@
import 'package:a1_aufgabenverwaltung/components/main_header.dart';
import 'package:a1_aufgabenverwaltung/components/table_header.dart';
import 'package:a1_aufgabenverwaltung/components/title_bar.dart';
import 'package:flutter/material.dart';
@ -9,6 +10,8 @@ void main() {
class MainApp extends StatelessWidget {
const MainApp({super.key});
statui
@override
Widget build(BuildContext context) {
return const MaterialApp(
@ -26,7 +29,7 @@ class MainApp extends StatelessWidget {
MainHeader(amountTodos: 6),
TableHeader(numberWidth: 28, statusWidth: ,),
],
),
)