ajustes nos dados do contatos

This commit is contained in:
Reginaldo
2023-06-21 15:07:02 -03:00
parent 2d5722f0d6
commit 9eb271c905
7 changed files with 80 additions and 53 deletions

View File

@@ -2,39 +2,41 @@ import 'package:flutter/material.dart';
import 'package:rkm_educa_app/utils/cores.dart';
import 'package:rkm_educa_app/componentes/buttom_custom.dart';
import 'package:rkm_educa_app/componentes/text_custom.dart';
import 'package:rkm_educa_app/utils/dimensoes.dart';
class AlertDefault{
alert(BuildContext context,String title,String textButtom,Widget subtitle,) {
alert(BuildContext context,String title,String textButtom,Widget subtitle,double altura) {
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;
return showDialog(
return showGeneralDialog(
context: context,
builder: (context){
return AlertDialog(
title: TextCustom(
text: title,
color: Colors.black54,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
barrierDismissible: true,
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
barrierColor: Colors.black45,
transitionDuration: const Duration(milliseconds: 200),
pageBuilder: (BuildContext buildContext,Animation animation,Animation secondaryAnimation) {
return Container(
width: Dimensoes.width,
height: Dimensoes.height,
padding: EdgeInsets.all(20),
color: Colors.white,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
subtitle,
ButtonCustom(
onPressed: ()=>Navigator.pop(context),
text: textButtom,
widthCustom: 0.2,
heightCustom: 0.05,
size: 14,
colorText: Colors.white,
colorBorder: PaletaCores.cinza,
colorButton: PaletaCores.cinza,
)
],
),
content: subtitle,
actions: [
ButtonCustom(
onPressed: ()=>Navigator.pop(context),
text: textButtom,
widthCustom: 0.2,
heightCustom: 0.05,
size: 14,
colorText: Colors.white,
colorBorder: PaletaCores.cinza,
colorButton: PaletaCores.cinza,
)
],
actionsAlignment: MainAxisAlignment.center,
);
}
);
});
}
}

View File

@@ -9,7 +9,6 @@ class TextCustom extends StatelessWidget {
final fontWeight;
final textAlign;
final maxLines;
final underscore;
TextCustom({
required this.text,
@@ -18,7 +17,6 @@ class TextCustom extends StatelessWidget {
this.fontWeight = FontWeight.normal,
this.textAlign = TextAlign.start,
this.maxLines = 1,
this.underscore,
});
@override
@@ -32,9 +30,9 @@ class TextCustom extends StatelessWidget {
color: color,
fontSize: size,
fontWeight: fontWeight,
decoration: underscore,
decorationThickness: 4,
fontFamily: 'Nunito'
fontFamily: 'Nunito',
decoration: TextDecoration.none
),
maxLines: maxLines,
);