CPD/a1_aufgabenverwaltung/lib/components/title_bar.dart

68 lines
2.1 KiB
Dart

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)
],
),
),
);
}
}