import 'package:flutter/material.dart';
import 'package:wyatt_component_copy_with_extension/component_copy_with_extension.dart';
import 'package:wyatt_ui_components/wyatt_wyatt_ui_components.dart';

part 'custom_error_widget.g.dart';

@ComponentCopyWithExtension()
class CustomErrorWidget extends ErrorWidgetComponent
    with $CustomErrorWidgetCWMixin {
  const CustomErrorWidget({super.error, super.key});

  @override
  Widget build(BuildContext context) => ColoredBox(
        color: Colors.red,
        child: Center(child: Text(error?.text ?? 'Error')),
      );
}
