buildErrorState method
Implementation
Widget buildErrorState(BuildContext context, TListError error) {
if (errorStateBuilder != null) return errorStateBuilder!(context, error);
final colors = Theme.of(context).colorScheme;
return Center(
child: Padding(
padding: const EdgeInsets.all(32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.error_outline, size: 64, color: colors.error),
const SizedBox(height: 16),
Text(
errorStateMessage,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
color: colors.onSurface,
),
),
const SizedBox(height: 8),
Text(
error.message,
style: TextStyle(fontSize: 14, color: colors.onSurfaceVariant),
textAlign: TextAlign.center,
),
],
),
),
);
}