浏览代码

add icon constraints to input_decorator

/dev_k12
xingwei.zhu 4 年前
当前提交
3bcde7c0
共有 1 个文件被更改,包括 28 次插入2 次删除
  1. 30
      com.unity.uiwidgets/Runtime/material/input_decorator.cs

30
com.unity.uiwidgets/Runtime/material/input_decorator.cs


widthFactor: 1.0f,
heightFactor: 1.0f,
child: new ConstrainedBox(
constraints: new BoxConstraints(minWidth: 48.0f, minHeight: 48.0f),
constraints: this.decoration?.prefixIconConstraints ?? new BoxConstraints(minWidth: 48.0f, minHeight: 48.0f),
child: IconTheme.merge(
data: new IconThemeData(
color: iconColor,

widthFactor: 1.0f,
heightFactor: 1.0f,
child: new ConstrainedBox(
constraints: new BoxConstraints(minWidth: 48.0f, minHeight: 48.0f),
constraints: this.decoration?.suffixIconConstraints ?? new BoxConstraints(minWidth: 48.0f, minHeight: 48.0f),
child: IconTheme.merge(
data: new IconThemeData(
color: iconColor,

bool? isDense = null,
EdgeInsets contentPadding = null,
Widget prefixIcon = null,
BoxConstraints prefixIconConstraints = null,
BoxConstraints suffixIconConstraints = null,
Widget suffix = null,
string suffixText = null,
TextStyle suffixStyle = null,

this.prefix = prefix;
this.prefixText = prefixText;
this.prefixIcon = prefixIcon;
this.prefixIconConstraints = prefixIconConstraints;
this.suffixIconConstraints = suffixIconConstraints;
this.suffixStyle = suffixStyle;
this.counter = counter;
this.counterText = counterText;

isDense: false,
contentPadding: EdgeInsets.zero,
prefixIcon: null,
prefixIconConstraints: null,
suffixIconConstraints: null,
suffixText: null,
suffixStyle: null,
counter: null,

public bool isCollapsed;
public readonly Widget prefixIcon;
public readonly BoxConstraints prefixIconConstraints;
public readonly Widget prefix;

public readonly Widget suffixIcon;
public readonly BoxConstraints suffixIconConstraints;
public readonly Widget suffix;
public readonly string suffixText;

bool? isDense = null,
EdgeInsets contentPadding = null,
Widget prefixIcon = null,
BoxConstraints prefixIconConstraints = null,
BoxConstraints suffixIconConstraints = null,
Widget suffix = null,
string suffixText = null,
TextStyle suffixStyle = null,

isDense: isDense ?? this.isDense,
contentPadding: contentPadding ?? this.contentPadding,
prefixIcon: prefixIcon ?? this.prefixIcon,
prefixIconConstraints: prefixIconConstraints ?? this.prefixIconConstraints,
suffixIconConstraints: suffixIconConstraints ?? this.suffixIconConstraints,
suffix: suffix ?? this.suffix,
suffixText: suffixText ?? this.suffixText,
suffixStyle: suffixStyle ?? this.suffixStyle,

&& Equals(other.contentPadding, this.contentPadding)
&& Equals(other.isCollapsed, this.isCollapsed)
&& Equals(other.prefixIcon, this.prefixIcon)
&& Equals(other.prefixIconConstraints, this.prefixIconConstraints)
&& Equals(other.suffixIconConstraints, this.suffixIconConstraints)
&& Equals(other.suffix, this.suffix)
&& Equals(other.suffixText, this.suffixText)
&& Equals(other.suffixStyle, this.suffixStyle)

hashCode = (hashCode * 397) ^ this.border.GetHashCode();
hashCode = (hashCode * 397) ^ this.enabled.GetHashCode();
hashCode = (hashCode * 397) ^ this.prefixIcon.GetHashCode();
hashCode = (hashCode * 397) ^ this.prefixIconConstraints.GetHashCode();
hashCode = (hashCode * 397) ^ this.suffixIconConstraints.GetHashCode();
hashCode = (hashCode * 397) ^ this.suffix.GetHashCode();
hashCode = (hashCode * 397) ^ this.suffixText.GetHashCode();
hashCode = (hashCode * 397) ^ this.suffixStyle.GetHashCode();

description.Add($"prefixIcon: ${this.prefixIcon}");
}
if (this.prefixIconConstraints != null) {
description.Add($"prefixIconConstraints: ${this.prefixIconConstraints}");
}
if (this.prefix != null) {
description.Add($"prefix: ${this.prefix}");
}

if (this.suffixIcon != null) {
description.Add($"suffixIcon: ${this.suffixIcon}");
}
if (this.suffixIconConstraints != null) {
description.Add($"suffixIconConstraints: ${this.suffixIconConstraints}");
}
if (this.suffix != null) {

正在加载...
取消
保存