From c7a5371fb8a4926eca9600a7d7c231fd6a8fbeb1 Mon Sep 17 00:00:00 2001 From: George Tian Date: Mon, 5 Jun 2023 19:51:37 +0800 Subject: [PATCH] Fix color picker dialog overflow Moved all dialog contents into a SingleChildScrollView --- lib/src/widgets/toolbar/color_button.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/src/widgets/toolbar/color_button.dart b/lib/src/widgets/toolbar/color_button.dart index 65139629..41a57734 100644 --- a/lib/src/widgets/toolbar/color_button.dart +++ b/lib/src/widgets/toolbar/color_button.dart @@ -170,9 +170,9 @@ class _ColorButtonState extends State { child: Text('OK'.i18n)), ], backgroundColor: Theme.of(context).canvasColor, - content: SizedBox( - height: 400, + content: SingleChildScrollView( child: Column( + mainAxisSize: MainAxisSize.min, children: [ Row( children: [ @@ -192,8 +192,7 @@ class _ColorButtonState extends State { child: Text('Color'.i18n)), ], ), - Expanded( - child: Column(children: [ + Column(children: [ if (pickerType == 'material') MaterialPicker( pickerColor: selectedColor, @@ -253,7 +252,7 @@ class _ColorButtonState extends State { }), ], ), - ])) + ]) ], ), ));