todo_app/lib/features/todo/presentation/widgets/empty_todo_state.dart
PeterChrz 514adde721
Some checks failed
CI / Static Analysis (push) Failing after 2m7s
CI / Tests (push) Has been skipped
Initial commit: Flutter todo app with Riverpod
2026-08-04 23:40:54 -04:00

43 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
class EmptyTodoState extends StatelessWidget {
const EmptyTodoState({super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.checklist_outlined,
size: 64,
color: theme.colorScheme.onSurfaceVariant,
),
const SizedBox(height: 16),
Text(
'No todos yet',
style: theme.textTheme.titleMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
),
const SizedBox(height: 8),
Text(
'Tap + to create your first todo',
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
),
const SizedBox(height: 24),
FilledButton.tonal(
onPressed: () => context.push('/todo/new'),
child: const Text('Create Todo'),
),
],
),
);
}
}