mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2025-12-22 09:30:45 +00:00
fix: исправил ширину строки
This commit is contained in:
@@ -56,13 +56,19 @@ class AppColors extends ThemeExtension<AppColors> with DiagnosticableTreeMixin {
|
||||
Color? infoSnackbarBackground,
|
||||
}) => AppColors(
|
||||
testColor: testColor ?? this.testColor,
|
||||
errorSnackbarBackground: errorSnackbarBackground ?? this.errorSnackbarBackground,
|
||||
successSnackbarBackground: successSnackbarBackground ?? this.successSnackbarBackground,
|
||||
infoSnackbarBackground: infoSnackbarBackground ?? this.infoSnackbarBackground,
|
||||
errorSnackbarBackground:
|
||||
errorSnackbarBackground ?? this.errorSnackbarBackground,
|
||||
successSnackbarBackground:
|
||||
successSnackbarBackground ?? this.successSnackbarBackground,
|
||||
infoSnackbarBackground:
|
||||
infoSnackbarBackground ?? this.infoSnackbarBackground,
|
||||
);
|
||||
|
||||
@override
|
||||
ThemeExtension<AppColors> lerp(covariant ThemeExtension<AppColors>? other, double t) {
|
||||
ThemeExtension<AppColors> lerp(
|
||||
covariant ThemeExtension<AppColors>? other,
|
||||
double t,
|
||||
) {
|
||||
if (other is! AppColors) return this;
|
||||
|
||||
return AppColors(
|
||||
@@ -77,7 +83,11 @@ class AppColors extends ThemeExtension<AppColors> with DiagnosticableTreeMixin {
|
||||
other.successSnackbarBackground,
|
||||
t,
|
||||
)!,
|
||||
infoSnackbarBackground: Color.lerp(infoSnackbarBackground, other.infoSnackbarBackground, t)!,
|
||||
infoSnackbarBackground: Color.lerp(
|
||||
infoSnackbarBackground,
|
||||
other.infoSnackbarBackground,
|
||||
t,
|
||||
)!,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@ import 'package:friflex_starter/app/theme/app_colors_scheme.dart';
|
||||
/// Класс для конфигурации светлой/темной темы приложения
|
||||
abstract class AppTheme {
|
||||
/// Геттер для получения светлой темы
|
||||
static ThemeData get light =>
|
||||
ThemeData.light().copyWith(extensions: <ThemeExtension<Object?>>[AppColors.light]);
|
||||
static ThemeData get light => ThemeData.light().copyWith(
|
||||
extensions: <ThemeExtension<Object?>>[AppColors.light],
|
||||
);
|
||||
|
||||
/// Геттер для получения темной темы
|
||||
static ThemeData get dark =>
|
||||
ThemeData.dark().copyWith(extensions: <ThemeExtension<Object?>>[AppColors.dark]);
|
||||
static ThemeData get dark => ThemeData.dark().copyWith(
|
||||
extensions: <ThemeExtension<Object?>>[AppColors.dark],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user