main
parent
9936172f3e
commit
d07d150244
|
|
@ -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(),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class TableHeaderElement extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: width,
|
||||
height: 15,
|
||||
child: Text(
|
||||
text.toUpperCase(),
|
||||
style: TextStyle(
|
||||
|
|
|
|||
|
|
@ -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: [
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
enum Status {
|
||||
done,
|
||||
ongoing,
|
||||
todo,
|
||||
}
|
||||
|
||||
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
Loading…
Reference in New Issue