
import 'package:flutter/material.dart';
import 'package:mc_common_app/extensions/int_extensions.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/widgets/button/show_fill_button.dart';

class MessageDialog extends StatelessWidget {
  String? title, buttonTitle;
  VoidCallback? onClick;

  MessageDialog({this.title, this.buttonTitle, this.onClick});

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      padding: EdgeInsets.all(30),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          (title ?? "message").toText(height: 23 / 24, fontSize: 24, letterSpacing: -1.44,),
          40.height,
          ShowFillButton(
            title: buttonTitle ?? "Continue",
            maxWidth: double.infinity,
            onPressed: () {
              onClick!();
            },
          )
        ],
      ),
    );
  }
}
