38 lines
968 B
Dart
38 lines
968 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../core/styles/app_color.dart';
|
|
|
|
class CustomErrorWidget extends StatelessWidget {
|
|
final String errorMessage;
|
|
|
|
const CustomErrorWidget({super.key, required this.errorMessage});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColor.plainWhite,
|
|
body: 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),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|