import 'package:flutter/cupertino.dart';

class PlayerButton extends StatelessWidget {
  final String title;
  final Function? onPressed;

  const PlayerButton(this.title, this.onPressed, {super.key});

  @override
  Widget build(BuildContext context) {
    return Expanded(
        child: CupertinoButton(
            padding: const EdgeInsets.symmetric(vertical: 13, horizontal: 10),
            borderRadius: const BorderRadius.all(Radius.circular(10)),
            color: CupertinoColors.link,
            child: Text(title,
                textAlign: TextAlign.center,
                style: const TextStyle(
                    decoration: TextDecoration.none,
                    color: CupertinoColors.white,
                    fontWeight: FontWeight.w500)
            ),
            onPressed: () {
              if (onPressed != null) {
                onPressed!();
              }
            }
        )
    );
  }
}
