no internet, error screen

This commit is contained in:
jayesh
2024-06-12 12:02:46 +05:30
parent 6f75d913b7
commit 240a73de0c
9 changed files with 148 additions and 5 deletions

View File

@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
class CustomErrorWidget extends StatelessWidget {
final String errorMessage;
const CustomErrorWidget({super.key, required this.errorMessage});
@override
Widget build(BuildContext context) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(
Icons.error_outline,
color: Colors.red,
size: 50.0,
),
const SizedBox(height: 10.0),
const Text(
'Error Occurred!',
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
),
const SizedBox(height: 10.0),
Text(
errorMessage,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16.0),
),
],
),
);
}
}