2025-01-21 14:24:31 +03:00
|
|
|
|
import 'package:flutter/material.dart';
|
2025-04-27 17:08:34 +03:00
|
|
|
|
import 'package:friflex_starter/app/app_box.dart';
|
|
|
|
|
|
import 'package:friflex_starter/features/main/presentation/main_routes.dart';
|
2025-02-26 13:40:43 +03:00
|
|
|
|
import 'package:go_router/go_router.dart';
|
2025-01-21 14:24:31 +03:00
|
|
|
|
|
2025-04-27 17:08:34 +03:00
|
|
|
|
/// {@template MainScreen}
|
|
|
|
|
|
/// Главный экран приложения
|
|
|
|
|
|
/// {@endtemplate}
|
2025-01-21 14:24:31 +03:00
|
|
|
|
class MainScreen extends StatelessWidget {
|
2025-04-27 17:08:34 +03:00
|
|
|
|
/// {@macro MainScreen}
|
2025-01-21 14:24:31 +03:00
|
|
|
|
const MainScreen({super.key});
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
|
title: const Text('Main Screen'),
|
2025-02-26 13:40:43 +03:00
|
|
|
|
),
|
|
|
|
|
|
body: Center(
|
|
|
|
|
|
child: Column(
|
2025-04-27 17:08:34 +03:00
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
2025-02-26 13:40:43 +03:00
|
|
|
|
children: [
|
2025-04-27 17:08:34 +03:00
|
|
|
|
const Text('Главный экран приложения'),
|
|
|
|
|
|
const HBox(16),
|
2025-02-26 13:40:43 +03:00
|
|
|
|
ElevatedButton(
|
|
|
|
|
|
onPressed: () {
|
2025-04-27 17:08:34 +03:00
|
|
|
|
// Переход на экран с деталями
|
|
|
|
|
|
context.pushNamed(MainRoutes.mainDetailScreenName);
|
2025-02-26 13:40:43 +03:00
|
|
|
|
},
|
2025-04-27 17:08:34 +03:00
|
|
|
|
child: const Text('Переход на экран с деталями'),
|
2025-02-26 13:40:43 +03:00
|
|
|
|
),
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
2025-01-21 14:24:31 +03:00
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|