refactor(full refactor): Рефакторинг стартера (#8)

This commit is contained in:
Yuri Petrov
2025-04-27 17:08:34 +03:00
committed by GitHub
parent 18eb7b1fe1
commit 5d7d29ecf8
206 changed files with 1065 additions and 20102 deletions

View File

@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:friflex_starter/app/app_context_ext.dart';
import 'package:friflex_starter/app/theme/app_colors_scheme.dart';
/// {@template ThemeScreen}
/// Экран для отладки темы приложения
/// {@endtemplate}
class ThemeScreen extends StatelessWidget {
/// {@macro ThemeScreen}
const ThemeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Theme')),
body: Center(
child: ListView(
padding: const EdgeInsets.all(16),
children: [
ElevatedButton(
onPressed: () {
context.theme.changeTheme();
},
child: const Text('Сменить тему'),
),
const SizedBox(height: 16),
ColoredBox(
color: context.colors.testColor,
child: const SizedBox(height: 100, width: 100),
),
const SizedBox(height: 16),
Text(
'Текущая тема: ${context.theme.themeMode}',
),
],
),
),
);
}
}