|
|
|
|
|
|
MaterialTapTargetSize? materialTapTargetSize { get; } |
|
|
|
|
|
|
|
float? elevation { get; } |
|
|
|
|
|
|
|
Color shadowColor { get; } |
|
|
|
} |
|
|
|
|
|
|
|
public interface DeletableChipAttributes { |
|
|
|
|
|
|
string tooltip { get; } |
|
|
|
|
|
|
|
ShapeBorder avatarBorder { get; } |
|
|
|
|
|
|
|
Color selectedShadowColor { get; } |
|
|
|
} |
|
|
|
|
|
|
|
public interface DisabledChipAttributes { |
|
|
|
|
|
|
Color backgroundColor = null, |
|
|
|
EdgeInsets padding = null, |
|
|
|
MaterialTapTargetSize? materialTapTargetSize = null, |
|
|
|
float? elevation = null |
|
|
|
float? elevation = null, |
|
|
|
Color shadowColor = null |
|
|
|
) : base(key: key) { |
|
|
|
D.assert(label != null); |
|
|
|
D.assert(elevation == null || elevation >= 0.0f); |
|
|
|
|
|
|
this._padding = padding; |
|
|
|
this._materialTapTargetSize = materialTapTargetSize; |
|
|
|
this._elevation = elevation; |
|
|
|
this._shadowColor = shadowColor; |
|
|
|
} |
|
|
|
|
|
|
|
public Widget avatar { |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
float? _elevation; |
|
|
|
|
|
|
|
public Color shadowColor { |
|
|
|
get { return this._shadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _shadowColor; |
|
|
|
|
|
|
|
public override Widget build(BuildContext context) { |
|
|
|
D.assert(MaterialD.debugCheckHasMaterial(context)); |
|
|
|
|
|
|
padding: this.padding, |
|
|
|
materialTapTargetSize: this.materialTapTargetSize, |
|
|
|
elevation: this.elevation, |
|
|
|
shadowColor: this.shadowColor, |
|
|
|
isEnabled: true |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
EdgeInsets padding = null, |
|
|
|
MaterialTapTargetSize? materialTapTargetSize = null, |
|
|
|
float? elevation = null, |
|
|
|
Color shadowColor = null, |
|
|
|
Color selectedShadowColor = null, |
|
|
|
ShapeBorder avatarBorder = null |
|
|
|
) : base(key: key) { |
|
|
|
|
|
|
this._padding = padding; |
|
|
|
this._materialTapTargetSize = materialTapTargetSize; |
|
|
|
this._elevation = elevation; |
|
|
|
this._shadowColor = shadowColor; |
|
|
|
this._selectedShadowColor = selectedShadowColor; |
|
|
|
} |
|
|
|
|
|
|
|
public Widget avatar { |
|
|
|
|
|
|
|
|
|
|
float? _elevation; |
|
|
|
|
|
|
|
public Color shadowColor { |
|
|
|
get { return this._shadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _shadowColor; |
|
|
|
|
|
|
|
public Color selectedShadowColor { |
|
|
|
get { return this._selectedShadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _selectedShadowColor; |
|
|
|
|
|
|
|
public ShapeBorder avatarBorder { |
|
|
|
get { return this._avatarBorder; } |
|
|
|
} |
|
|
|
|
|
|
padding: this.padding, |
|
|
|
materialTapTargetSize: this.materialTapTargetSize, |
|
|
|
elevation: this.elevation, |
|
|
|
shadowColor: this.shadowColor, |
|
|
|
selectedShadowColor: this.selectedShadowColor, |
|
|
|
isEnabled: this.isEnabled == true && |
|
|
|
(this.onSelected != null || this.onDeleted != null || this.onPressed != null), |
|
|
|
avatarBorder: this.avatarBorder |
|
|
|
|
|
|
EdgeInsets padding = null, |
|
|
|
MaterialTapTargetSize? materialTapTargetSize = null, |
|
|
|
float? elevation = null, |
|
|
|
Color shadowColor = null, |
|
|
|
Color selectedShadowColor = null, |
|
|
|
ShapeBorder avatarBorder = null |
|
|
|
) : base(key: key) { |
|
|
|
D.assert(selected != null); |
|
|
|
|
|
|
this._padding = padding; |
|
|
|
this._materialTapTargetSize = materialTapTargetSize; |
|
|
|
this._elevation = elevation; |
|
|
|
this._shadowColor = shadowColor; |
|
|
|
this._selectedShadowColor = selectedShadowColor; |
|
|
|
} |
|
|
|
|
|
|
|
public Widget avatar { |
|
|
|
|
|
|
|
|
|
|
float? _elevation; |
|
|
|
|
|
|
|
public Color shadowColor { |
|
|
|
get { return this._shadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _shadowColor; |
|
|
|
|
|
|
|
public Color selectedShadowColor { |
|
|
|
get { return this._selectedShadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _selectedShadowColor; |
|
|
|
|
|
|
|
public ShapeBorder avatarBorder { |
|
|
|
get { return this._avatarBorder; } |
|
|
|
} |
|
|
|
|
|
|
isEnabled: this.isEnabled, |
|
|
|
materialTapTargetSize: this.materialTapTargetSize, |
|
|
|
elevation: this.elevation, |
|
|
|
shadowColor: this.shadowColor, |
|
|
|
selectedShadowColor: this.selectedShadowColor, |
|
|
|
avatarBorder: this.avatarBorder |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
EdgeInsets padding = null, |
|
|
|
MaterialTapTargetSize? materialTapTargetSize = null, |
|
|
|
float? elevation = null, |
|
|
|
Color shadowColor = null, |
|
|
|
Color selectedShadowColor = null, |
|
|
|
ShapeBorder avatarBorder = null |
|
|
|
) : base(key: key) { |
|
|
|
D.assert(label != null); |
|
|
|
|
|
|
this._padding = padding; |
|
|
|
this._materialTapTargetSize = materialTapTargetSize; |
|
|
|
this._elevation = elevation; |
|
|
|
this._shadowColor = shadowColor; |
|
|
|
this._selectedShadowColor = selectedShadowColor; |
|
|
|
} |
|
|
|
|
|
|
|
public Widget avatar { |
|
|
|
|
|
|
|
|
|
|
float? _elevation; |
|
|
|
|
|
|
|
public Color shadowColor { |
|
|
|
get { return this._shadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _shadowColor; |
|
|
|
|
|
|
|
public Color selectedShadowColor { |
|
|
|
get { return this._selectedShadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _selectedShadowColor; |
|
|
|
|
|
|
|
public ShapeBorder avatarBorder { |
|
|
|
get { return this._avatarBorder; } |
|
|
|
} |
|
|
|
|
|
|
isEnabled: this.isEnabled, |
|
|
|
materialTapTargetSize: this.materialTapTargetSize, |
|
|
|
elevation: this.elevation, |
|
|
|
shadowColor: this.shadowColor, |
|
|
|
selectedShadowColor: this.selectedShadowColor, |
|
|
|
avatarBorder: this.avatarBorder |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
Color backgroundColor = null, |
|
|
|
EdgeInsets padding = null, |
|
|
|
MaterialTapTargetSize? materialTapTargetSize = null, |
|
|
|
float? elevation = null |
|
|
|
float? elevation = null, |
|
|
|
Color shadowColor = null |
|
|
|
) : base(key: key) { |
|
|
|
D.assert(label != null); |
|
|
|
D.assert( |
|
|
|
|
|
|
this._padding = padding; |
|
|
|
this._materialTapTargetSize = materialTapTargetSize; |
|
|
|
this._elevation = elevation; |
|
|
|
this._shadowColor = shadowColor; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float? _elevation; |
|
|
|
|
|
|
|
public Color shadowColor { |
|
|
|
get { return this._shadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _shadowColor; |
|
|
|
|
|
|
|
public override Widget build(BuildContext context) { |
|
|
|
D.assert(MaterialD.debugCheckHasMaterial(context)); |
|
|
|
return new RawChip( |
|
|
|
|
|
|
labelPadding: this.labelPadding, |
|
|
|
isEnabled: true, |
|
|
|
materialTapTargetSize: this.materialTapTargetSize, |
|
|
|
elevation: this.elevation |
|
|
|
elevation: this.elevation, |
|
|
|
shadowColor: this._shadowColor |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
Color backgroundColor = null, |
|
|
|
MaterialTapTargetSize? materialTapTargetSize = null, |
|
|
|
float? elevation = null, |
|
|
|
Color shadowColor = null, |
|
|
|
Color selectedShadowColor = null, |
|
|
|
ShapeBorder avatarBorder = null |
|
|
|
) : base(key: key) { |
|
|
|
D.assert(label != null); |
|
|
|
|
|
|
this._backgroundColor = backgroundColor; |
|
|
|
this._materialTapTargetSize = materialTapTargetSize; |
|
|
|
this._elevation = elevation; |
|
|
|
this._shadowColor = shadowColor; |
|
|
|
this._selectedShadowColor = selectedShadowColor; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float? _elevation; |
|
|
|
|
|
|
|
public Color shadowColor { |
|
|
|
get { return this._shadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _shadowColor; |
|
|
|
|
|
|
|
public Color selectedShadowColor { |
|
|
|
get { return this._selectedShadowColor; } |
|
|
|
} |
|
|
|
|
|
|
|
Color _selectedShadowColor; |
|
|
|
|
|
|
|
public ShapeBorder avatarBorder { |
|
|
|
get { return this._avatarBorder; } |
|
|
|
} |
|
|
|
|
|
|
ShapeBorder shape = this.widget.shape ?? chipTheme.shape; |
|
|
|
float elevation = this.widget.elevation ?? (chipTheme.elevation ?? _defaultElevation); |
|
|
|
float pressElevation = this.widget.pressElevation ?? (chipTheme.pressElevation ?? _defaultPressElevation); |
|
|
|
Color shadowColor = this.widget.shadowColor ?? chipTheme.shadowColor ?? _defaultShadowColor; |
|
|
|
Color selectedShadowColor = this.widget.selectedShadowColor ?? chipTheme.selectedShadowColor ?? _defaultShadowColor; |
|
|
|
bool selected = this.widget.selected ?? false; |
|
|
|
shadowColor: selected ? selectedShadowColor : shadowColor, |
|
|
|
child: new InkResponse( |
|
|
|
child: new InkWell( |
|
|
|
onTapCancel: this.canTap ? this._handleTapCancel : (GestureTapCallback) null, |
|
|
|
onTapCancel: this.canTap ? this._handleTapCancel : (GestureTapCancelCallback) null, |
|
|
|
customBorder: shape, |
|
|
|
child: new AnimatedBuilder( |
|
|
|
animation: ListenableUtils.merge(new List<Listenable> |
|
|
|
{this.selectController, this.enableController}), |
|
|
|