import 'package:flutter/material.dart'; class TabloTheme extends ThemeExtension { final Color? titleTextColor; final Color? titleBackgroundColor; final Color? dataTextColor; final Color? dataErrorTextColor; final Color? dataSuccesTextColor; final Color? veriArkaRengi; final Color? infoBackgroundColor; final Color? infoTextColor; TabloTheme({ this.titleTextColor, this.dataTextColor, this.titleBackgroundColor, this.veriArkaRengi, this.dataSuccesTextColor, this.dataErrorTextColor, this.infoBackgroundColor, this.infoTextColor, }); @override ThemeExtension copyWith({ Color? baslikYaziRengi, Color? baslikArkaRengi, Color? veriYaziRengi, Color? veriGecerliYaziRengi, Color? veriHataliYaziRengi, Color? veriArkaRengi, Color? infoBackgroundColor, Color? infoTextColor, }) { return TabloTheme( titleTextColor: baslikYaziRengi ?? this.titleTextColor, titleBackgroundColor: baslikArkaRengi ?? this.titleBackgroundColor, dataTextColor: veriYaziRengi ?? this.dataTextColor, dataSuccesTextColor: veriGecerliYaziRengi ?? this.dataSuccesTextColor, dataErrorTextColor: veriHataliYaziRengi ?? this.dataErrorTextColor, veriArkaRengi: veriArkaRengi ?? this.veriArkaRengi, infoBackgroundColor: infoBackgroundColor ?? this.infoBackgroundColor, infoTextColor: infoTextColor ?? this.infoTextColor, ); } @override ThemeExtension lerp(covariant ThemeExtension? other, double t) { if (other is! TabloTheme) { return this; } return TabloTheme( titleTextColor: Color.lerp(titleTextColor, other.titleTextColor, t), titleBackgroundColor: Color.lerp(titleBackgroundColor, other.titleBackgroundColor, t), dataTextColor: Color.lerp(dataTextColor, other.dataTextColor, t), dataSuccesTextColor: Color.lerp(dataSuccesTextColor, other.dataSuccesTextColor, t), dataErrorTextColor: Color.lerp(dataErrorTextColor, other.dataErrorTextColor, t), veriArkaRengi: Color.lerp(veriArkaRengi, other.veriArkaRengi, t), infoBackgroundColor: Color.lerp(infoBackgroundColor, other.infoBackgroundColor, t), infoTextColor: Color.lerp(infoTextColor, other.infoTextColor, t), ); } }