mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2026-02-05 03:32:18 +00:00
init
This commit is contained in:
32
lib/features/root/root_screen.dart
Normal file
32
lib/features/root/root_screen.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
/// Класс для реализации корневой страницы приложения
|
||||
class RootScreen extends StatelessWidget {
|
||||
/// Создает корневую страницу приложения
|
||||
///
|
||||
/// Принимает:
|
||||
/// - [navigationShell] - текущая ветка навигации
|
||||
const RootScreen({
|
||||
super.key,
|
||||
required this.navigationShell,
|
||||
});
|
||||
|
||||
/// Текущая ветка навигации
|
||||
final StatefulNavigationShell navigationShell;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: navigationShell,
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
items: const <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.bug_report), label: 'Debug'),
|
||||
],
|
||||
currentIndex: navigationShell.currentIndex,
|
||||
onTap: navigationShell.goBranch,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user