TF-3760 Fix these buttons are overflowed when text too long
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -156,32 +156,63 @@ class _EditTextDialogBuilderState extends State<EditTextDialogBuilder> {
|
|||||||
bottom: 25,
|
bottom: 25,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
Flexible(
|
||||||
TMailButtonWidget.fromText(
|
child: TextButton(
|
||||||
text: widget.negativeText,
|
style: TextButton.styleFrom(
|
||||||
textStyle: ThemeUtils.textStyleM3LabelLarge(),
|
overlayColor: Theme.of(context)
|
||||||
maxLines: 1,
|
.colorScheme
|
||||||
alignment: Alignment.center,
|
.outline
|
||||||
height: 48,
|
.withOpacity(0.08),
|
||||||
borderRadius: 100,
|
minimumSize: const Size(67, 48),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
shape: const RoundedRectangleBorder(
|
||||||
backgroundColor: Colors.transparent,
|
borderRadius: BorderRadius.all(
|
||||||
onTapActionCallback: _onNegativeAction,
|
Radius.circular(100),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: _onNegativeAction,
|
||||||
|
child: Text(
|
||||||
|
widget.negativeText,
|
||||||
|
style: ThemeUtils.textStyleM3LabelLarge(),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
TMailButtonWidget.fromText(
|
Flexible(
|
||||||
text: widget.positiveText,
|
child: TextButton(
|
||||||
textStyle: ThemeUtils.textStyleM3LabelLarge(
|
style: TextButton.styleFrom(
|
||||||
color: Colors.white,
|
backgroundColor: AppColor.primaryMain,
|
||||||
|
overlayColor: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.outline
|
||||||
|
.withOpacity(0.08),
|
||||||
|
minimumSize: const Size(119, 48),
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(100),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 10,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: _onPositiveAction,
|
||||||
|
child: Text(
|
||||||
|
widget.positiveText,
|
||||||
|
style: ThemeUtils.textStyleM3LabelLarge(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
height: 48,
|
|
||||||
borderRadius: 100,
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 32),
|
|
||||||
backgroundColor: AppColor.primaryMain,
|
|
||||||
onTapActionCallback: _onPositiveAction,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user