Added a waaay better profile not found view
This commit is contained in:
@@ -21,22 +21,53 @@ class ProfileScreen extends StatelessWidget {
|
||||
if (snapshot.error.toString().contains('401')) { redirect_to_oauth(context); }
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text("This user does not exists or is hidden from you !"),
|
||||
const SizedBox(height: 16),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushReplacementNamed(context, '/home');
|
||||
},
|
||||
child: const Text("Bring me back !!"),
|
||||
),
|
||||
],
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.error_outline,
|
||||
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: () {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user