mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2026-02-05 11:42:17 +00:00
refactor(full refactor): Рефакторинг стартера (#8)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:friflex_starter/app/app_context_ext.dart';
|
||||
import 'package:friflex_starter/app/app_env.dart';
|
||||
import 'package:friflex_starter/features/debug/debug_routes.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
/// Класс для реализации корневой страницы приложения
|
||||
@@ -18,11 +21,19 @@ class RootScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
floatingActionButton: context.di.env != AppEnv.prod
|
||||
? FloatingActionButton(
|
||||
child: const Icon(Icons.bug_report),
|
||||
onPressed: () {
|
||||
context.pushNamed(DebugRoutes.debugScreenName);
|
||||
},
|
||||
)
|
||||
: null,
|
||||
body: navigationShell,
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
items: const <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.bug_report), label: 'Debug'),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Профиль'),
|
||||
],
|
||||
currentIndex: navigationShell.currentIndex,
|
||||
onTap: navigationShell.goBranch,
|
||||
|
||||
Reference in New Issue
Block a user