40 lines
1.2 KiB
Dart
40 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm_educa_app/utils/colors.dart';
|
|
import 'package:rkm_educa_app/widgets/buttom_custom.dart';
|
|
import 'package:rkm_educa_app/widgets/text_custom.dart';
|
|
|
|
class AlertDefault{
|
|
alert(BuildContext context,String title,String textButtom,Widget subtitle,) {
|
|
|
|
double width = MediaQuery.of(context).size.width;
|
|
double height = MediaQuery.of(context).size.height;
|
|
|
|
return showDialog(
|
|
context: context,
|
|
builder: (context){
|
|
return AlertDialog(
|
|
title: TextCustom(
|
|
text: title,
|
|
color: Colors.black54,
|
|
textAlign: TextAlign.center,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
content: subtitle,
|
|
actions: [
|
|
ButtonCustom(
|
|
onPressed: ()=>Navigator.pop(context),
|
|
text: textButtom,
|
|
widthCustom: 0.2,
|
|
heightCustom: 0.05,
|
|
size: 14,
|
|
colorText: Colors.white,
|
|
colorBorder: PaletteColors.grey,
|
|
colorButton: PaletteColors.grey,
|
|
)
|
|
],
|
|
actionsAlignment: MainAxisAlignment.center,
|
|
);
|
|
}
|
|
);
|
|
}
|
|
} |