import 'package:flutter/material.dart'; import 'package:wyatt_ui_kit/wyatt_ui_kit.dart' as ui_kit; class CustomCardColorExtension extends ui_kit.CardThemeExtension { const CustomCardColorExtension({ super.backgroundColors, super.secondaryBackgroundColors, super.borderColor, super.shadowColor, super.body, super.title, super.subtitle, }); @override CustomCardColorExtension copyWith({ List? backgroundColors, Color? secondaryBackgroundColors, List? borderColor, BoxShadow? shadowColor, TextStyle? body, TextStyle? title, TextStyle? subtitle, }) => CustomCardColorExtension( backgroundColors: backgroundColors ?? this.backgroundColors, secondaryBackgroundColors: secondaryBackgroundColors ?? this.secondaryBackgroundColors, borderColor: borderColor ?? this.borderColor, body: body ?? this.body, title: title ?? this.title, subtitle: subtitle ?? this.subtitle, ); @override ThemeExtension lerp( covariant ThemeExtension? other, double t, ) { if (other is! CustomCardColorExtension) { return this; } return CustomCardColorExtension( secondaryBackgroundColors: Color.lerp( secondaryBackgroundColors, other.secondaryBackgroundColors, t, ), body: TextStyle.lerp(body, other.body, t), title: TextStyle.lerp(title, other.title, t), subtitle: TextStyle.lerp(subtitle, other.subtitle, t), ); } }