Update constructor of RichTextProxy

pull/573/head
X Code 3 years ago
parent 56ef9f46d0
commit d934c1a882
  1. 21
      lib/src/widgets/proxy.dart
  2. 15
      lib/src/widgets/text_line.dart

@ -131,16 +131,17 @@ class RenderEmbedProxy extends RenderProxyBox implements RenderContentProxyBox {
class RichTextProxy extends SingleChildRenderObjectWidget {
/// Child argument should be an instance of RichText widget.
const RichTextProxy(
RichText child,
this.textStyle,
this.textAlign,
this.textDirection,
this.textScaleFactor,
this.locale,
this.strutStyle,
this.textWidthBasis,
this.textHeightBehavior,
) : super(child: child);
{required RichText child,
required this.textStyle,
required this.textAlign,
required this.textDirection,
required this.locale,
required this.strutStyle,
this.textScaleFactor = 1.0,
this.textWidthBasis = TextWidthBasis.parent,
this.textHeightBehavior,
Key? key})
: super(key: key, child: child);
final TextStyle textStyle;
final TextAlign textAlign;

@ -150,15 +150,12 @@ class _TextLineState extends State<TextLine> {
textScaleFactor: MediaQuery.textScaleFactorOf(context),
);
return RichTextProxy(
child,
textSpan.style!,
textAlign,
widget.textDirection!,
1,
Localizations.localeOf(context),
strutStyle,
TextWidthBasis.parent,
null);
textStyle: textSpan.style!,
textAlign: textAlign,
textDirection: widget.textDirection!,
strutStyle: strutStyle,
locale: Localizations.localeOf(context),
child: child);
}
InlineSpan _getTextSpanForWholeLine(BuildContext context) {

Loading…
Cancel
Save