TF-691 Set overflow default for text is too long on web
This commit is contained in:
@@ -12,4 +12,6 @@ class CommonTextStyle {
|
||||
static final defaultTextOverFlow = BuildUtils.isWeb
|
||||
? TextOverflow.fade
|
||||
: TextOverflow.ellipsis;
|
||||
|
||||
static final defaultSoftWrap = BuildUtils.isWeb ? false : true;
|
||||
}
|
||||
@@ -150,6 +150,7 @@ class ButtonBuilder {
|
||||
return Text(
|
||||
'${_text ?? ''}',
|
||||
maxLines: 1,
|
||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||
style: _textStyle ?? TextStyle(fontSize: 12, color: AppColor.colorTextButton),
|
||||
);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:core/presentation/utils/style_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RichTextBuilder {
|
||||
@@ -34,7 +35,8 @@ class RichTextBuilder {
|
||||
return RichText(
|
||||
key: _key,
|
||||
maxLines: _maxLines ?? 1,
|
||||
overflow: _overflow ?? TextOverflow.ellipsis,
|
||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||
overflow: _overflow ?? CommonTextStyle.defaultTextOverFlow,
|
||||
text: TextSpan(
|
||||
style: _styleOrigin,
|
||||
children: _getSpans(_textOrigin, _wordToStyle, _styleWord)));
|
||||
|
||||
Reference in New Issue
Block a user