Text(TextSpan textSpan, Key key = null, TextStyle style = null, StrutStyle strutStyle = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, float?textScaleFactor = null, int?maxLines = null, TextWidthBasis textWidthBasis = default, ui.TextHeightBehavior textHeightBehavior = null) : base(key) { D.assert(textSpan != null, () => "A non-null TextSpan must be provided to a Text.rich widget."); this.textSpan = textSpan; data = null; this.style = style; this.strutStyle = strutStyle; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow; this.textScaleFactor = textScaleFactor; this.maxLines = maxLines; this.textHeightBehavior = textHeightBehavior; this.textWidthBasis = textWidthBasis; }
public static Widget merge( Widget child, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, int?maxLines = null, TextWidthBasis?textWidthBasis = null, ui.TextHeightBehavior textHeightBehavior = null ) { D.assert(child != null); return(new Builder( builder: (BuildContext context) => { DefaultTextStyle parent = DefaultTextStyle.of(context); return new DefaultTextStyle( key: key, style: parent.style.merge(style), textAlign: textAlign ?? parent.textAlign, softWrap: softWrap ?? parent.softWrap, overflow: overflow ?? parent.overflow, maxLines: maxLines ?? parent.maxLines, textWidthBasis: textWidthBasis ?? parent.textWidthBasis, child: child ); } )); }
public AnimatedDefaultTextStyle( Key key = null, Widget child = null, TextStyle style = null, TextAlign?textAlign = null, bool softWrap = true, TextOverflow?overflow = null, int?maxLines = null, TextWidthBasis textWidthBasis = TextWidthBasis.parent, ui.TextHeightBehavior textHeightBehavior = null, Curve curve = null, TimeSpan?duration = null, VoidCallback onEnd = null ) : base(key: key, curve: curve ?? Curves.linear, duration: duration, onEnd: onEnd) { overflow = overflow ?? TextOverflow.clip; D.assert(duration != null); D.assert(style != null); D.assert(child != null); D.assert(overflow != null); D.assert(maxLines == null || maxLines > 0); this.child = child; this.style = style; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow.Value; this.maxLines = maxLines; this.textHeightBehavior = textHeightBehavior; this.textWidthBasis = textWidthBasis; }
public Text(string data, Key key = null, TextStyle style = null, StrutStyle strutStyle = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, float?textScaleFactor = null, int?maxLines = null, TextWidthBasis textWidthBasis = TextWidthBasis.parent, ui.TextHeightBehavior textHeightBehavior = null) : base(key) { D.assert(data != null, () => "A non-null string must be provided to a Text widget."); textSpan = null; this.data = data; this.style = style; this.strutStyle = strutStyle; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow; this.textScaleFactor = textScaleFactor; this.maxLines = maxLines; this.textWidthBasis = textWidthBasis; this.textHeightBehavior = textHeightBehavior; }
public static SelectableText rich(TextSpan textSpan, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, float?textScaleFactor = null, int?maxLines = null, FocusNode focusNode = null, Color selectionColor = null, GestureTapDownCallback onTapDown = null, GestureTapUpCallback onTapUp = null, GestureTapCancelCallback onTapCancel = null) { return(new SelectableText( textSpan, key, style, textAlign, softWrap, overflow, textScaleFactor, maxLines, focusNode, selectionColor, onTapDown, onTapUp, onTapCancel)); }
public SelectableText(TextSpan textSpan, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, float?textScaleFactor = null, int?maxLines = null, FocusNode focusNode = null, Color selectionColor = null, GestureTapDownCallback onTapDown = null, GestureTapUpCallback onTapUp = null, GestureTapCancelCallback onTapCancel = null) : base(key) { D.assert(textSpan != null); this.textSpan = textSpan; this.data = null; this.style = style; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow; this.textScaleFactor = textScaleFactor; this.maxLines = maxLines; this.focusNode = focusNode ?? new FocusNode(); this.selectionColor = selectionColor; this.onTapDown = onTapDown; this.onTapUp = onTapUp; this.onTapCancel = onTapCancel; }
public static Text rich(TextSpan textSpan, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, double?textScaleFactor = null, int?maxLines = null) { return(new Text( textSpan, key, style, textAlign, softWrap, overflow, textScaleFactor, maxLines)); }
Text(TextSpan textSpan, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, double?textScaleFactor = null, int?maxLines = null) : base(key) { D.assert(textSpan != null); this.textSpan = textSpan; this.data = null; this.style = style; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow; this.textScaleFactor = textScaleFactor; this.maxLines = maxLines; }
public Text(string data, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, float?textScaleFactor = null, int?maxLines = null) : base(key) { D.assert(data != null); this.textSpan = null; this.data = data; this.style = style; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow; this.textScaleFactor = textScaleFactor; this.maxLines = maxLines; }
public SelectableWealthyText(List <TextSpan> textSpanList, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, float?textScaleFactor = null, int?maxLines = null, FocusNode focusNode = null, Color selectionColor = null) : base(key) { this.textSpanList = textSpanList; this.data = null; this.style = style; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow; this.textScaleFactor = textScaleFactor; this.maxLines = maxLines; this.focusNode = focusNode ?? new FocusNode(); this.selectionColor = selectionColor; }
public AnimatedDefaultTextStyle( Key key = null, Widget child = null, TextStyle style = null, TextAlign?textAlign = null, bool softWrap = true, TextOverflow?overflow = null, int?maxLines = null, Curve curve = null, TimeSpan?duration = null ) : base(key: key, curve: curve ?? Curves.linear, duration: duration) { D.assert(duration != null); D.assert(style != null); D.assert(child != null); D.assert(maxLines == null || maxLines > 0); this.child = child; this.style = style; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow ?? TextOverflow.clip; this.maxLines = maxLines; }
public SelectableText(string data, Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, float?textScaleFactor = null, int?maxLines = null, FocusNode focusNode = null, Color selectionColor = null) : base(key) { D.assert(data != null); this.textSpan = null; this.data = data; this.style = style; this.textAlign = textAlign; this.softWrap = softWrap; this.overflow = overflow; this.textScaleFactor = textScaleFactor; this.maxLines = maxLines; this.focusNode = focusNode ?? new FocusNode(); this.selectionColor = selectionColor; }
public static Widget merge( Key key = null, TextStyle style = null, TextAlign?textAlign = null, bool?softWrap = null, TextOverflow?overflow = null, int?maxLines = null, Widget child = null ) { D.assert(child != null); return(new Builder(builder: (context => { var parent = of(context); return new DefaultTextStyle( key: key, style: parent.style.merge(style), textAlign: textAlign ?? parent.textAlign, softWrap: softWrap ?? parent.softWrap, overflow: overflow ?? parent.overflow, maxLines: maxLines ?? parent.maxLines, child: child ); }))); }
public WealthyText( List <TextSpan> textSpanList, Key key = null, TextStyle style = null, TextAlign?textAlign = TextAlign.left, bool?softWrap = true, TextOverflow?overflow = TextOverflow.clip, float?textScaleFactor = 1.0f, int?maxLines = null, Action onSelectionChanged = null, Color selectionColor = null) : base(string.Empty, key, style, textAlign: textAlign, softWrap: softWrap, overflow: overflow, textScaleFactor: textScaleFactor, maxLines: maxLines) { _textSpanList = textSpanList; _onSelectionChanged = onSelectionChanged; _selectionColor = selectionColor; }