53 lines
1.3 KiB
Dart
53 lines
1.3 KiB
Dart
import 'package:a1_aufgabenverwaltung/models/status.dart';
|
|
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 = "s",
|
|
text = "ERLEDIGT";
|
|
|
|
const Statusdisplay.ongoing({super.key})
|
|
: borderTextColor = const Color(0xFFF59E0B),
|
|
backgroundColor = const Color(0xFF1C1100),
|
|
icon = "s",
|
|
text = "IN BEARBEITUNG";
|
|
|
|
const Statusdisplay.todo({super.key})
|
|
: borderTextColor = const Color(0xFF64748B),
|
|
backgroundColor = const Color(0xFF0F1117),
|
|
icon = "s",
|
|
text = "NICHT BEGONNEN";
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 1.5),
|
|
child: Container(
|
|
height: 23,
|
|
decoration: BoxDecoration(
|
|
color: backgroundColor,
|
|
border: Border.all(
|
|
width: 1,
|
|
color: borderTextColor
|
|
)
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
text,
|
|
style: TextStyle(),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|