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: Padding(
padding: const EdgeInsets.all(24.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
const Text("This user does not exists or is hidden from you !"), const Icon(
const SizedBox(height: 16), Icons.error_outline,
ElevatedButton( color: Colors.redAccent,
size: 64,
),
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: () { onPressed: () {
Navigator.pushReplacementNamed(context, '/home'); Navigator.pushReplacementNamed(context, '/home');
}, },
child: const Text("Bring me back !!"), 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) {