import 'package:flutter/material.dart'; import 'package:lucide_icons_flutter/lucide_icons.dart'; import '../theme/theme.dart'; /// Settled load failure with an explicit Retry. After a relay deadline, /// Riverpod does not auto-retry, so this is the user's way to re-send. class LoadErrorView extends StatelessWidget { final String message; final VoidCallback onRetry; const LoadErrorView({ super.key, required this.message, required this.onRetry, }); @override Widget build(BuildContext context) { return Center( child: Column( mainAxisSize: MainAxisSize.min, children: [ Icon( LucideIcons.triangleAlert, size: Grid.lg, color: context.colors.error, ), const SizedBox(height: Grid.xxs), Text( message, style: context.textTheme.bodyMedium?.copyWith( color: context.colors.onSurfaceVariant, ), ), const SizedBox(height: Grid.xs), FilledButton.icon( key: const ValueKey('load-error-retry'), onPressed: onRetry, icon: const Icon(LucideIcons.refreshCcw, size: 16), label: const Text('Retry'), ), ], ), ); } }