mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-25 04:59:33 +00:00
31 lines
998 B
Dart
31 lines
998 B
Dart
|
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);
|
||
|
}
|
||
|
}
|