import 'package:flutter/material.dart'; class ShimmerColorTheme extends ThemeExtension { final Color? shimmerColor; final Color? shimmerBackgroundColor; ShimmerColorTheme({ this.shimmerBackgroundColor, this.shimmerColor, }); @override ThemeExtension copyWith( {Color? shimmerColor, Color? shimmerBackgroundColor}) { return ShimmerColorTheme( shimmerBackgroundColor: shimmerBackgroundColor ?? this.shimmerBackgroundColor, shimmerColor: shimmerColor ?? this.shimmerColor, ); } @override ThemeExtension lerp( ThemeExtension? other, double t) { if (other is! ShimmerColorTheme) { return this; } return ShimmerColorTheme( shimmerBackgroundColor: Color.lerp(shimmerBackgroundColor, other.shimmerBackgroundColor, t), shimmerColor: Color.lerp(shimmerColor, other.shimmerColor, t), ); } }