|
|
|
|
|
|
using uiwidgets; |
|
|
|
using Unity.UIWidgets.animation; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.gestures; |
|
|
|
using Unity.UIWidgets.service; |
|
|
|
using Unity.UIWidgets.ui; |
|
|
|
using Unity.UIWidgets.widgets; |
|
|
|
using UnityEngine; |
|
|
|
|
|
|
D.assert(fillColor != null); |
|
|
|
D.assert(hoverAnimation != null); |
|
|
|
D.assert(hoverColorTween != null); |
|
|
|
|
|
|
|
|
|
|
|
this.borderAnimation = borderAnimation; |
|
|
|
this.border = border; |
|
|
|
this.gapAnimation = gapAnimation; |
|
|
|
|
|
|
public readonly Color fillColor; |
|
|
|
public readonly ColorTween hoverColorTween; |
|
|
|
public readonly Animation<float> hoverAnimation; |
|
|
|
|
|
|
|
Color blendedColor => Color.alphaBlend(hoverColorTween.evaluate(hoverAnimation), fillColor); |
|
|
|
|
|
|
|
Color blendedColor { |
|
|
|
get { return Color.alphaBlend(hoverColorTween.evaluate(hoverAnimation), fillColor); } |
|
|
|
} |
|
|
|
|
|
|
|
public override void paint(Canvas canvas, Size size) { |
|
|
|
InputBorder borderValue = border.evaluate(borderAnimation); |
|
|
|
|
|
|
|
|
|
|
class _BorderContainerState : TickerProviderStateMixin<_BorderContainer> { |
|
|
|
readonly static TimeSpan _kHoverDuration = new TimeSpan(0, 0, 0, 0, 15); |
|
|
|
|
|
|
|
|
|
|
|
AnimationController _controller; |
|
|
|
AnimationController _hoverColorController; |
|
|
|
Animation<float> _borderAnimation; |
|
|
|
|
|
|
public override void initState() { |
|
|
|
base.initState(); |
|
|
|
_hoverColorController = new AnimationController( |
|
|
|
duration: _kHoverDuration, |
|
|
|
value: widget.isHovering ? 1.0f : 0.0f, |
|
|
|
vsync: this |
|
|
|
); |
|
|
|
duration: _kHoverDuration, |
|
|
|
value: widget.isHovering ? 1.0f : 0.0f, |
|
|
|
vsync: this |
|
|
|
); |
|
|
|
_controller = new AnimationController( |
|
|
|
duration: InputDecoratorConstants._kTransitionDuration, |
|
|
|
vsync: this |
|
|
|
|
|
|
_controller.setValue(0.0f); |
|
|
|
_controller.forward(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} |
|
|
|
else { |
|
|
|
_hoverColorController.reverse(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
return new CustomPaint( |
|
|
|
foregroundPainter: new _InputBorderPainter( |
|
|
|
repaint: ListenableUtils.merge(new List<Listenable> {_borderAnimation, widget.gap, _hoverColorController}), |
|
|
|
repaint: ListenableUtils.merge(new List<Listenable> |
|
|
|
{_borderAnimation, widget.gap, _hoverColorController}), |
|
|
|
borderAnimation: _borderAnimation, |
|
|
|
border: _border, |
|
|
|
gapAnimation: widget.gapAnimation, |
|
|
|
|
|
|
return Equals(contentPadding, other.contentPadding) && isCollapsed == other.isCollapsed && |
|
|
|
floatingLabelHeight.Equals(other.floatingLabelHeight) && |
|
|
|
floatingLabelProgress.Equals(other.floatingLabelProgress) && |
|
|
|
Equals(border, other.border) && Equals(borderGap, other.borderGap) && |
|
|
|
Equals(border, other.border) && Equals(borderGap, other.borderGap) && |
|
|
|
Equals(alignLabelWithHint, other.alignLabelWithHint) && |
|
|
|
Equals(isDense, other.isDense) && Equals(visualDensity, other.visualDensity) && |
|
|
|
Equals(icon, other.icon) && Equals(input, other.input) && |
|
|
|
|
|
|
hashCode = (hashCode * 397) ^ (helperError != null ? helperError.GetHashCode() : 0); |
|
|
|
hashCode = (hashCode * 397) ^ (counter != null ? counter.GetHashCode() : 0); |
|
|
|
hashCode = (hashCode * 397) ^ (container != null ? container.GetHashCode() : 0); |
|
|
|
|
|
|
|
|
|
|
|
return hashCode; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
markNeedsLayout(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
TextDirection _textDirection; |
|
|
|
|
|
|
|
public TextBaseline? textBaseline { |
|
|
|
|
|
|
markNeedsLayout(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
TextAlignVertical _textAlignVertical; |
|
|
|
|
|
|
|
public bool isFocused { |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bool _expands = false; |
|
|
|
|
|
|
|
|
|
|
|
bool _isOutlineAligned { |
|
|
|
get { return !decoration.isCollapsed && decoration.border.isOutline; } |
|
|
|
} |
|
|
|
|
|
|
D.assert( |
|
|
|
layoutConstraints.maxWidth < float.PositiveInfinity, |
|
|
|
() => "An InputDecorator, which is typically created by a TextField, cannot " + |
|
|
|
"have an unbounded width.\n" + |
|
|
|
"This happens when the parent widget does not provide a finite width " + |
|
|
|
"constraint. For example, if the InputDecorator is contained by a Row, " + |
|
|
|
"then its width must be constrained. An Expanded widget or a SizedBox " + |
|
|
|
"can be used to constrain the width of the InputDecorator or the " + |
|
|
|
"TextField that contains it." |
|
|
|
); |
|
|
|
|
|
|
|
"have an unbounded width.\n" + |
|
|
|
"This happens when the parent widget does not provide a finite width " + |
|
|
|
"constraint. For example, if the InputDecorator is contained by a Row, " + |
|
|
|
"then its width must be constrained. An Expanded widget or a SizedBox " + |
|
|
|
"can be used to constrain the width of the InputDecorator or the " + |
|
|
|
"TextField that contains it." |
|
|
|
); |
|
|
|
|
|
|
|
Dictionary<RenderBox, float> boxToBaseline = new Dictionary<RenderBox, float>(); |
|
|
|
BoxConstraints boxConstraints = layoutConstraints.loosen(); |
|
|
|
if (prefix != null) { |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
float inputWidth = Math.Max(0.0f, constraints.maxWidth - ( |
|
|
|
_boxSize(icon).width |
|
|
|
+ contentPadding.left |
|
|
|
+ _boxSize(prefixIcon).width |
|
|
|
+ _boxSize(prefix).width |
|
|
|
+ _boxSize(suffix).width |
|
|
|
+ _boxSize(suffixIcon).width |
|
|
|
+ contentPadding.right)); |
|
|
|
_boxSize(icon).width |
|
|
|
+ contentPadding.left |
|
|
|
+ _boxSize(prefixIcon).width |
|
|
|
+ _boxSize(prefix).width |
|
|
|
+ _boxSize(suffix).width |
|
|
|
+ _boxSize(suffixIcon).width |
|
|
|
+ contentPadding.right)); |
|
|
|
if (label != null) { |
|
|
|
boxToBaseline[label] = _layoutLineBox(label, |
|
|
|
boxConstraints.copyWith(maxWidth: inputWidth) |
|
|
|
|
|
|
+ contentPadding.bottom |
|
|
|
+ densityOffset.dy |
|
|
|
); |
|
|
|
float minContainerHeight = decoration.isDense.Value || expands ? 0.0f : Constants.kMinInteractiveDimension + densityOffset.dy; |
|
|
|
float minContainerHeight = decoration.isDense.Value || expands |
|
|
|
? 0.0f |
|
|
|
: Constants.kMinInteractiveDimension + densityOffset.dy; |
|
|
|
float maxContainerHeight = boxConstraints.maxHeight - bottomHeight + densityOffset.dy; |
|
|
|
float containerHeight = expands |
|
|
|
? maxContainerHeight |
|
|
|
|
|
|
|
|
|
|
// The baselines that will be used to draw the actual input text content.
|
|
|
|
float topInputBaseline = contentPadding.top |
|
|
|
+ topHeight |
|
|
|
+ inputInternalBaseline |
|
|
|
+ baselineAdjustment |
|
|
|
+ interactiveAdjustment; |
|
|
|
|
|
|
|
+ topHeight |
|
|
|
+ inputInternalBaseline |
|
|
|
+ baselineAdjustment |
|
|
|
+ interactiveAdjustment; |
|
|
|
|
|
|
|
- contentPadding.top |
|
|
|
- topHeight |
|
|
|
- contentPadding.bottom; |
|
|
|
- contentPadding.top |
|
|
|
- topHeight |
|
|
|
- contentPadding.bottom; |
|
|
|
|
|
|
|
|
|
|
|
+ baselineAdjustment / 2.0f |
|
|
|
+ (containerHeight - (2.0f + inputHeight)) / 2.0f; |
|
|
|
+ baselineAdjustment / 2.0f |
|
|
|
+ (containerHeight - (2.0f + inputHeight)) / 2.0f; |
|
|
|
float outlineTopBaseline = topInputBaseline; |
|
|
|
float outlineBottomBaseline = topInputBaseline + maxVerticalOffset; |
|
|
|
float outlineBaseline = _interpolateThree( |
|
|
|
|
|
|
if (begin >= middle) { |
|
|
|
return middle; |
|
|
|
} |
|
|
|
|
|
|
|
t = textAlignVertical.y + 1; |
|
|
|
return begin + (middle - begin) * t; |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
t = textAlignVertical.y; |
|
|
|
return middle + (end - middle) * t; |
|
|
|
} |
|
|
|
|
|
|
renderObject.label = child; |
|
|
|
break; |
|
|
|
case _DecorationSlot.hint: |
|
|
|
renderObject.hint = child; |
|
|
|
renderObject.hint = child; |
|
|
|
renderObject.suffix = child; |
|
|
|
renderObject.suffix = child; |
|
|
|
break; |
|
|
|
case _DecorationSlot.prefixIcon: |
|
|
|
renderObject.prefixIcon = child; |
|
|
|
|
|
|
|
|
|
|
public override void initState() { |
|
|
|
base.initState(); |
|
|
|
|
|
|
|
|
|
|
|
(widget.decoration.hasFloatingPlaceholder == true && widget._labelShouldWithdraw); |
|
|
|
(widget.decoration.hasFloatingPlaceholder == true && |
|
|
|
widget._labelShouldWithdraw); |
|
|
|
_floatingLabelController = new AnimationController( |
|
|
|
duration: InputDecoratorConstants._kTransitionDuration, |
|
|
|
vsync: this, |
|
|
|
|
|
|
public InputDecoration decoration { |
|
|
|
get { |
|
|
|
_effectiveDecoration = _effectiveDecoration ?? widget.decoration.applyDefaults( |
|
|
|
Theme.of(context).inputDecorationTheme |
|
|
|
); |
|
|
|
Theme.of(context).inputDecorationTheme |
|
|
|
); |
|
|
|
return _effectiveDecoration; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bool isFocused => widget.isFocused && decoration.enabled == true; |
|
|
|
|
|
|
|
bool isHovering => widget.isHovering && decoration.enabled == true; |
|
|
|
bool isFocused { |
|
|
|
get { return widget.isFocused && decoration.enabled == true; } |
|
|
|
} |
|
|
|
|
|
|
|
bool isHovering { |
|
|
|
get { return widget.isHovering && decoration.enabled == true; } |
|
|
|
} |
|
|
|
return decoration.hasFloatingPlaceholder == true && decoration.floatingLabelBehavior != FloatingLabelBehavior.never; |
|
|
|
return decoration.hasFloatingPlaceholder == true && |
|
|
|
decoration.floatingLabelBehavior != FloatingLabelBehavior.never; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
if (widget.decoration != old.decoration) { |
|
|
|
_effectiveDecoration = null; |
|
|
|
} |
|
|
|
|
|
|
|
bool floatBehaviourChanged = widget.decoration.floatingLabelBehavior != old.decoration.floatingLabelBehavior || |
|
|
|
widget.decoration.hasFloatingPlaceholder != old.decoration.hasFloatingPlaceholder; |
|
|
|
|
|
|
|
bool floatBehaviourChanged = |
|
|
|
widget.decoration.floatingLabelBehavior != old.decoration.floatingLabelBehavior || |
|
|
|
widget.decoration.hasFloatingPlaceholder != old.decoration.hasFloatingPlaceholder; |
|
|
|
if (_floatingLabelEnabled && (widget._labelShouldWithdraw || widget.decoration.floatingLabelBehavior == FloatingLabelBehavior.always)){ |
|
|
|
if (_floatingLabelEnabled && (widget._labelShouldWithdraw || |
|
|
|
widget.decoration.floatingLabelBehavior == |
|
|
|
FloatingLabelBehavior.always)) { |
|
|
|
_floatingLabelController.forward(); |
|
|
|
} |
|
|
|
else { |
|
|
|
|
|
|
|
|
|
|
return themeData.hintColor; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Color _getDefaultBorderColor(ThemeData themeData) { |
|
|
|
if (isFocused) { |
|
|
|
switch (themeData.brightness) { |
|
|
|
|
|
|
return themeData.primaryColor; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Color hoverColor = decoration.hoverColor ?? themeData.inputDecorationTheme?.hoverColor ?? themeData.hoverColor; |
|
|
|
Color hoverColor = decoration.hoverColor ?? |
|
|
|
themeData.inputDecorationTheme?.hoverColor ?? themeData.hoverColor; |
|
|
|
|
|
|
|
return enabledColor; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return lightEnabled; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Color _getHoverColor(ThemeData themeData) { |
|
|
|
if (decoration.filled == null || !decoration.filled.Value || isFocused || decoration.enabled != true) { |
|
|
|
return Colors.transparent; |
|
|
|
|
|
|
heightFactor: 1.0f, |
|
|
|
child: new ConstrainedBox( |
|
|
|
constraints: decoration.prefixIconConstraints ?? themeData.visualDensity.effectiveConstraints( |
|
|
|
new BoxConstraints( |
|
|
|
minWidth: Constants.kMinInteractiveDimension, |
|
|
|
minHeight: Constants.kMinInteractiveDimension |
|
|
|
)), |
|
|
|
new BoxConstraints( |
|
|
|
minWidth: Constants.kMinInteractiveDimension, |
|
|
|
minHeight: Constants.kMinInteractiveDimension |
|
|
|
)), |
|
|
|
child: IconTheme.merge( |
|
|
|
data: new IconThemeData( |
|
|
|
color: iconColor, |
|
|
|
|
|
|
heightFactor: 1.0f, |
|
|
|
child: new ConstrainedBox( |
|
|
|
constraints: decoration.suffixIconConstraints ?? themeData.visualDensity.effectiveConstraints( |
|
|
|
new BoxConstraints( |
|
|
|
minWidth: Constants.kMinInteractiveDimension, |
|
|
|
minHeight: Constants.kMinInteractiveDimension |
|
|
|
)), |
|
|
|
new BoxConstraints( |
|
|
|
minWidth: Constants.kMinInteractiveDimension, |
|
|
|
minHeight: Constants.kMinInteractiveDimension |
|
|
|
)), |
|
|
|
child: IconTheme.merge( |
|
|
|
data: new IconThemeData( |
|
|
|
color: iconColor, |
|
|
|
|
|
|
(4.0f + 0.75f * inlineLabelStyle.fontSize) * MediaQuery.textScaleFactorOf(context); |
|
|
|
if (decoration.filled == true) { |
|
|
|
contentPadding = decorationContentPadding ?? (decorationIsDense |
|
|
|
? EdgeInsets.fromLTRB(12.0f, 8.0f, 12.0f, 8.0f) |
|
|
|
: EdgeInsets.fromLTRB(12.0f, 12.0f, 12.0f, 12.0f)); |
|
|
|
? EdgeInsets.fromLTRB(12.0f, 8.0f, 12.0f, 8.0f) |
|
|
|
: EdgeInsets.fromLTRB(12.0f, 12.0f, 12.0f, 12.0f)); |
|
|
|
? EdgeInsets.fromLTRB(0.0f, 8.0f, 0.0f, 8.0f) |
|
|
|
: EdgeInsets.fromLTRB(0.0f, 12.0f, 0.0f, 12.0f)); |
|
|
|
? EdgeInsets.fromLTRB(0.0f, 8.0f, 0.0f, 8.0f) |
|
|
|
: EdgeInsets.fromLTRB(0.0f, 12.0f, 0.0f, 12.0f)); |
|
|
|
? EdgeInsets.fromLTRB(12.0f, 20.0f, 12.0f, 12.0f) |
|
|
|
: EdgeInsets.fromLTRB(12.0f, 24.0f, 12.0f, 16.0f)); |
|
|
|
? EdgeInsets.fromLTRB(12.0f, 20.0f, 12.0f, 12.0f) |
|
|
|
: EdgeInsets.fromLTRB(12.0f, 24.0f, 12.0f, 16.0f)); |
|
|
|
} |
|
|
|
|
|
|
|
return new _Decorator( |
|
|
|
|
|
|
border = border ?? InputBorder.none; |
|
|
|
D.assert(!(!hasFloatingPlaceholder && floatingLabelBehavior == FloatingLabelBehavior.always), |
|
|
|
() => "hasFloatingPlaceholder=false conflicts with FloatingLabelBehavior.always"); |
|
|
|
|
|
|
|
|
|
|
|
InputDecoration decoration = new InputDecoration( |
|
|
|
icon: null, |
|
|
|
labelText: null, |
|
|
|
|
|
|
public readonly int? errorMaxLines; |
|
|
|
|
|
|
|
public readonly bool? hasFloatingPlaceholder; |
|
|
|
|
|
|
|
|
|
|
|
public readonly FloatingLabelBehavior? floatingLabelBehavior; |
|
|
|
|
|
|
|
public readonly bool? isDense; |
|
|
|
|
|
|
public bool isCollapsed; |
|
|
|
|
|
|
|
public readonly Widget prefixIcon; |
|
|
|
|
|
|
|
|
|
|
|
public readonly BoxConstraints prefixIconConstraints; |
|
|
|
|
|
|
|
public readonly Widget prefix; |
|
|
|
|
|
|
public readonly TextStyle prefixStyle; |
|
|
|
|
|
|
|
public readonly Widget suffixIcon; |
|
|
|
|
|
|
|
|
|
|
|
public readonly BoxConstraints suffixIconConstraints; |
|
|
|
|
|
|
|
public readonly Widget suffix; |
|
|
|
|
|
|
public readonly bool? filled; |
|
|
|
|
|
|
|
public readonly Color fillColor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public readonly Color hoverColor; |
|
|
|
|
|
|
|
public readonly InputBorder errorBorder; |
|
|
|
|
|
|
labelStyle: labelStyle ?? this.labelStyle, |
|
|
|
helperText: helperText ?? this.helperText, |
|
|
|
helperStyle: helperStyle ?? this.helperStyle, |
|
|
|
helperMaxLines : helperMaxLines ?? this.helperMaxLines, |
|
|
|
helperMaxLines: helperMaxLines ?? this.helperMaxLines, |
|
|
|
hintText: hintText ?? this.hintText, |
|
|
|
hintStyle: hintStyle ?? this.hintStyle, |
|
|
|
hintMaxLines: hintMaxLines ?? this.hintMaxLines, |
|
|
|
|
|
|
labelStyle: labelStyle ?? theme.labelStyle, |
|
|
|
helperStyle: helperStyle ?? theme.helperStyle, |
|
|
|
hintStyle: hintStyle ?? theme.hintStyle, |
|
|
|
helperMaxLines : helperMaxLines ?? theme.helperMaxLines, |
|
|
|
helperMaxLines: helperMaxLines ?? theme.helperMaxLines, |
|
|
|
errorStyle: errorStyle ?? theme.errorStyle, |
|
|
|
errorMaxLines: errorMaxLines ?? theme.errorMaxLines, |
|
|
|
hasFloatingPlaceholder: hasFloatingPlaceholder ?? theme.hasFloatingPlaceholder, |
|
|
|
|
|
|
if (hasFloatingPlaceholder == false) { |
|
|
|
description.Add($"hasFloatingPlaceholder: false"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (floatingLabelBehavior != null) { |
|
|
|
description.Add($"floatingLabelBehavior: {floatingLabelBehavior}"); |
|
|
|
} |
|
|
|
|
|
|
if (prefixStyle != null) { |
|
|
|
description.Add($"prefixStyle: ${prefixStyle}"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (prefixIconConstraints != null) { |
|
|
|
description.Add($"prefixIconConstraints: ${prefixIconConstraints}"); |
|
|
|
} |
|
|
|
|
|
|
if (suffixStyle != null) { |
|
|
|
description.Add($"suffixStyle: ${suffixStyle}"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (suffixIconConstraints != null) { |
|
|
|
description.Add($"suffixIconConstraints: ${suffixIconConstraints}"); |
|
|
|
} |
|
|
|
|
|
|
if (fillColor != null) { |
|
|
|
description.Add($"fillColor: ${fillColor}"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hoverColor != null) { |
|
|
|
description.Add($"hoverColor: ${hoverColor}"); |
|
|
|
} |
|
|
|
|
|
|
D.assert(filled != null); |
|
|
|
D.assert(!(hasFloatingPlaceholder != true && floatingLabelBehavior == FloatingLabelBehavior.always), |
|
|
|
() => "hasFloatingPlaceholder=false conflicts with FloatingLabelBehavior.always"); |
|
|
|
|
|
|
|
|
|
|
|
this.labelStyle = labelStyle; |
|
|
|
this.helperStyle = helperStyle; |
|
|
|
this.helperMaxLines = helperMaxLines; |
|
|
|
|
|
|
public readonly int? errorMaxLines; |
|
|
|
|
|
|
|
public readonly bool? hasFloatingPlaceholder; |
|
|
|
|
|
|
|
|
|
|
|
public readonly FloatingLabelBehavior? floatingLabelBehavior; |
|
|
|
|
|
|
|
public readonly bool? isDense; |
|
|
|
|
|
|
public readonly bool? filled; |
|
|
|
|
|
|
|
public readonly Color fillColor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public readonly Color hoverColor; |
|
|
|
|
|
|
|
public readonly InputBorder errorBorder; |
|
|
|
|
|
|
public readonly InputBorder border; |
|
|
|
|
|
|
|
public readonly bool alignLabelWithHint; |
|
|
|
|
|
|
|
|
|
|
|
InputDecorationTheme copyWith( |
|
|
|
TextStyle labelStyle = null, |
|
|
|
TextStyle helperStyle = null, |
|
|
|
|
|
|
int? errorMaxLines = null, |
|
|
|
int? errorMaxLines = null, |
|
|
|
bool? hasFloatingPlaceholder = null, |
|
|
|
FloatingLabelBehavior? floatingLabelBehavior = null, |
|
|
|
bool? isDense = null, |
|
|
|
|
|
|
InputBorder enabledBorder = null, |
|
|
|
InputBorder border = null, |
|
|
|
bool? alignLabelWithHint = null |
|
|
|
) { |
|
|
|
) { |
|
|
|
labelStyle: labelStyle ?? this.labelStyle, |
|
|
|
helperStyle: helperStyle ?? this.helperStyle, |
|
|
|
helperMaxLines: helperMaxLines ?? this.helperMaxLines, |
|
|
|
hintStyle: hintStyle ?? this.hintStyle, |
|
|
|
errorStyle: errorStyle ?? this.errorStyle, |
|
|
|
errorMaxLines: errorMaxLines ?? this.errorMaxLines, |
|
|
|
hasFloatingPlaceholder: hasFloatingPlaceholder ?? this.hasFloatingPlaceholder, |
|
|
|
floatingLabelBehavior: floatingLabelBehavior ?? this.floatingLabelBehavior, |
|
|
|
isDense: isDense ?? this.isDense, |
|
|
|
contentPadding: contentPadding ?? this.contentPadding, |
|
|
|
isCollapsed: isCollapsed ?? this.isCollapsed, |
|
|
|
prefixStyle: prefixStyle ?? this.prefixStyle, |
|
|
|
suffixStyle: suffixStyle ?? this.suffixStyle, |
|
|
|
counterStyle: counterStyle ?? this.counterStyle, |
|
|
|
filled: filled ?? this.filled, |
|
|
|
fillColor: fillColor ?? this.fillColor, |
|
|
|
focusColor: focusColor ?? this.focusColor, |
|
|
|
hoverColor: hoverColor ?? this.hoverColor, |
|
|
|
errorBorder: errorBorder ?? this.errorBorder, |
|
|
|
focusedBorder: focusedBorder ?? this.focusedBorder, |
|
|
|
focusedErrorBorder: focusedErrorBorder ?? this.focusedErrorBorder, |
|
|
|
disabledBorder: disabledBorder ?? this.disabledBorder, |
|
|
|
enabledBorder: enabledBorder ?? this.enabledBorder, |
|
|
|
border: border ?? this.border, |
|
|
|
alignLabelWithHint: alignLabelWithHint ?? this.alignLabelWithHint |
|
|
|
labelStyle: labelStyle ?? this.labelStyle, |
|
|
|
helperStyle: helperStyle ?? this.helperStyle, |
|
|
|
helperMaxLines: helperMaxLines ?? this.helperMaxLines, |
|
|
|
hintStyle: hintStyle ?? this.hintStyle, |
|
|
|
errorStyle: errorStyle ?? this.errorStyle, |
|
|
|
errorMaxLines: errorMaxLines ?? this.errorMaxLines, |
|
|
|
hasFloatingPlaceholder: hasFloatingPlaceholder ?? this.hasFloatingPlaceholder, |
|
|
|
floatingLabelBehavior: floatingLabelBehavior ?? this.floatingLabelBehavior, |
|
|
|
isDense: isDense ?? this.isDense, |
|
|
|
contentPadding: contentPadding ?? this.contentPadding, |
|
|
|
isCollapsed: isCollapsed ?? this.isCollapsed, |
|
|
|
prefixStyle: prefixStyle ?? this.prefixStyle, |
|
|
|
suffixStyle: suffixStyle ?? this.suffixStyle, |
|
|
|
counterStyle: counterStyle ?? this.counterStyle, |
|
|
|
filled: filled ?? this.filled, |
|
|
|
fillColor: fillColor ?? this.fillColor, |
|
|
|
focusColor: focusColor ?? this.focusColor, |
|
|
|
hoverColor: hoverColor ?? this.hoverColor, |
|
|
|
errorBorder: errorBorder ?? this.errorBorder, |
|
|
|
focusedBorder: focusedBorder ?? this.focusedBorder, |
|
|
|
focusedErrorBorder: focusedErrorBorder ?? this.focusedErrorBorder, |
|
|
|
disabledBorder: disabledBorder ?? this.disabledBorder, |
|
|
|
enabledBorder: enabledBorder ?? this.enabledBorder, |
|
|
|
border: border ?? this.border, |
|
|
|
alignLabelWithHint: alignLabelWithHint ?? this.alignLabelWithHint |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static bool operator ==(InputDecorationTheme left, InputDecorationTheme right) { |
|
|
|
return Equals(left, right); |
|
|
|
} |
|
|
|
|
|
|
defaultValue: defaultTheme.labelStyle)); |
|
|
|
properties.add(new DiagnosticsProperty<TextStyle>("helperStyle", helperStyle, |
|
|
|
defaultValue: defaultTheme.helperStyle)); |
|
|
|
properties.add(new IntProperty("helperMaxLines", helperMaxLines, defaultValue: defaultTheme.helperMaxLines)); |
|
|
|
properties.add(new IntProperty("helperMaxLines", helperMaxLines, |
|
|
|
defaultValue: defaultTheme.helperMaxLines)); |
|
|
|
properties.add(new DiagnosticsProperty<TextStyle>("hintStyle", hintStyle, |
|
|
|
defaultValue: defaultTheme.hintStyle)); |
|
|
|
properties.add(new DiagnosticsProperty<TextStyle>("errorStyle", errorStyle, |
|
|
|
|
|
|
defaultValue: defaultTheme.hasFloatingPlaceholder)); |
|
|
|
properties.add(new DiagnosticsProperty<FloatingLabelBehavior?>("floatingLabelBehavior", floatingLabelBehavior, defaultValue: defaultTheme.floatingLabelBehavior)); |
|
|
|
properties.add(new DiagnosticsProperty<FloatingLabelBehavior?>("floatingLabelBehavior", |
|
|
|
floatingLabelBehavior, defaultValue: defaultTheme.floatingLabelBehavior)); |
|
|
|
properties.add(new DiagnosticsProperty<bool?>("isDense", isDense, defaultValue: defaultTheme.isDense)); |
|
|
|
properties.add(new DiagnosticsProperty<EdgeInsets>("contentPadding", contentPadding, |
|
|
|
defaultValue: defaultTheme.contentPadding)); |
|
|
|
|
|
|
properties.add(new DiagnosticsProperty<TextStyle>("counterStyle", counterStyle, |
|
|
|
defaultValue: defaultTheme.counterStyle)); |
|
|
|
properties.add(new DiagnosticsProperty<bool?>("filled", filled, defaultValue: defaultTheme.filled)); |
|
|
|
properties.add(new ColorProperty("fillColor", fillColor, defaultValue: defaultTheme.fillColor)); |
|
|
|
properties.add(new ColorProperty("fillColor", fillColor, defaultValue: defaultTheme.fillColor)); |
|
|
|
properties.add(new ColorProperty("focusColor", focusColor, defaultValue: defaultTheme.focusColor)); |
|
|
|
properties.add(new ColorProperty("hoverColor", hoverColor, defaultValue: defaultTheme.hoverColor)); |
|
|
|
properties.add(new DiagnosticsProperty<InputBorder>("errorBorder", errorBorder, |
|
|
|