TF-4004 Avoid overflow when text too long inside a row
This commit is contained in:
@@ -70,12 +70,14 @@ class ConfirmDialogButton extends StatelessWidget {
|
|||||||
: iconColor?.asFilter() ?? AppColor.primaryMain.asFilter(),
|
: iconColor?.asFilter() ?? AppColor.primaryMain.asFilter(),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Flexible(
|
||||||
label,
|
child: Text(
|
||||||
style: textStyle ?? ThemeUtils.textStyleM3LabelLarge(color: textColor),
|
label,
|
||||||
maxLines: 1,
|
style: textStyle ?? ThemeUtils.textStyleM3LabelLarge(color: textColor),
|
||||||
overflow: TextOverflow.ellipsis,
|
maxLines: 1,
|
||||||
)
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class NoRulesWidget extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final appLocalizations = AppLocalizations.of(context);
|
final appLocalizations = AppLocalizations.of(context);
|
||||||
final isMobile = responsiveUtils.isMobile(context);
|
final isMobile = responsiveUtils.isMobile(context);
|
||||||
|
final isDesktop = responsiveUtils.isDesktop(context);
|
||||||
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -63,6 +64,9 @@ class NoRulesWidget extends StatelessWidget {
|
|||||||
Container(
|
Container(
|
||||||
constraints: const BoxConstraints(minWidth: 230),
|
constraints: const BoxConstraints(minWidth: 230),
|
||||||
height: 48,
|
height: 48,
|
||||||
|
padding: EdgeInsetsDirectional.symmetric(
|
||||||
|
horizontal: isDesktop ? 0 : 16,
|
||||||
|
),
|
||||||
child: ConfirmDialogButton(
|
child: ConfirmDialogButton(
|
||||||
label: AppLocalizations.of(context).createMyFirstRule,
|
label: AppLocalizations.of(context).createMyFirstRule,
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
|
|||||||
Reference in New Issue
Block a user