feat: add a puzzle new page

This commit is contained in:
sBubshait 2025-08-03 12:52:59 +03:00
parent 8d730c7c15
commit 2b64d4ad50

View File

@ -14,7 +14,12 @@ class _HomeScreenState extends State<HomeScreen> {
int _currentIndex = 0;
int _availableInvitationsCount = 0;
final List<Widget> _pages = [FeedPage(), InvitationsPage(), WordlePage(), ProfilePage()];
final List<Widget> _pages = [
FeedPage(),
InvitationsPage(),
WordlePage(),
ProfilePage(),
];
@override
void initState() {
@ -57,12 +62,11 @@ class _HomeScreenState extends State<HomeScreen> {
color: Colors.red,
borderRadius: BorderRadius.circular(10),
),
constraints: BoxConstraints(
minWidth: 16,
minHeight: 16,
),
constraints: BoxConstraints(minWidth: 16, minHeight: 16),
child: Text(
_availableInvitationsCount > 99 ? '99+' : '$_availableInvitationsCount',
_availableInvitationsCount > 99
? '99+'
: '$_availableInvitationsCount',
style: TextStyle(
color: Colors.white,
fontSize: 10,
@ -109,13 +113,22 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundColor: Colors.transparent,
elevation: 0,
items: [
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Feed'),
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Feed',
),
BottomNavigationBarItem(
icon: _buildInvitationsBadge(),
label: 'Invitations',
),
BottomNavigationBarItem(icon: Icon(Icons.games), label: 'Puzzles'),
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Profile'),
BottomNavigationBarItem(
icon: Icon(Icons.games),
label: 'Puzzles',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
),
),