Added a waaay better profile not found view

This commit is contained in:
2025-05-16 00:12:12 +02:00
parent 76c6dd2ddd
commit d103bdd279

View File

@@ -21,22 +21,53 @@ class ProfileScreen extends StatelessWidget {
if (snapshot.error.toString().contains('401')) { redirect_to_oauth(context); } if (snapshot.error.toString().contains('401')) { redirect_to_oauth(context); }
return Scaffold( return Scaffold(
body: Center( body: Center(
child: Column( child: Padding(
mainAxisSize: MainAxisSize.min, padding: const EdgeInsets.all(24.0),
children: [ child: Column(
const Text("This user does not exists or is hidden from you !"), mainAxisSize: MainAxisSize.min,
const SizedBox(height: 16), children: [
ElevatedButton( const Icon(
onPressed: () { Icons.error_outline,
Navigator.pushReplacementNamed(context, '/home'); color: Colors.redAccent,
}, size: 64,
child: const Text("Bring me back !!"), ),
), const SizedBox(height: 24),
], const Text(
"We couldn't find that user.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 8),
const Text(
"They might not exist or are currently hidden.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
color: Colors.black54,
),
),
const SizedBox(height: 32),
ElevatedButton.icon(
onPressed: () {
Navigator.pushReplacementNamed(context, '/home');
},
icon: const Icon(Icons.home),
label: const Text("Bring me back !!!"),
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
textStyle: const TextStyle(fontSize: 16),
),
),
],
),
), ),
), ),
); );
} }
if (snapshot.hasData && snapshot.connectionState == ConnectionState.done) { if (snapshot.hasData && snapshot.connectionState == ConnectionState.done) {