mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 09:47:35 +00:00
22 lines
510 B
Dart
22 lines
510 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class InfoTheme extends ThemeExtension<InfoTheme> {
|
||
|
final Color textColor;
|
||
|
|
||
|
InfoTheme({required this.textColor});
|
||
|
|
||
|
@override
|
||
|
InfoTheme copyWith({Color? textColor}) =>
|
||
|
InfoTheme(textColor: textColor ?? this.textColor);
|
||
|
|
||
|
@override
|
||
|
InfoTheme lerp(ThemeExtension<InfoTheme>? other, double t) {
|
||
|
if (other is! InfoTheme) {
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
return InfoTheme(
|
||
|
textColor: Color.lerp(textColor, other.textColor, t) ?? textColor);
|
||
|
}
|
||
|
}
|