public bool Equals(CardTheme other) { return(other.clipBehavior == this.clipBehavior && other.color == this.color && other.elevation == this.elevation && other.margin == this.margin && other.shape == this.shape); }
public bool Equals(CardTheme other) { return(other.clipBehavior == clipBehavior && other.color == color && other.shadowColor == shadowColor && other.elevation == elevation && other.margin == margin && other.shape == shape); }
public static CardTheme lerp(CardTheme a, CardTheme b, float t) { return(new CardTheme( clipBehavior: t < 0.5f ? a?.clipBehavior : b?.clipBehavior, color: Color.lerp(a?.color, b?.color, t), elevation: MathUtils.lerpFloat(a?.elevation ?? 0.0f, b?.elevation ?? 0.0f, t), margin: EdgeInsets.lerp(a?.margin, b?.margin, t), shape: ShapeBorder.lerp(a?.shape, b?.shape, t) )); }
public override Widget build(BuildContext context) { CardTheme cardTheme = CardTheme.of(context); return(new Container( margin: this.margin ?? cardTheme.margin ?? EdgeInsets.all(4.0f), child: new Material( type: MaterialType.card, color: this.color ?? cardTheme.color ?? Theme.of(context).cardColor, elevation: this.elevation ?? cardTheme.elevation ?? _defaultElevation, shape: this.shape ?? cardTheme.shape ?? new RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(4.0f)) ), borderOnForeground: this.borderOnForeground, clipBehavior: this.clipBehavior ?? cardTheme.clipBehavior ?? _defaultClipBehavior, child: this.child) )); }