feat: add a puzzle new page
This commit is contained in:
parent
8d730c7c15
commit
2b64d4ad50
@ -14,7 +14,12 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
int _currentIndex = 0;
|
int _currentIndex = 0;
|
||||||
int _availableInvitationsCount = 0;
|
int _availableInvitationsCount = 0;
|
||||||
|
|
||||||
final List<Widget> _pages = [FeedPage(), InvitationsPage(), WordlePage(), ProfilePage()];
|
final List<Widget> _pages = [
|
||||||
|
FeedPage(),
|
||||||
|
InvitationsPage(),
|
||||||
|
WordlePage(),
|
||||||
|
ProfilePage(),
|
||||||
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -57,12 +62,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
),
|
),
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(minWidth: 16, minHeight: 16),
|
||||||
minWidth: 16,
|
|
||||||
minHeight: 16,
|
|
||||||
),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
_availableInvitationsCount > 99 ? '99+' : '$_availableInvitationsCount',
|
_availableInvitationsCount > 99
|
||||||
|
? '99+'
|
||||||
|
: '$_availableInvitationsCount',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
@ -109,13 +113,22 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
items: [
|
items: [
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Feed'),
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.home),
|
||||||
|
label: 'Feed',
|
||||||
|
),
|
||||||
BottomNavigationBarItem(
|
BottomNavigationBarItem(
|
||||||
icon: _buildInvitationsBadge(),
|
icon: _buildInvitationsBadge(),
|
||||||
label: 'Invitations',
|
label: 'Invitations',
|
||||||
),
|
),
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.games), label: 'Puzzles'),
|
BottomNavigationBarItem(
|
||||||
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Profile'),
|
icon: Icon(Icons.games),
|
||||||
|
label: 'Puzzles',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.person),
|
||||||
|
label: 'Profile',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user