mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2026-02-05 11:42:17 +00:00
feat(theme): Добавить ThemeExtension для токенов цвета (#12)
* feat * fix * fix: исправил ширину строки * feat: добавить визуальный элемент
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:friflex_starter/app/theme/app_colors_scheme.dart';
|
||||
import 'package:friflex_starter/app/theme/theme_notifier.dart';
|
||||
import 'package:friflex_starter/di/di_container.dart';
|
||||
import 'package:friflex_starter/l10n/gen/app_localizations.dart';
|
||||
@@ -11,7 +12,7 @@ extension AppContextExt on BuildContext {
|
||||
DiContainer get di => read<DiContainer>();
|
||||
|
||||
/// Геттер для получения цветовой схемы
|
||||
ColorScheme get colors => Theme.of(this).colorScheme;
|
||||
AppColors get colors => Theme.of(this).extension<AppColors>()!;
|
||||
|
||||
/// Геттер для получения темы
|
||||
ThemeNotifier get theme => read<ThemeNotifier>();
|
||||
|
||||
Reference in New Issue
Block a user