mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2025-12-22 01:20:46 +00:00
refactor(full refactor): Рефакторинг стартера (#8)
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:friflex_starter/app/app_box.dart';
|
||||
import 'package:friflex_starter/features/main/presentation/main_routes.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
/// {@template MainScreen}
|
||||
/// Главный экран приложения
|
||||
/// {@endtemplate}
|
||||
class MainScreen extends StatelessWidget {
|
||||
/// {@macro MainScreen}
|
||||
const MainScreen({super.key});
|
||||
|
||||
@override
|
||||
@@ -12,20 +18,16 @@ class MainScreen extends StatelessWidget {
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text('Главный экран приложения'),
|
||||
const HBox(16),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
context.push('/profile');
|
||||
// Переход на экран с деталями
|
||||
context.pushNamed(MainRoutes.mainDetailScreenName);
|
||||
},
|
||||
child: const Text('Открыть профиль'),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
context.push('/profile_scope');
|
||||
},
|
||||
child: const Text('Открыть профиль с областью видимости'),
|
||||
child: const Text('Переход на экран с деталями'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user