diff --git a/lib/main.dart b/lib/main.dart index 640824f..2e28a7e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'widgets/app_header.dart'; +import 'widgets/toolbar.dart'; void main() { runApp(const MainApp()); @@ -9,8 +11,32 @@ class MainApp extends StatelessWidget { @override Widget build(BuildContext context) { - return const MaterialApp( - home: Scaffold(body: Center(child: Text('Hello World!'))), + return MaterialApp( + theme: ThemeData(fontFamily: 'Roboto'), + home: Scaffold( + body: Align( + alignment: Alignment.topCenter, + child: Container( + width: double.infinity, + height: 750, + color: Color(0xFF0F1117), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + AppHeader(), // 1. Header + Toolbar(), // 2. Toolbar + // 3. Table header + Expanded( + child: Container( + color: Color(0xFF0F1117), + ), // 4. Task rows + ), + // 5. Footer + ], + ), + ), + ), + ), ); } -} +} \ No newline at end of file diff --git a/lib/widgets/app_header.dart b/lib/widgets/app_header.dart new file mode 100644 index 0000000..0a21d4a --- /dev/null +++ b/lib/widgets/app_header.dart @@ -0,0 +1,80 @@ +import 'package:flutter/material.dart'; + +import 'avatar_badge.dart'; + +class AppHeader extends StatelessWidget { + const AppHeader({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + color: const Color(0xFF0D2B2B), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: const [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'AUFGABENVERWALTUNG', + style: TextStyle( + fontFamily: 'Roboto', + fontSize: 13, + fontWeight: FontWeight.w700, + height: 1.5, + letterSpacing: 1.56, + color: Color(0xFF5EEAD4), + ), + ), + SizedBox(height: 2), + Text( + 'Team-Board / Sprint 7', + style: TextStyle( + fontFamily: 'Roboto', + fontSize: 10, + height: 1.5, + color: Color(0xFF2D7A7A), + ), + ), + ], + ), // Container: title + breadcrumb + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Angemeldet als', + style: TextStyle( + fontFamily: 'Roboto', + fontSize: 11, + height: 1.5, + color: Color(0xFF64748B), + ), + ), + SizedBox(width: 8), + AvatarBadge(initials: 'AB', color: Color(0xFF3B82F6)), + SizedBox(width: 8), + Text( + 'Anna Becker', + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + height: 1.5, + color: Color(0xFFE2E8F0), + ), + ), + ], + ), // Container: Angemeldet als + avatar + name + ], + ), + ), + Container(height: 1, color: const Color(0xFF1A4A4A)), + ], + ), + ); + } +} diff --git a/lib/widgets/avatar_badge.dart b/lib/widgets/avatar_badge.dart new file mode 100644 index 0000000..0b7c7f6 --- /dev/null +++ b/lib/widgets/avatar_badge.dart @@ -0,0 +1,39 @@ +import 'package:flutter/material.dart'; + +class AvatarBadge extends StatelessWidget { + final String initials; + final Color color; + + const AvatarBadge({super.key, required this.initials, required this.color}); + + @override + Widget build(BuildContext context) { + return Container( + width: 24, + height: 24, + padding: const EdgeInsets.all(1), + decoration: BoxDecoration( + color: color, + borderRadius: BorderRadius.circular(2), + ), + child: Container( + decoration: BoxDecoration( + color: const Color(0xFF1A1A2E), + borderRadius: BorderRadius.circular(1), + ), + child: Center( + child: Text( + initials, + style: TextStyle( + color: color, + fontFamily: 'Roboto', + fontSize: 10, + fontWeight: FontWeight.w700, + letterSpacing: 0, + ), + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/widgets/toolbar.dart b/lib/widgets/toolbar.dart new file mode 100644 index 0000000..1a74488 --- /dev/null +++ b/lib/widgets/toolbar.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; + +class Toolbar extends StatelessWidget { + const Toolbar({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + color: const Color(0xFF0D1120), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8), + child: Row( + children: [ + Container( + padding: const EdgeInsets.symmetric( + horizontal: 13, + vertical: 7, + ), + decoration: BoxDecoration( + color: const Color(0xFF1E2D3D), + borderRadius: BorderRadius.circular(2), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + '+', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + height: 1, + letterSpacing: 0.28, + color: Color(0xFFE2E8F0), + ), + ), + SizedBox(width: 6), + Text( + 'Neue Aufgabe', + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + height: 17 / 11, + letterSpacing: 0.28, + color: Color(0xFFE2E8F0), + ), + ), + ], + ), + ), + SizedBox(width: 8), + Expanded( + child: Align( + alignment: Alignment.centerRight, + child: Text( + '6 Aufgaben', + style: TextStyle( + fontSize: 11, + height: 17 / 11, + color: Color(0xFF64748B), + ), + ), + ), + ), + ], + ), + ), + Container(height: 1, color: const Color(0xFF1E2D3D)), + ], + ), + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index bc738e8..80ac177 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,3 +17,5 @@ dev_dependencies: flutter: uses-material-design: true + fonts: + - family: Roboto diff --git a/skizzen/Skizze CA2.png b/skizzen/Skizze CA2.png new file mode 100644 index 0000000..e73d700 Binary files /dev/null and b/skizzen/Skizze CA2.png differ