import 'package:flutter/material.dart';

class ErrorContainer extends MessageContainer {
  const ErrorContainer({super.key, required super.message})
    : super(color: Colors.deepOrangeAccent);
}

class SuccessContainer extends MessageContainer {
  const SuccessContainer({super.key, required super.message})
    : super(color: Colors.greenAccent);
}

class MessageContainer extends StatelessWidget {
  final String message;
  final Color color;

  const MessageContainer({
    super.key,
    required this.message,
    this.color = Colors.deepOrange,
  });

  @override
  Widget build(BuildContext context) {
    return DecoratedBox(
      decoration: BoxDecoration(color: color),
      child: Center(child: Text(message)),
    );
  }
}
