buildErrorView function
- BuildContext context,
- String? errorMessage
Build error view for failed weather loading.
Implementation
Widget buildErrorView(BuildContext context, String? errorMessage) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.error_outline, size: 48, color: Colors.red),
const SizedBox(height: 16),
Text(
'Failed to load weather data',
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 8),
Text(
errorMessage ?? 'Unknown error',
style: Theme.of(context).textTheme.bodySmall,
textAlign: TextAlign.center,
),
],
);
}