melhorar o navigation e o separar controlls e widgetes e pages

This commit is contained in:
2025-12-03 10:31:47 +00:00
parent e16191fa9d
commit dc3a7840bb
11 changed files with 545 additions and 473 deletions

View File

@@ -0,0 +1,47 @@
import 'package:flutter/material.dart';
class CustomNavBar extends StatelessWidget {
final int selectedIndex;
final Function(int) onItemSelected;
const CustomNavBar({
super.key,
required this.selectedIndex,
required this.onItemSelected,
});
@override
Widget build(BuildContext context) {
// Usar NavigationBar (Material 3) ao invés de BottomNavigationBar
return NavigationBar(
selectedIndex: selectedIndex,
onDestinationSelected: onItemSelected,
backgroundColor: Theme.of(context).colorScheme.surface,
surfaceTintColor: Theme.of(context).colorScheme.surfaceTint,
elevation: 1,
height: 70,
destinations: const [
NavigationDestination(
icon: Icon(Icons.home_outlined),
selectedIcon: Icon(Icons.home_filled),
label: 'Home',
),
NavigationDestination(
icon: Icon(Icons.sports_soccer_outlined),
selectedIcon: Icon(Icons.sports_soccer),
label: 'Jogo',
),
NavigationDestination(
icon: Icon(Icons.people_outline),
selectedIcon: Icon(Icons.people),
label: 'Equipas',
),
NavigationDestination(
icon: Icon(Icons.insights_outlined),
selectedIcon: Icon(Icons.insights),
label: 'Status',
),
],
);
}
}