import 'package:a1_aufgabenverwaltung/components/title_bar_user_info.dart'; import 'package:flutter/material.dart'; class TitleBar extends StatelessWidget { const TitleBar({super.key, required this.title, required this.smallTitle, required this.name, required this.initials, required this.userColor}); final String title; final String smallTitle; final String name; final String initials; final Color userColor; 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( title.toUpperCase(), style: TextStyle( color: titleColor, fontWeight: FontWeight(700), fontSize: 13, letterSpacing: 1.56, ), ), Text( smallTitle, style: TextStyle( color: smallTitleColor, fontWeight: FontWeight(400), fontSize: 10, ), ), ], ), ), ), TitleBarUserInfo( name: name, initials: initials, userColor: userColor ) ], ), ), ); } }