mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 18:07:44 +00:00
21 lines
524 B
Dart
21 lines
524 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class PlaceholderTheme extends ThemeExtension<PlaceholderTheme> {
|
||
|
final Color color;
|
||
|
|
||
|
PlaceholderTheme({required this.color});
|
||
|
|
||
|
@override
|
||
|
PlaceholderTheme copyWith({Color? color}) =>
|
||
|
PlaceholderTheme(color: color ?? this.color);
|
||
|
|
||
|
@override
|
||
|
PlaceholderTheme lerp(ThemeExtension<PlaceholderTheme>? other, double t) {
|
||
|
if (other is! PlaceholderTheme) {
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
return PlaceholderTheme(color: Color.lerp(color, other.color, t) ?? color);
|
||
|
}
|
||
|
}
|