import 'package:flutter/material.dart';

class CustomButton extends StatelessWidget {
  const CustomButton({super.key, required this.label, required this.onPressed, this.isWhite});
  final String label;
  final VoidCallback onPressed;
  final bool? isWhite;


  @override
  Widget build(BuildContext context) {
    bool myColor = isWhite??false;
    return  Center(
        child: SizedBox(
          height: 48.0,
          width: 198.0,
          child: ElevatedButton(
            onPressed: onPressed,
            style: ElevatedButton.styleFrom(
              backgroundColor: !myColor ? const Color(0xFF128566):Color(Colors.white.value),
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(15.0),
              ),
            ),
            child: Text(
              label,
              style: TextStyle(
                fontSize: 24.0,
                fontWeight: FontWeight.bold,
                color: myColor?Color(0xFF595959):Colors.white,
              ),
            ),
          ),
        ));
  }
}
