30 lines
788 B
Dart
30 lines
788 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class EmptyView extends StatelessWidget {
|
|
const EmptyView({required this.title, this.message, super.key});
|
|
|
|
final String title;
|
|
final String? message;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Center(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
const Icon(Icons.inbox_rounded, size: 42),
|
|
const SizedBox(height: 12),
|
|
Text(title, style: Theme.of(context).textTheme.titleMedium),
|
|
if (message != null) ...[
|
|
const SizedBox(height: 8),
|
|
Text(message!, textAlign: TextAlign.center),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|