#23 Upgrade MaterialUI

General UI improvements and cleanup
This commit is contained in:
2024-02-07 21:17:30 +01:00
parent 538ebd27bf
commit 095b663bf1
11 changed files with 43 additions and 173 deletions

View File

@ -18,10 +18,6 @@ class _AppointmentComponentState extends State<AppointmentComponent> {
Widget build(BuildContext context) {
final Appointment meeting = widget.details.appointments.first;
final appointmentHeight = widget.details.bounds.height;
double headerHeight = 50;
const double footerHeight = 5;
final double infoHeight = appointmentHeight - (headerHeight + footerHeight);
if (infoHeight < 0) headerHeight += infoHeight;
return Stack(
children: [
@ -29,14 +25,11 @@ class _AppointmentComponentState extends State<AppointmentComponent> {
children: [
Container(
padding: const EdgeInsets.all(3),
height: headerHeight,
height: appointmentHeight,
alignment: Alignment.topLeft,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(5),
topRight: Radius.circular(5),
),
borderRadius: const BorderRadius.all(Radius.circular(5)),
color: meeting.color,
),
child: SingleChildScrollView(
@ -60,7 +53,7 @@ class _AppointmentComponentState extends State<AppointmentComponent> {
FittedBox(
fit: BoxFit.fitWidth,
child: Text(
meeting.location ?? "?",
meeting.location ?? "-",
maxLines: 3,
overflow: TextOverflow.ellipsis,
softWrap: true,
@ -74,45 +67,6 @@ class _AppointmentComponentState extends State<AppointmentComponent> {
),
),
),
Visibility(
visible: meeting.notes != null && infoHeight > 10,
replacement: Container(
color: meeting.color,
height: infoHeight,
),
child: Container(
height: infoHeight,
padding: const EdgeInsets.fromLTRB(3, 5, 3, 2),
color: meeting.color.withOpacity(0.8),
alignment: Alignment.topLeft,
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
meeting.notes ?? "",
style: const TextStyle(
color: Colors.white,
fontSize: 10,
),
)
],
),
),
),
),
Container(
height: footerHeight,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(5),
bottomRight: Radius.circular(5),
),
color: meeting.color,
),
),
],
),
Visibility(