ajustes de layout
This commit is contained in:
@@ -9,6 +9,10 @@ class ButtonCustom extends StatelessWidget{
|
||||
final Color colorBorder;
|
||||
final widthCustom;
|
||||
final double height;
|
||||
double borderRadiustopRight;
|
||||
double borderRadiusbottomLeft;
|
||||
double borderRadiustopLeft;
|
||||
double borderRadiusbottomRight;
|
||||
|
||||
ButtonCustom({
|
||||
required this.onPressed,
|
||||
@@ -18,7 +22,11 @@ ButtonCustom({
|
||||
required this.colorText,
|
||||
required this.colorBorder,
|
||||
this.widthCustom = 1.0,
|
||||
this.height = 42.0,
|
||||
this.height = 42.5,
|
||||
this.borderRadiustopRight = 5.0,
|
||||
this.borderRadiusbottomLeft = 5.0,
|
||||
this.borderRadiustopLeft = 5.0,
|
||||
this.borderRadiusbottomRight = 5.0,
|
||||
});
|
||||
@override
|
||||
Widget build (BuildContext context) {
|
||||
@@ -29,6 +37,14 @@ ButtonCustom({
|
||||
primary: colorButton,
|
||||
minimumSize: Size(width*widthCustom! , height),
|
||||
side: BorderSide(width: 2,color : colorBorder,),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topRight: Radius.circular(borderRadiustopRight),
|
||||
bottomLeft: Radius.circular(borderRadiusbottomLeft),
|
||||
topLeft: Radius.circular(borderRadiustopLeft),
|
||||
bottomRight: Radius.circular(borderRadiusbottomRight)
|
||||
),
|
||||
),
|
||||
),
|
||||
onPressed: onPressed,
|
||||
child: Text(text,
|
||||
|
||||
@@ -8,15 +8,18 @@ import 'caixa_texto_container.dart';
|
||||
class DadosAlunosContainer extends StatelessWidget {
|
||||
|
||||
AlunoModel alunoModel;
|
||||
int index;
|
||||
|
||||
DadosAlunosContainer({
|
||||
required this.alunoModel
|
||||
required this.alunoModel,
|
||||
required this.index
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
double resto = index%2;
|
||||
|
||||
return InkWell(
|
||||
hoverColor: PaletteColors.lightGrey,
|
||||
@@ -24,37 +27,39 @@ class DadosAlunosContainer extends StatelessWidget {
|
||||
Navigator.pushNamed(context, '/cadastro',arguments: alunoModel);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
color: resto==0?Colors.white:PaletteColors.greySearch,
|
||||
height: 50,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: width*0.2,
|
||||
child: TextCustom(text: alunoModel.nome.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: alunoModel.data_nasc.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.08,
|
||||
child: TextCustom(text: alunoModel.ra.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.05,
|
||||
child: TextCustom(text: alunoModel.serie.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.05,
|
||||
child: TextCustom(text: alunoModel.turma.toUpperCase(),textAlign: TextAlign.center,)
|
||||
),
|
||||
Container(
|
||||
width: width*0.25,
|
||||
child: TextCustom(text: alunoModel.escola.toUpperCase(),size: 14.0,)
|
||||
),
|
||||
],
|
||||
Container(
|
||||
width: width*0.2,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 10,),
|
||||
TextCustom(text: alunoModel.nome.toUpperCase()),
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: alunoModel.data_nasc.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.08,
|
||||
child: TextCustom(text: alunoModel.ra.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.07,
|
||||
child: TextCustom(text: alunoModel.serie.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.07,
|
||||
child: TextCustom(text: alunoModel.turma.toUpperCase())
|
||||
),
|
||||
Container(
|
||||
width: width*0.25,
|
||||
child: TextCustom(text: alunoModel.escola.toUpperCase())
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -17,6 +17,7 @@ class InputText extends StatelessWidget {
|
||||
var onChanged;
|
||||
bool enable;
|
||||
List<TextInputFormatter> inputFormatters;
|
||||
double borderRadius;
|
||||
|
||||
InputText({
|
||||
required this.controller,
|
||||
@@ -31,7 +32,8 @@ class InputText extends StatelessWidget {
|
||||
this.colorBackground = PaletteColors.greyInput,
|
||||
this.onChanged = null,
|
||||
this.enable = true,
|
||||
required this.inputFormatters
|
||||
required this.inputFormatters,
|
||||
this.borderRadius = 3.0,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -63,19 +65,20 @@ class InputText extends StatelessWidget {
|
||||
// fillColor: PaletteColors.primaryColor,
|
||||
// labelText: title,
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 1,color: colorBorder)
|
||||
borderSide: BorderSide(width: 1,color: colorBorder),
|
||||
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 1, color: colorBorder),
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 1, color: colorBorder),
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
|
||||
),
|
||||
disabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 1, color: colorBorder),
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
|
||||
),
|
||||
hintText: hint,
|
||||
hintStyle: TextStyle(
|
||||
|
||||
@@ -2,6 +2,8 @@ import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../utils/colors.dart';
|
||||
|
||||
class ItemAcesso extends StatelessWidget {
|
||||
bool check;
|
||||
String ID_USUARIO;
|
||||
@@ -9,6 +11,7 @@ class ItemAcesso extends StatelessWidget {
|
||||
String CADASTRADO_POR;
|
||||
String CIDADE;
|
||||
var onChanged;
|
||||
int index;
|
||||
|
||||
ItemAcesso({
|
||||
required this.check,
|
||||
@@ -16,7 +19,8 @@ class ItemAcesso extends StatelessWidget {
|
||||
required this.DATA,
|
||||
required this.CADASTRADO_POR,
|
||||
required this.CIDADE,
|
||||
required this.onChanged
|
||||
required this.onChanged,
|
||||
required this.index,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -26,29 +30,36 @@ class ItemAcesso extends StatelessWidget {
|
||||
|
||||
String formataData = DATA == '00/00/0000'?'00/00/0000': DateFormat('dd/MM/yyyy hh:mm').format(DateTime.parse(DATA));
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: check,
|
||||
onChanged:onChanged
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: ID_USUARIO)
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: formataData)
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: CADASTRADO_POR)
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: CIDADE)
|
||||
),
|
||||
],
|
||||
double resto = index%2;
|
||||
|
||||
return Container(
|
||||
color: resto==0?Colors.white:PaletteColors.greySearch,
|
||||
height: 50,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: check,
|
||||
onChanged:onChanged
|
||||
),
|
||||
Container(
|
||||
width: width*0.15,
|
||||
child: TextCustom(text: ID_USUARIO)
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: formataData)
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: CADASTRADO_POR)
|
||||
),
|
||||
Container(
|
||||
width: width*0.1,
|
||||
child: TextCustom(text: CIDADE)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user