83 lines
2.5 KiB
Dart
83 lines
2.5 KiB
Dart
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
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |