From 48470998470c534e3405610a3b395f246bb23a4a Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 1 Dec 2023 16:06:24 +0100 Subject: [PATCH] Added scrollability + fixed the issue of overflow --- lib/screens/timer/TimerEditor.dart | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/screens/timer/TimerEditor.dart b/lib/screens/timer/TimerEditor.dart index 8e5e3ab..7ed70af 100644 --- a/lib/screens/timer/TimerEditor.dart +++ b/lib/screens/timer/TimerEditor.dart @@ -37,6 +37,7 @@ enum _DateTimeMenuItems { now } class TimerEditor extends StatefulWidget { final TimerEntry timer; + const TimerEditor({Key? key, required this.timer}) : super(key: key); @override @@ -146,11 +147,12 @@ class _TimerEditorState extends State { ), body: Form( key: _formKey, - child: Column( - //todo this should include a scrollable area - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.stretch, + child: ListView( + // todo this should include a scrollable area + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.stretch, + shrinkWrap: true, children: [ BlocBuilder( builder: (BuildContext context, ProjectsState projectsState) => @@ -386,12 +388,16 @@ class _TimerEditorState extends State { title: Text(L10N.of(context).tr.notes), onTap: () async => await _editNotes(context), ), - Expanded( + ConstrainedBox( + constraints: const BoxConstraints(minHeight: 250, maxHeight: 880), child: InkWell( onTap: () async => await _editNotes(context), child: Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), - child: Markdown(data: _notes!)))), + child: Markdown( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + data: _notes!)))), ], ), ),