mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-25 13:09:32 +00:00
29 lines
916 B
Dart
29 lines
916 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class TransactionTradeTheme extends ThemeExtension<TransactionTradeTheme> {
|
|
final Color detailsTitlesColor;
|
|
final Color rowsColor;
|
|
|
|
TransactionTradeTheme(
|
|
{required this.detailsTitlesColor, required this.rowsColor});
|
|
|
|
@override
|
|
TransactionTradeTheme copyWith(
|
|
{Color? detailsTitlesColor, Color? rowsColor}) =>
|
|
TransactionTradeTheme(
|
|
detailsTitlesColor: detailsTitlesColor ?? this.detailsTitlesColor,
|
|
rowsColor: rowsColor ?? this.rowsColor);
|
|
|
|
@override
|
|
TransactionTradeTheme lerp(
|
|
ThemeExtension<TransactionTradeTheme>? other, double t) {
|
|
if (other is! TransactionTradeTheme) {
|
|
return this;
|
|
}
|
|
|
|
return TransactionTradeTheme(
|
|
detailsTitlesColor:
|
|
Color.lerp(detailsTitlesColor, other.detailsTitlesColor, t)!,
|
|
rowsColor: Color.lerp(rowsColor, other.rowsColor, t)!);
|
|
}
|
|
}
|