feat: delete back button from main home screens

This commit is contained in:
sBubshait 2025-07-21 10:17:12 +03:00
parent 87c4072d92
commit fa626992dc
3 changed files with 26 additions and 21 deletions

View File

@ -76,6 +76,7 @@ class _FeedPageState extends State<FeedPage> {
preferredSize: Size.fromHeight(1), preferredSize: Size.fromHeight(1),
child: Container(height: 1, color: Colors.grey[200]), child: Container(height: 1, color: Colors.grey[200]),
), ),
automaticallyImplyLeading: false,
), ),
body: RefreshIndicator( body: RefreshIndicator(
onRefresh: () async { onRefresh: () async {

View File

@ -79,6 +79,7 @@ class _InvitationsPageState extends State<InvitationsPage> {
preferredSize: Size.fromHeight(1), preferredSize: Size.fromHeight(1),
child: Container(height: 1, color: Colors.grey[200]), child: Container(height: 1, color: Colors.grey[200]),
), ),
automaticallyImplyLeading: false,
), ),
body: Padding( body: Padding(
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
@ -256,7 +257,9 @@ class _InvitationsPageState extends State<InvitationsPage> {
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
onPressed: () { onPressed: () {
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Create invitation functionality coming soon!')), SnackBar(
content: Text('Create invitation functionality coming soon!'),
),
); );
}, },
backgroundColor: Color(0xFF6A4C93), backgroundColor: Color(0xFF6A4C93),

View File

@ -107,10 +107,7 @@ class _ProfilePageState extends State<ProfilePage> {
actions: [ actions: [
TextButton( TextButton(
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
child: Text( child: Text('OK', style: TextStyle(color: Color(0xFF6A4C93))),
'OK',
style: TextStyle(color: Color(0xFF6A4C93)),
),
), ),
], ],
), ),
@ -163,14 +160,18 @@ class _ProfilePageState extends State<ProfilePage> {
children: [ children: [
if (isLoadingUser) if (isLoadingUser)
CircularProgressIndicator( CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFF6A4C93)), valueColor: AlwaysStoppedAnimation<Color>(
Color(0xFF6A4C93),
),
) )
else if (userData != null) ...[ else if (userData != null) ...[
CircleAvatar( CircleAvatar(
radius: 50, radius: 50,
backgroundColor: Color(0xFF6A4C93), backgroundColor: Color(0xFF6A4C93),
child: Text( child: Text(
(userData!['displayName'] ?? 'U').substring(0, 1).toUpperCase(), (userData!['displayName'] ?? 'U')
.substring(0, 1)
.toUpperCase(),
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 36, fontSize: 36,
@ -201,10 +202,7 @@ class _ProfilePageState extends State<ProfilePage> {
SizedBox(height: 16), SizedBox(height: 16),
Text( Text(
'Failed to load user data', 'Failed to load user data',
style: TextStyle( style: TextStyle(fontSize: 18, color: Colors.grey[600]),
fontSize: 18,
color: Colors.grey[600],
),
), ),
SizedBox(height: 8), SizedBox(height: 8),
ElevatedButton( ElevatedButton(
@ -302,7 +300,9 @@ class _ProfilePageState extends State<ProfilePage> {
radius: 16, radius: 16,
backgroundColor: Color(0xFF6A4C93), backgroundColor: Color(0xFF6A4C93),
child: Text( child: Text(
(userData!['displayName'] ?? 'U').substring(0, 1).toUpperCase(), (userData!['displayName'] ?? 'U')
.substring(0, 1)
.toUpperCase(),
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -316,7 +316,8 @@ class _ProfilePageState extends State<ProfilePage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
userData!['displayName'] ?? 'Unknown User', userData!['displayName'] ??
'Unknown User',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
@ -468,10 +469,9 @@ class _SettingsPageState extends State<SettingsPage> {
await AuthService.logout(); await AuthService.logout();
Navigator.of(context).pushNamedAndRemoveUntil( Navigator.of(
'/', context,
(route) => false, ).pushNamedAndRemoveUntil('/', (route) => false);
);
}, },
child: Text('Sign Out', style: TextStyle(color: Colors.red)), child: Text('Sign Out', style: TextStyle(color: Colors.red)),
), ),
@ -493,6 +493,7 @@ class _SettingsPageState extends State<SettingsPage> {
preferredSize: Size.fromHeight(1), preferredSize: Size.fromHeight(1),
child: Container(height: 1, color: Colors.grey[200]), child: Container(height: 1, color: Colors.grey[200]),
), ),
automaticallyImplyLeading: false,
), ),
body: Padding( body: Padding(
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),