34 lines
841 B
Dart
34 lines
841 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class EmptyView extends StatelessWidget {
|
|
const EmptyView({
|
|
required this.title,
|
|
required this.message,
|
|
this.icon = Icons.inbox_outlined,
|
|
super.key,
|
|
});
|
|
|
|
final String title;
|
|
final String message;
|
|
final IconData icon;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Center(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(icon, size: 48, color: Theme.of(context).colorScheme.outline),
|
|
const SizedBox(height: 12),
|
|
Text(title, style: Theme.of(context).textTheme.titleMedium),
|
|
const SizedBox(height: 4),
|
|
Text(message, textAlign: TextAlign.center),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|