From d07d15024421f4f35b9a8bc83d476470b26a0bc6 Mon Sep 17 00:00:00 2001 From: 2wenty1ne Date: Fri, 13 Nov 2026 10:59:26 +0100 Subject: [PATCH] dt --- .../lib/components/statusDisplay.dart | 52 +++++++++++++++++++ .../lib/components/table.dart | 10 ++++ .../lib/components/table_header.dart | 37 ++++++++----- .../lib/components/table_header_element.dart | 1 + .../lib/components/table_row.dart | 19 +++++++ .../lib/components/table_row_element.dart | 16 ++++++ a1_aufgabenverwaltung/lib/main.dart | 18 +++++-- a1_aufgabenverwaltung/lib/models/status.dart | 6 +++ a1_aufgabenverwaltung/lib/models/todo.dart | 18 +++++++ 9 files changed, 159 insertions(+), 18 deletions(-) create mode 100644 a1_aufgabenverwaltung/lib/components/statusDisplay.dart create mode 100644 a1_aufgabenverwaltung/lib/components/table.dart create mode 100644 a1_aufgabenverwaltung/lib/components/table_row.dart create mode 100644 a1_aufgabenverwaltung/lib/components/table_row_element.dart create mode 100644 a1_aufgabenverwaltung/lib/models/status.dart create mode 100644 a1_aufgabenverwaltung/lib/models/todo.dart diff --git a/a1_aufgabenverwaltung/lib/components/statusDisplay.dart b/a1_aufgabenverwaltung/lib/components/statusDisplay.dart new file mode 100644 index 0000000..8079146 --- /dev/null +++ b/a1_aufgabenverwaltung/lib/components/statusDisplay.dart @@ -0,0 +1,52 @@ +import 'package:a1_aufgabenverwaltung/models/status.dart'; +import 'package:flutter/material.dart'; + +class Statusdisplay extends StatelessWidget { + final Color borderTextColor; + final Color backgroundColor; + final String icon; + final String text; + + const Statusdisplay.done({super.key}) + : borderTextColor = const Color(0xFF10B981), + backgroundColor = const Color(0xFF052E16), + icon = "s", + text = "ERLEDIGT"; + + const Statusdisplay.ongoing({super.key}) + : borderTextColor = const Color(0xFFF59E0B), + backgroundColor = const Color(0xFF1C1100), + icon = "s", + text = "IN BEARBEITUNG"; + + const Statusdisplay.todo({super.key}) + : borderTextColor = const Color(0xFF64748B), + backgroundColor = const Color(0xFF0F1117), + icon = "s", + text = "NICHT BEGONNEN"; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 1.5), + child: Container( + height: 23, + decoration: BoxDecoration( + color: backgroundColor, + border: Border.all( + width: 1, + color: borderTextColor + ) + ), + child: Row( + children: [ + Text( + text, + style: TextStyle(), + ) + ], + ), + ), + ); + } +} diff --git a/a1_aufgabenverwaltung/lib/components/table.dart b/a1_aufgabenverwaltung/lib/components/table.dart new file mode 100644 index 0000000..5f542c5 --- /dev/null +++ b/a1_aufgabenverwaltung/lib/components/table.dart @@ -0,0 +1,10 @@ +import 'package:flutter/material.dart'; + +class Table extends StatelessWidget { + const Table({super.key}); + + @override + Widget build(BuildContext context) { + return const Placeholder(); + } +} \ No newline at end of file diff --git a/a1_aufgabenverwaltung/lib/components/table_header.dart b/a1_aufgabenverwaltung/lib/components/table_header.dart index a67957d..1d30440 100644 --- a/a1_aufgabenverwaltung/lib/components/table_header.dart +++ b/a1_aufgabenverwaltung/lib/components/table_header.dart @@ -2,9 +2,16 @@ 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}); + 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; @@ -17,26 +24,30 @@ class TableHeader extends StatelessWidget { height: 32, decoration: BoxDecoration( color: backgroundColor, - border: Border( - bottom: BorderSide( - color: borderColor, - width: 1 - ) - ) + border: Border(bottom: BorderSide(color: borderColor, width: 1)), ), child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 20), + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8), 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,)), + 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), ], ), ), ); } -} \ No newline at end of file +} diff --git a/a1_aufgabenverwaltung/lib/components/table_header_element.dart b/a1_aufgabenverwaltung/lib/components/table_header_element.dart index e8e6cee..eec9a92 100644 --- a/a1_aufgabenverwaltung/lib/components/table_header_element.dart +++ b/a1_aufgabenverwaltung/lib/components/table_header_element.dart @@ -12,6 +12,7 @@ class TableHeaderElement extends StatelessWidget { Widget build(BuildContext context) { return SizedBox( width: width, + height: 15, child: Text( text.toUpperCase(), style: TextStyle( diff --git a/a1_aufgabenverwaltung/lib/components/table_row.dart b/a1_aufgabenverwaltung/lib/components/table_row.dart new file mode 100644 index 0000000..307a536 --- /dev/null +++ b/a1_aufgabenverwaltung/lib/components/table_row.dart @@ -0,0 +1,19 @@ +import 'package:a1_aufgabenverwaltung/models/todo.dart'; +import 'package:flutter/material.dart'; + +class TableRow extends StatelessWidget { + const TableRow({super.key, required this.todo}); + + final Todo todo; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), + child: Row(spacing: 12, children: [ + + ], + ), + ); + } +} diff --git a/a1_aufgabenverwaltung/lib/components/table_row_element.dart b/a1_aufgabenverwaltung/lib/components/table_row_element.dart new file mode 100644 index 0000000..dc040e8 --- /dev/null +++ b/a1_aufgabenverwaltung/lib/components/table_row_element.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class TableRowElement extends StatelessWidget { + const TableRowElement({super.key, required this.width}); + + final double width; + + static const double hight = 26; + static const Color primaryTextColor = Color(0xFFE2E8F0); + static const Color rowTextColor = Color(0xFF64748B); + + @override + Widget build(BuildContext context) { + return SizedBox(width: width); + } +} diff --git a/a1_aufgabenverwaltung/lib/main.dart b/a1_aufgabenverwaltung/lib/main.dart index 9fa0e80..44f21e5 100644 --- a/a1_aufgabenverwaltung/lib/main.dart +++ b/a1_aufgabenverwaltung/lib/main.dart @@ -10,7 +10,10 @@ void main() { class MainApp extends StatelessWidget { const MainApp({super.key}); - statui + static const double numberWidth = 28; + static const double todoWidth = 240; + static const double statusWidth = 200; + static const double descriptionWidth = 493; @override Widget build(BuildContext context) { @@ -20,7 +23,7 @@ class MainApp extends StatelessWidget { child: Column( children: [ TitleBar( - title: "Aufgabenverwaltung", + title: "Aufgabenverwaltung", smallTitle: "Team-Board / Sprint 7", name: "Anna Becker", initials: "AB", @@ -28,11 +31,16 @@ class MainApp extends StatelessWidget { ), MainHeader(amountTodos: 6), - - TableHeader(numberWidth: 28, statusWidth: ,), + + TableHeader( + numberWidth: numberWidth, + todoWidth: todoWidth, + statusWidth: statusWidth, + descriptionWidth: 20, + ), ], ), - ) + ), ), ); } diff --git a/a1_aufgabenverwaltung/lib/models/status.dart b/a1_aufgabenverwaltung/lib/models/status.dart new file mode 100644 index 0000000..1534e32 --- /dev/null +++ b/a1_aufgabenverwaltung/lib/models/status.dart @@ -0,0 +1,6 @@ +enum Status { + done, + ongoing, + todo, +} + diff --git a/a1_aufgabenverwaltung/lib/models/todo.dart b/a1_aufgabenverwaltung/lib/models/todo.dart new file mode 100644 index 0000000..d817983 --- /dev/null +++ b/a1_aufgabenverwaltung/lib/models/todo.dart @@ -0,0 +1,18 @@ +import 'package:a1_aufgabenverwaltung/models/status.dart'; +import 'package:flutter/services.dart'; + +class Todo { + final String todoTitle; + final Status status; + final String description; + final Color userColor; + final String initials; + + const Todo({ + required this.todoTitle, + required this.status, + required this.description, + required this.userColor, + required this.initials, + }); +}