import 'package:flutter/material.dart';
import 'package:rkm_educa_app/utils/dimensoes.dart';

class AlertDefault{
  alert(BuildContext context,double altura,Widget subtitle) {

    return showGeneralDialog(
        context: context,
        barrierDismissible: true,
        barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
        barrierColor: Colors.black45,
        transitionDuration: const Duration(milliseconds: 200),
        pageBuilder: (BuildContext buildContext,Animation animation,Animation secondaryAnimation) {
          return Center(
            child: Card(
              elevation: 5,
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(15.0),
              ),
              child: Container(
                width: Dimensoes.width,
                height: Dimensoes.height*altura,
                padding: EdgeInsets.all(20),
                child: subtitle,
              ),
            ),
          );
        });
  }
}