Initial commit in own repo
commit
bfc902cd6b
|
|
@ -0,0 +1,48 @@
|
|||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.build/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
.swiftpm/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
/coverage/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
|
||||
# Widget Preview related
|
||||
.widget_preview/
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "c197ca5199e9ee5661e865596c9c07294dfab51c"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: c197ca5199e9ee5661e865596c9c07294dfab51c
|
||||
base_revision: c197ca5199e9ee5661e865596c9c07294dfab51c
|
||||
- platform: web
|
||||
create_revision: c197ca5199e9ee5661e865596c9c07294dfab51c
|
||||
base_revision: c197ca5199e9ee5661e865596c9c07294dfab51c
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
analyzer:
|
||||
exclude:
|
||||
- build/**
|
||||
- web/**
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import 'package:a1_aufgabenverwaltung/components/footer_element.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/todo.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/status.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Footer extends StatelessWidget {
|
||||
const Footer({super.key, required this.todos});
|
||||
|
||||
final List<Todo> todos;
|
||||
|
||||
static const backgroundColor = Color(0xFF0F1117);
|
||||
static const borderColor = Color(0xFF1E2D3D);
|
||||
static const doneColor = Color(0xFF10B981);
|
||||
static const ongoingColor = Color(0xFFF59E0B);
|
||||
static const todoColor = Color(0xFF64748B);
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var doneCounter = 0;
|
||||
var ongoingCounter = 0;
|
||||
var todoCounter = 0;
|
||||
|
||||
for (Todo todo in todos) {
|
||||
switch (todo.status) {
|
||||
case Status.done:
|
||||
doneCounter = doneCounter + 1;
|
||||
break;
|
||||
case Status.ongoing:
|
||||
ongoingCounter = ongoingCounter + 1;
|
||||
break;
|
||||
case Status.todo:
|
||||
todoCounter = todoCounter + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
String doneText = "✓ $doneCounter Erledigt";
|
||||
String ongoingText = "◈ $ongoingCounter In Bearbeitung";
|
||||
String todoText = "○ $todoCounter Nicht begonnen";
|
||||
|
||||
return Container(
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: borderColor,
|
||||
width: 1,
|
||||
)
|
||||
)
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 6),
|
||||
child: Row(
|
||||
spacing: 16,
|
||||
children: [
|
||||
FooterElement(color: doneColor, text: doneText),
|
||||
FooterElement(color: ongoingColor, text: ongoingText),
|
||||
FooterElement(color: todoColor, text: todoText),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class FooterElement extends StatelessWidget {
|
||||
const FooterElement({super.key, required this.color, required this.text});
|
||||
|
||||
final Color color;
|
||||
final String text;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: color,
|
||||
fontWeight: FontWeight(400),
|
||||
fontSize: 10,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
import 'package:a1_aufgabenverwaltung/models/todo.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MainHeader extends StatelessWidget {
|
||||
const MainHeader({super.key, required this.todos});
|
||||
|
||||
final List<Todo> todos;
|
||||
|
||||
static const backgroundColor = Color(0xFF0D1120);
|
||||
static const borderColor = Color(0xFF1E2D3D);
|
||||
static const buttonBackgroundColor = Color(0xFF1E2D3D);
|
||||
static const buttonTextColor = Color(0xFFE2E8F0);
|
||||
static const amountTodosColor = Color(0xFF64748B);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 48,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: borderColor,
|
||||
width: 1
|
||||
)
|
||||
)
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
height: 31,
|
||||
width: 115,
|
||||
decoration: BoxDecoration(
|
||||
color: buttonBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
"+",
|
||||
style: TextStyle(
|
||||
color: buttonTextColor,
|
||||
fontWeight: FontWeight(600),
|
||||
fontSize: 16,
|
||||
letterSpacing: 0.28,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 6),
|
||||
child: Text(
|
||||
"Neue Aufgabe",
|
||||
style: TextStyle(
|
||||
color: buttonTextColor,
|
||||
fontWeight: FontWeight(600),
|
||||
fontSize: 11,
|
||||
letterSpacing: 0.28
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Text(
|
||||
"${todos.length} Aufgaben",
|
||||
style: TextStyle(
|
||||
color: amountTodosColor,
|
||||
fontWeight: FontWeight(400),
|
||||
fontSize: 11
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
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 = "✓",
|
||||
text = "ERLEDIGT";
|
||||
|
||||
const StatusDisplay.ongoing({super.key})
|
||||
: borderTextColor = const Color(0xFFF59E0B),
|
||||
backgroundColor = const Color(0xFF1C1100),
|
||||
icon = "◈",
|
||||
text = "IN BEARBEITUNG";
|
||||
|
||||
const StatusDisplay.todo({super.key})
|
||||
: borderTextColor = const Color(0xFF64748B),
|
||||
backgroundColor = const Color(0xFF0F1117),
|
||||
icon = "○",
|
||||
text = "NICHT BEGONNEN";
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 1.5),
|
||||
child: Container(
|
||||
height: 23,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
border: Border.all(
|
||||
width: 1,
|
||||
color: borderTextColor
|
||||
)
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: 4,
|
||||
children: [
|
||||
Padding(
|
||||
// Nach den Werter aus Figma müsste es EdgeInsets.symmetric(vertical: 3)
|
||||
// sein, aber damit sieht es auf der Website nicht zentriert aus
|
||||
// deswegen habe ich das padding so angepasst, dass das icon auch auf
|
||||
// auf der Website schön vertikal zentriert ist
|
||||
padding: const EdgeInsets.only(top: 5, bottom: 3),
|
||||
child: Text(
|
||||
icon,
|
||||
style: TextStyle(
|
||||
color: borderTextColor,
|
||||
fontWeight: FontWeight(600),
|
||||
fontSize: 10,
|
||||
letterSpacing: 0.55,
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: borderTextColor,
|
||||
fontWeight: FontWeight(600),
|
||||
fontSize: 11,
|
||||
letterSpacing: 0.55,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
import 'package:a1_aufgabenverwaltung/data/mock_todos.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/todo.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:a1_aufgabenverwaltung/components/table_single_row.dart';
|
||||
|
||||
class Table extends StatelessWidget {
|
||||
const Table({super.key, required this.todos});
|
||||
|
||||
final List<Todo> todos;
|
||||
|
||||
static const backgroundColorEven = Color(0xFF0F1117);
|
||||
static const backgroundColorOdd = Color(0xFF131720);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ColoredBox(
|
||||
color: backgroundColorEven,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: List.generate(mockTodos.length, (index) {
|
||||
final backgroundColor = index.isEven ? backgroundColorEven : backgroundColorOdd;
|
||||
final todo = mockTodos[index];
|
||||
return TableSingleRow(todo: todo, index: index, backgroundColor: backgroundColor,);
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
import 'package:a1_aufgabenverwaltung/components/table_header_element.dart';
|
||||
import 'package:a1_aufgabenverwaltung/main.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TableHeader extends StatelessWidget {
|
||||
const TableHeader({
|
||||
super.key,
|
||||
});
|
||||
|
||||
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: Widths.numberWidth),
|
||||
Expanded(
|
||||
child: TableHeaderElement(text: "Aufgabe", width: Widths.titleWidth),
|
||||
),
|
||||
Expanded(
|
||||
child: TableHeaderElement(text: "Status", width: Widths.statusWidth),
|
||||
),
|
||||
Expanded(
|
||||
child: TableHeaderElement(
|
||||
text: "Beschreibung",
|
||||
width: Widths.descriptionWidth,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 36),
|
||||
SizedBox(width: 32),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
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,
|
||||
height: 15,
|
||||
child: Text(
|
||||
text.toUpperCase(),
|
||||
style: TextStyle(
|
||||
color: textColor,
|
||||
fontWeight: FontWeight(600),
|
||||
fontSize: 10,
|
||||
letterSpacing: 1,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class TableRowElement extends StatelessWidget {
|
||||
const TableRowElement({super.key, required this.width, required this.text, required this.paddingVertical, required this.fontWeight, required this.fontSize, required this.textColor});
|
||||
|
||||
final double width;
|
||||
final String text;
|
||||
final double paddingVertical;
|
||||
final FontWeight fontWeight;
|
||||
final Color textColor;
|
||||
final double fontSize;
|
||||
|
||||
static const double hight = 26;
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: width,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: paddingVertical),
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontWeight: fontWeight,
|
||||
color: textColor,
|
||||
fontSize: fontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class TableRowNotTextElement extends StatelessWidget {
|
||||
const TableRowNotTextElement({super.key, required this.width, required this.paddingVertical, required this.child});
|
||||
|
||||
final double width;
|
||||
final double paddingVertical;
|
||||
final Widget child;
|
||||
|
||||
static const double hight = 26;
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: width,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: paddingVertical),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: child
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
import 'package:a1_aufgabenverwaltung/components/status_display.dart';
|
||||
import 'package:a1_aufgabenverwaltung/components/table_row_element.dart';
|
||||
import 'package:a1_aufgabenverwaltung/components/table_row_not_text_element.dart';
|
||||
import 'package:a1_aufgabenverwaltung/components/user_icon_element.dart';
|
||||
import 'package:a1_aufgabenverwaltung/main.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/status.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/todo.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TableSingleRow extends StatelessWidget {
|
||||
const TableSingleRow({super.key, required this.todo, required this.index, required this.backgroundColor});
|
||||
|
||||
final Todo todo;
|
||||
final int index;
|
||||
final Color backgroundColor;
|
||||
|
||||
static const Color primaryTextColor = Color(0xFFE2E8F0);
|
||||
static const Color secondaryTextColor = Color(0xFF64748B);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final statusDisplay = switch (todo.status) {
|
||||
Status.done => StatusDisplay.done(),
|
||||
Status.ongoing => StatusDisplay.ongoing(),
|
||||
Status.todo => StatusDisplay.todo()
|
||||
};
|
||||
|
||||
final displayIndex = (index + 1).toString().padLeft(2, "0");
|
||||
|
||||
return ColoredBox(
|
||||
color: backgroundColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
|
||||
child: Row(
|
||||
spacing: 12,
|
||||
children: [
|
||||
TableRowElement(
|
||||
width: Widths.numberWidth,
|
||||
text: displayIndex,
|
||||
paddingVertical: 5,
|
||||
fontWeight: FontWeight(400),
|
||||
textColor: secondaryTextColor,
|
||||
fontSize: 11,
|
||||
),
|
||||
|
||||
Expanded(
|
||||
child: TableRowElement(
|
||||
width: Widths.titleWidth,
|
||||
text: todo.todoTitle,
|
||||
paddingVertical: 4,
|
||||
fontWeight: FontWeight(600),
|
||||
fontSize: 12,
|
||||
textColor: primaryTextColor,
|
||||
),
|
||||
),
|
||||
|
||||
Expanded(
|
||||
child: TableRowNotTextElement(
|
||||
width: Widths.statusWidth,
|
||||
paddingVertical: 1.5,
|
||||
child: statusDisplay
|
||||
),
|
||||
),
|
||||
|
||||
Expanded(
|
||||
child: TableRowElement(
|
||||
width: Widths.descriptionWidth,
|
||||
text: todo.description,
|
||||
paddingVertical: 5,
|
||||
fontWeight: FontWeight(400),
|
||||
fontSize: 11,
|
||||
textColor: secondaryTextColor,
|
||||
),
|
||||
),
|
||||
|
||||
TableRowNotTextElement(
|
||||
width: Widths.userInfoWidth,
|
||||
paddingVertical: 0,
|
||||
child: UserIconElement(
|
||||
initials: todo.user.initials,
|
||||
userColor: todo.user.userColor,
|
||||
)
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
width: Widths.rightSpaceWidth,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
import 'package:a1_aufgabenverwaltung/components/title_bar_user_info.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/header_infos.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TitleBar extends StatelessWidget {
|
||||
const TitleBar({super.key, required this.headerInfos, });
|
||||
|
||||
final HeaderInfos headerInfos;
|
||||
|
||||
static const backgroundColor = Color(0xFF0D2B2B);
|
||||
static const borderColor = Color(0xFF1A4A4A);
|
||||
static const titleColor = Color(0xFF5EEAD4);
|
||||
static const smallTitleColor = Color(0xFF2D7A7A);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 62,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: borderColor,
|
||||
width: 1
|
||||
),
|
||||
)
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
child: Column( // Linker Teil
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
headerInfos.title.toUpperCase(),
|
||||
style: TextStyle(
|
||||
color: titleColor,
|
||||
fontWeight: FontWeight(700),
|
||||
fontSize: 13,
|
||||
letterSpacing: 1.56,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
headerInfos.smallTitle,
|
||||
style: TextStyle(
|
||||
color: smallTitleColor,
|
||||
fontWeight: FontWeight(400),
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
TitleBarUserInfo(user: headerInfos.user)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
import 'package:a1_aufgabenverwaltung/components/user_icon_element.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/User.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TitleBarUserInfo extends StatelessWidget {
|
||||
const TitleBarUserInfo({super.key, required this.user, });
|
||||
|
||||
final User user;
|
||||
|
||||
static const signedInTextColor = Color(0xFF64748B);
|
||||
static const usernameColor = Color(0xFFE2E8F0);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
"Angemeldet als",
|
||||
style: TextStyle(
|
||||
color: signedInTextColor,
|
||||
fontWeight: FontWeight(400),
|
||||
fontSize: 11,
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: UserIconElement(initials: user.initials, userColor: user. userColor),
|
||||
),
|
||||
|
||||
Text(
|
||||
user.fullName,
|
||||
style: TextStyle(
|
||||
color: usernameColor,
|
||||
fontWeight: FontWeight(600),
|
||||
fontSize: 11,
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class UserIconElement extends StatelessWidget {
|
||||
const UserIconElement({super.key, required this.initials, required this.userColor});
|
||||
|
||||
final String initials;
|
||||
final Color userColor;
|
||||
static const Color backgroundColor = Color(0xFF1A1A2E);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: 24,
|
||||
height: 24,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
border: Border.all(
|
||||
color: userColor,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(2)
|
||||
),
|
||||
child: Text(
|
||||
initials,
|
||||
style: TextStyle(
|
||||
color: userColor,
|
||||
fontWeight: FontWeight(700),
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:a1_aufgabenverwaltung/models/User.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/header_infos.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const mockHeaderInfos = HeaderInfos(
|
||||
title: "Aufgabenverwaltung",
|
||||
smallTitle: "Team-Board / Sprint 7",
|
||||
user: User(
|
||||
fullName: "Anna Becker",
|
||||
initials: "AB",
|
||||
userColor: Color(0xFF3B82F6),
|
||||
)
|
||||
);
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
import 'package:a1_aufgabenverwaltung/models/User.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/status.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/todo.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const mockTodos = [
|
||||
Todo(
|
||||
todoTitle: "Backend-API dokumentieren",
|
||||
status: Status.done,
|
||||
description: "Swagger-Spezifikation für alle REST-Endpunkte erstellen",
|
||||
user: User(
|
||||
fullName: "Lili Mayer",
|
||||
initials: "LM",
|
||||
userColor: Color(0xFFE040FB)
|
||||
),
|
||||
),
|
||||
Todo(
|
||||
todoTitle: "Datenbankschema migrieren",
|
||||
status: Status.ongoing,
|
||||
description: "Schema v2.1 auf Produktionsserver anwenden und testen",
|
||||
user: User(
|
||||
fullName: "Anna Becker",
|
||||
initials: "AB",
|
||||
userColor: Color(0xFF3B82F6),
|
||||
),
|
||||
),
|
||||
Todo(
|
||||
todoTitle: "CI/CD-Pipeline einrichten",
|
||||
status: Status.ongoing,
|
||||
description: "GitHub Actions für automatische Deployments konfigurieren",
|
||||
user: User(
|
||||
fullName: "Sabine Kahn",
|
||||
initials: "SK",
|
||||
userColor: Color(0xFFF59E0B),
|
||||
),
|
||||
),
|
||||
Todo(
|
||||
todoTitle: "Sicherheitsaudit durchführen",
|
||||
status: Status.todo,
|
||||
description: "Penetrationstest und OWASP-Prüfung beauftragen",
|
||||
user: User(
|
||||
fullName: "Thomas Frank",
|
||||
initials: "TF",
|
||||
userColor: Color(0xFFA78BFA),
|
||||
),
|
||||
),
|
||||
Todo(
|
||||
todoTitle: "Nutzerhandbuch überarbeiten",
|
||||
status: Status.todo,
|
||||
description: "Onboarding-Dokumentation für Release 3.0 aktualisieren",
|
||||
user: User(
|
||||
fullName: "Lili Mayer",
|
||||
initials: "LM",
|
||||
userColor: Color(0xFFE040FB),
|
||||
),
|
||||
),
|
||||
Todo(
|
||||
todoTitle: "Performance-Benchmarks",
|
||||
status: Status.done,
|
||||
description: "Ladezeiten messen und Optimierungspotential identifizieren",
|
||||
user: User(
|
||||
fullName: "Sabine Kahn",
|
||||
initials: "SK",
|
||||
userColor: Color(0xFFF59E0B),
|
||||
),
|
||||
),
|
||||
// AB HIER UM SCROLL ZU TESTEN
|
||||
// Todo(
|
||||
// todoTitle: "Backend-API dokumentieren",
|
||||
// status: Status.done,
|
||||
// description: "Swagger-Spezifikation für alle REST-Endpunkte erstellen",
|
||||
// user: User(
|
||||
// fullName: "Lili Mayer",
|
||||
// initials: "LM",
|
||||
// userColor: Color(0xFFE040FB)
|
||||
// ),
|
||||
// ),
|
||||
// Todo(
|
||||
// todoTitle: "Datenbankschema migrieren",
|
||||
// status: Status.ongoing,
|
||||
// description: "Schema v2.1 auf Produktionsserver anwenden und testen",
|
||||
// user: User(
|
||||
// fullName: "Anna Becker",
|
||||
// initials: "AB",
|
||||
// userColor: Color(0xFF3B82F6),
|
||||
// ),
|
||||
// ),
|
||||
// Todo(
|
||||
// todoTitle: "CI/CD-Pipeline einrichten",
|
||||
// status: Status.ongoing,
|
||||
// description: "GitHub Actions für automatische Deployments konfigurieren",
|
||||
// user: User(
|
||||
// fullName: "Sabine Kahn",
|
||||
// initials: "SK",
|
||||
// userColor: Color(0xFFF59E0B),
|
||||
// ),
|
||||
// ),
|
||||
// Todo(
|
||||
// todoTitle: "Sicherheitsaudit durchführen",
|
||||
// status: Status.todo,
|
||||
// description: "Penetrationstest und OWASP-Prüfung beauftragen",
|
||||
// user: User(
|
||||
// fullName: "Thomas Frank",
|
||||
// initials: "TF",
|
||||
// userColor: Color(0xFFA78BFA),
|
||||
// ),
|
||||
// ),
|
||||
// Todo(
|
||||
// todoTitle: "Nutzerhandbuch überarbeiten",
|
||||
// status: Status.todo,
|
||||
// description: "Onboarding-Dokumentation für Release 3.0 aktualisieren",
|
||||
// user: User(
|
||||
// fullName: "Lili Mayer",
|
||||
// initials: "LM",
|
||||
// userColor: Color(0xFFE040FB),
|
||||
// ),
|
||||
// ),
|
||||
// Todo(
|
||||
// todoTitle: "Performance-Benchmarks",
|
||||
// status: Status.todo,
|
||||
// description: "Ladezeiten messen und Optimierungspotential identifizieren",
|
||||
// user: User(
|
||||
// fullName: "Sabine Kahn",
|
||||
// initials: "SK",
|
||||
// userColor: Color(0xFFF59E0B),
|
||||
// ),
|
||||
// ),
|
||||
];
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import 'package:a1_aufgabenverwaltung/components/footer.dart';
|
||||
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:a1_aufgabenverwaltung/components/table.dart';
|
||||
import 'package:a1_aufgabenverwaltung/data/mock_title.dart';
|
||||
import 'package:a1_aufgabenverwaltung/data/mock_todos.dart';
|
||||
import 'package:flutter/material.dart' hide Table;
|
||||
|
||||
void main() {
|
||||
runApp(const MainApp());
|
||||
}
|
||||
|
||||
class Widths {
|
||||
static const double numberWidth = 28;
|
||||
static const double titleWidth = 240;
|
||||
static const double statusWidth = 200;
|
||||
static const double descriptionWidth = 493;
|
||||
static const double userInfoWidth = 36;
|
||||
static const double rightSpaceWidth = 32;
|
||||
}
|
||||
|
||||
// Ich habe mich dazu entschieden die Spalten "Aufgabe", "Status" und "Beschreibung" expanded zu machen
|
||||
// In meinen Augen sieht dadurch das resizen am schönsten aus
|
||||
|
||||
class MainApp extends StatelessWidget {
|
||||
const MainApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Column(
|
||||
children: [
|
||||
const TitleBar(headerInfos: mockHeaderInfos),
|
||||
const MainHeader(todos: mockTodos),
|
||||
const TableHeader(),
|
||||
Expanded(child:
|
||||
const Table(todos: mockTodos)
|
||||
),
|
||||
const Footer(todos: mockTodos),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class User {
|
||||
final String fullName;
|
||||
final String initials;
|
||||
final Color userColor;
|
||||
|
||||
const User({
|
||||
required this.fullName,
|
||||
required this.initials,
|
||||
required this.userColor
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:a1_aufgabenverwaltung/models/User.dart';
|
||||
|
||||
class HeaderInfos {
|
||||
final String title;
|
||||
final String smallTitle;
|
||||
final User user;
|
||||
|
||||
const HeaderInfos({
|
||||
required this.title,
|
||||
required this.smallTitle,
|
||||
required this.user
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
enum Status {
|
||||
done,
|
||||
ongoing,
|
||||
todo,
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import 'package:a1_aufgabenverwaltung/models/User.dart';
|
||||
import 'package:a1_aufgabenverwaltung/models/status.dart';
|
||||
|
||||
class Todo {
|
||||
final String todoTitle;
|
||||
final Status status;
|
||||
final String description;
|
||||
final User user;
|
||||
|
||||
const Todo({
|
||||
required this.todoTitle,
|
||||
required this.status,
|
||||
required this.description, required this.user,
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,205 @@
|
|||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.13.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
sha256: e51d50bca3217c9a9fa2b41a30e4a38971133f5f9ec7a3d57bae095007f1d28e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.1"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.3"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.2"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.10"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.20"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.13.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: c82594181e3312f3d0695fc95aaaf7758d75b8d4ae2bbecf223b9fd5109a059d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.3"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.2"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "277654b3034d17ac6f9f1cb5595db011b1d5d41e8806866db28e0abaa101c490"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.12.2"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.12"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "1d774bbdf6b72a0b12122fc1560c9c2d2a67db5a4a4cc2bd8a5c990ab20e3188"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "89b11d62e1040ee681af3b4f1c97a803ecbf010c6e8b9c5896ee5b08c3bf7b78"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "15.4.0"
|
||||
sdks:
|
||||
dart: ">=3.13.7 <4.0.0"
|
||||
flutter: ">=3.18.0-18.0.pre.54"
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
name: a1_aufgabenverwaltung
|
||||
description: "A new Flutter project."
|
||||
publish_to: 'none'
|
||||
version: 0.1.0+1
|
||||
|
||||
environment:
|
||||
sdk: ^3.13.7
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^6.0.0
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 917 B |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
If you are serving your web app in a path other than the root, change the
|
||||
href value below to reflect the base path you are serving from.
|
||||
|
||||
The path provided below has to start and end with a slash "/" in order for
|
||||
it to work correctly.
|
||||
|
||||
For more details:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
||||
|
||||
This is a placeholder for base href that will be replaced by the value of
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<base href="$FLUTTER_BASE_HREF">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<meta name="description" content="A new Flutter project.">
|
||||
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="a1_aufgabenverwaltung">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||
|
||||
<title>a1_aufgabenverwaltung</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
You can customize the "flutter_bootstrap.js" script.
|
||||
This is useful to provide a custom configuration to the Flutter loader
|
||||
or to give the user feedback during the initialization process.
|
||||
|
||||
For more details:
|
||||
* https://docs.flutter.dev/platform-integration/web/initialization
|
||||
-->
|
||||
<script src="flutter_bootstrap.js" async></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "a1_aufgabenverwaltung",
|
||||
"short_name": "a1_aufgabenverwaltung",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
"theme_color": "#0175C2",
|
||||
"description": "A new Flutter project.",
|
||||
"orientation": "portrait-primary",
|
||||
"prefer_related_applications": false,
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/Icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue