feat: delete back button from main home screens
This commit is contained in:
parent
87c4072d92
commit
fa626992dc
@ -76,6 +76,7 @@ class _FeedPageState extends State<FeedPage> {
|
||||
preferredSize: Size.fromHeight(1),
|
||||
child: Container(height: 1, color: Colors.grey[200]),
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
),
|
||||
body: RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
|
||||
@ -79,6 +79,7 @@ class _InvitationsPageState extends State<InvitationsPage> {
|
||||
preferredSize: Size.fromHeight(1),
|
||||
child: Container(height: 1, color: Colors.grey[200]),
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
@ -256,7 +257,9 @@ class _InvitationsPageState extends State<InvitationsPage> {
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('Create invitation functionality coming soon!')),
|
||||
SnackBar(
|
||||
content: Text('Create invitation functionality coming soon!'),
|
||||
),
|
||||
);
|
||||
},
|
||||
backgroundColor: Color(0xFF6A4C93),
|
||||
|
||||
@ -86,7 +86,7 @@ class _ProfilePageState extends State<ProfilePage> {
|
||||
});
|
||||
|
||||
final result = await UserService.getCurrentUser();
|
||||
|
||||
|
||||
setState(() {
|
||||
isLoadingUser = false;
|
||||
if (result['success'] == true) {
|
||||
@ -107,10 +107,7 @@ class _ProfilePageState extends State<ProfilePage> {
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(
|
||||
'OK',
|
||||
style: TextStyle(color: Color(0xFF6A4C93)),
|
||||
),
|
||||
child: Text('OK', style: TextStyle(color: Color(0xFF6A4C93))),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -163,14 +160,18 @@ class _ProfilePageState extends State<ProfilePage> {
|
||||
children: [
|
||||
if (isLoadingUser)
|
||||
CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFF6A4C93)),
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Color(0xFF6A4C93),
|
||||
),
|
||||
)
|
||||
else if (userData != null) ...[
|
||||
CircleAvatar(
|
||||
radius: 50,
|
||||
backgroundColor: Color(0xFF6A4C93),
|
||||
child: Text(
|
||||
(userData!['displayName'] ?? 'U').substring(0, 1).toUpperCase(),
|
||||
(userData!['displayName'] ?? 'U')
|
||||
.substring(0, 1)
|
||||
.toUpperCase(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 36,
|
||||
@ -201,10 +202,7 @@ class _ProfilePageState extends State<ProfilePage> {
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'Failed to load user data',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
style: TextStyle(fontSize: 18, color: Colors.grey[600]),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
ElevatedButton(
|
||||
@ -302,7 +300,9 @@ class _ProfilePageState extends State<ProfilePage> {
|
||||
radius: 16,
|
||||
backgroundColor: Color(0xFF6A4C93),
|
||||
child: Text(
|
||||
(userData!['displayName'] ?? 'U').substring(0, 1).toUpperCase(),
|
||||
(userData!['displayName'] ?? 'U')
|
||||
.substring(0, 1)
|
||||
.toUpperCase(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
@ -316,7 +316,8 @@ class _ProfilePageState extends State<ProfilePage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
userData!['displayName'] ?? 'Unknown User',
|
||||
userData!['displayName'] ??
|
||||
'Unknown User',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14,
|
||||
@ -465,13 +466,12 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
|
||||
await AuthService.logout();
|
||||
|
||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||
'/',
|
||||
(route) => false,
|
||||
);
|
||||
|
||||
Navigator.of(
|
||||
context,
|
||||
).pushNamedAndRemoveUntil('/', (route) => false);
|
||||
},
|
||||
child: Text('Sign Out', style: TextStyle(color: Colors.red)),
|
||||
),
|
||||
@ -493,6 +493,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
preferredSize: Size.fromHeight(1),
|
||||
child: Container(height: 1, color: Colors.grey[200]),
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
@ -603,4 +604,4 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user