From 22a958c67cfe78fdb5f43f2d08a2ae22251a3d1c Mon Sep 17 00:00:00 2001 From: ibrahim Date: Tue, 14 May 2024 23:53:28 +0200 Subject: [PATCH] fix: UI overflows --- app/lib/screens/study/dashboard/dashboard.dart | 2 +- .../dashboard/task_overview_tab/task_overview.dart | 3 ++- app/lib/screens/study/report/report_history.dart | 10 +++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/lib/screens/study/dashboard/dashboard.dart b/app/lib/screens/study/dashboard/dashboard.dart index 341c3dd32..90041fc96 100644 --- a/app/lib/screens/study/dashboard/dashboard.dart +++ b/app/lib/screens/study/dashboard/dashboard.dart @@ -312,7 +312,7 @@ class StudyFinishedPlaceholder extends StatelessWidget { const fontSize = 30.0; const textStyle = TextStyle(fontSize: fontSize); final theme = Theme.of(context); - return Center( + return SingleChildScrollView( child: Padding( padding: const EdgeInsets.fromLTRB(32, 32, 32, 32), child: Column( diff --git a/app/lib/screens/study/dashboard/task_overview_tab/task_overview.dart b/app/lib/screens/study/dashboard/task_overview_tab/task_overview.dart index 8a5667ec6..d07550b54 100644 --- a/app/lib/screens/study/dashboard/task_overview_tab/task_overview.dart +++ b/app/lib/screens/study/dashboard/task_overview_tab/task_overview.dart @@ -1,3 +1,4 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; @@ -79,7 +80,7 @@ class _TaskOverviewState extends State { const SizedBox(height: 16), Row( children: [ - Text(AppLocalizations.of(context)!.intervention_current, style: theme.textTheme.titleLarge), + Expanded(child: Text(AppLocalizations.of(context)!.intervention_current, style: theme.textTheme.titleLarge)), const Spacer(), Text( '${widget.subject!.daysLeftForPhase(widget.subject!.getInterventionIndexForDate(DateTime.now()))} ${AppLocalizations.of(context)!.days_left}', diff --git a/app/lib/screens/study/report/report_history.dart b/app/lib/screens/study/report/report_history.dart index b10183ca4..24f265f90 100644 --- a/app/lib/screens/study/report/report_history.dart +++ b/app/lib/screens/study/report/report_history.dart @@ -1,3 +1,4 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; @@ -61,9 +62,12 @@ class ReportHistoryItem extends StatelessWidget { MdiIcons.fromString(subject.study.iconName) ?? MdiIcons.accountHeart, color: isActiveStudy ? Colors.white : Colors.black, ), - Text( - subject.study.title!, - style: theme.textTheme.headlineSmall!.copyWith(color: isActiveStudy ? Colors.white : Colors.black), + const SizedBox(width: 16), + Expanded( + child: Text( + subject.study.title!, + style: theme.textTheme.headlineSmall!.copyWith(color: isActiveStudy ? Colors.white : Colors.black), + ), ), ], ),