2025-11-17 11:51:42 +03:00
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
2025-01-21 14:24:31 +03:00
|
|
|
|
import 'package:flutter/material.dart';
|
2025-06-06 16:45:40 +03:00
|
|
|
|
import 'package:friflex_starter/app/ui_kit/app_box.dart';
|
2025-04-27 17:08:34 +03:00
|
|
|
|
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(
|
2025-05-28 16:38:56 +03:00
|
|
|
|
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
|
|
|
|
// Переход на экран с деталями
|
2025-11-17 11:51:42 +03:00
|
|
|
|
unawaited(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
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|