novo projeto

This commit is contained in:
Reginaldo
2023-05-24 18:43:37 -03:00
parent aa5c2a9423
commit ddacba5525
135 changed files with 4759 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
import 'package:flutter/material.dart';
class ButtonCustom extends StatelessWidget{
final VoidCallback onPressed;
final String text;
final double size;
final Color colorButton;
final Color colorText;
final Color colorBorder;
final widthCustom;
final heightCustom;
final font;
const ButtonCustom(
{Key? key,
required this.font,
required this.onPressed,
required this.text,
required this.size,
required this.colorButton,
required this.colorText,
required this.colorBorder,
this.widthCustom = 1.0,
this.heightCustom = 1.0
}) : super(key: key);
@override
Widget build (BuildContext context) {
double width =MediaQuery.of(context).size.width;
double height =MediaQuery.of(context).size.height;
return ElevatedButton(
style: ElevatedButton.styleFrom(
primary: colorButton,
minimumSize: Size(width*widthCustom! , height*heightCustom!),
side: BorderSide(width: 2,color : colorBorder,),
),
onPressed: onPressed,
child: Text(text,
style: TextStyle(fontFamily: font, color: colorText,
fontSize: size,fontWeight: FontWeight.bold
),
) ,
);
}
}

View File

@@ -0,0 +1,50 @@
import 'package:educa_controle_acesso/models/aluno_model.dart';
import 'package:educa_controle_acesso/widgets/text_custom.dart';
import 'package:flutter/material.dart';
import '../utils/colors.dart';
class DadosAlunosContainer extends StatelessWidget {
AlunoModel alunoModel;
DadosAlunosContainer({
required this.alunoModel
});
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextCustom(
text: 'Nome: '+alunoModel.nome,
color: PaletteColors.grey,
size: 20,
),
TextCustom(
text: 'Data de Nascimento: '+alunoModel.data_nasc,
color: PaletteColors.grey,
size: 15,
),
TextCustom(
text: 'RA: '+alunoModel.ra,
color: PaletteColors.grey,
size: 15,
),
TextCustom(
text: 'Turma: '+alunoModel.serie+'° ANO '+alunoModel.turma,
color: PaletteColors.grey,
size: 15,
),
TextCustom(
text: 'Escola: '+alunoModel.escola,
color: PaletteColors.grey,
size: 15,
),
],
),
);
}
}

View File

@@ -0,0 +1,70 @@
import 'package:educa_controle_acesso/utils/colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class InputText extends StatelessWidget {
bool obscure;
var controller;
double fontSize;
String title;
double width;
TextInputType textInputType;
int maxLines;
Color colorBorder;
var onChanged;
InputText({
required this.controller,
required this.width,
this.obscure = false,
this.fontSize = 15.0,
this.title = '',
this.textInputType = TextInputType.text,
this.maxLines = 1,
this.colorBorder = PaletteColors.grey,
this.onChanged = null,
});
@override
Widget build(BuildContext context) {
return Container(
color:PaletteColors.greyInput,
width: width,
margin: EdgeInsets.only(bottom: 5),
child: TextFormField(
keyboardType: textInputType,
maxLines: maxLines,
onChanged: onChanged,
obscureText: this.obscure,
controller: this.controller,
style: TextStyle(
color: Colors.black,
fontSize: this.fontSize,
),
decoration: InputDecoration(
// fillColor: PaletteColors.primaryColor,
labelText: title,
border: OutlineInputBorder(
borderSide: BorderSide(width: 1,color: colorBorder)
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: colorBorder),
borderRadius: BorderRadius.circular(3),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: colorBorder),
borderRadius: BorderRadius.circular(3),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: colorBorder),
borderRadius: BorderRadius.circular(3),
),
hintStyle: TextStyle(
color: Colors.black,
fontSize: this.fontSize,
)
)
),
);
}
}

View File

@@ -0,0 +1,20 @@
import 'package:flutter/material.dart';
void showSnackBar(BuildContext context, String text,Color colors){
final snackbar = SnackBar(
backgroundColor: colors,
content: Row(
children: [
Icon(Icons.info_outline,color: Colors.white),
SizedBox(width: 20),
Expanded(
child: Text(text,
style: TextStyle(fontSize: 16),),
),
],
),
);
ScaffoldMessenger.of(context).showSnackBar(snackbar);
}

View File

@@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
import '../utils/colors.dart';
class TextCustom extends StatelessWidget {
final text;
final size;
final color;
final fontWeight;
final textAlign;
final maxLines;
final underscore;
TextCustom({
required this.text,
this.size = 16.0,
this.color = PaletteColors.primaryColor,
this.fontWeight = FontWeight.normal,
this.textAlign = TextAlign.start,
this.maxLines = 1,
this.underscore,
});
@override
Widget build(BuildContext context) {
return Text(
text,
overflow: TextOverflow.ellipsis,
textAlign: textAlign,
style: TextStyle(
color: color,
fontSize: size,
fontWeight: fontWeight,
decoration: underscore,
decorationThickness: 4
),
maxLines: maxLines,
);
}
}