cake_wallet/lib/themes/extensions/indicator_dot_theme.dart

31 lines
998 B
Dart
Raw Normal View History

2023-07-03 20:37:38 +00:00
import 'package:flutter/material.dart';
class IndicatorDotTheme extends ThemeExtension<IndicatorDotTheme> {
final Color indicatorColor;
final Color activeIndicatorColor;
IndicatorDotTheme(
{required this.indicatorColor, required this.activeIndicatorColor});
@override
IndicatorDotTheme copyWith(
{Color? indicatorColor, Color? actionButtonColor}) =>
IndicatorDotTheme(
indicatorColor: indicatorColor ?? this.indicatorColor,
activeIndicatorColor: actionButtonColor ?? this.activeIndicatorColor);
@override
IndicatorDotTheme lerp(ThemeExtension<IndicatorDotTheme>? other, double t) {
if (other is! IndicatorDotTheme) {
return this;
}
return IndicatorDotTheme(
indicatorColor: Color.lerp(indicatorColor, other.indicatorColor, t) ??
indicatorColor,
activeIndicatorColor:
Color.lerp(activeIndicatorColor, other.activeIndicatorColor, t) ??
activeIndicatorColor);
}
}