criada a tela perfil_screen.dart
This commit is contained in:
40
lib/widgets/alert_default.dart
Normal file
40
lib/widgets/alert_default.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:line_icons/line_icons.dart';
|
||||
import 'package:rkm_educa_app/models/aluno_model.dart';
|
||||
import 'package:rkm_educa_app/screens/login_screen.dart';
|
||||
import 'package:rkm_educa_app/screens/perfil_screen.dart';
|
||||
import 'package:rkm_educa_app/utils/colors.dart';
|
||||
import 'package:rkm_educa_app/widgets/text_custom.dart';
|
||||
|
||||
import 'item_drawer.dart';
|
||||
|
||||
class DrawerCustom extends StatelessWidget {
|
||||
const DrawerCustom({Key? key}) : super(key: key);
|
||||
AlunoModel alunoModel;
|
||||
DrawerCustom({
|
||||
required this.alunoModel
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -23,32 +27,67 @@ class DrawerCustom extends StatelessWidget {
|
||||
radius: 70,
|
||||
child: ClipRRect(
|
||||
borderRadius:BorderRadius.circular(70),
|
||||
child: Image.asset("assets/images/aluna.jpeg"),
|
||||
child: Image.asset(alunoModel.foto),
|
||||
)
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: TextCustom(text: 'Maria da Silva',fontWeight: FontWeight.bold,size: 16.0,textAlign: TextAlign.center),
|
||||
child: TextCustom(text: alunoModel.nome,fontWeight: FontWeight.bold,size: 16.0,textAlign: TextAlign.center),
|
||||
),
|
||||
Container(
|
||||
height: height*0.5,
|
||||
child: ListView(
|
||||
children: [
|
||||
ItemDrawer(icone: LineIcons.userCircle,texto: 'Perfil',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.userCircle,
|
||||
texto: 'Perfil',
|
||||
onPressed: ()=> Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => PerfilScreen(alunoModel: alunoModel,)),
|
||||
),
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(icone: LineIcons.clipboardList,texto: 'Boletim Escolar',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.clipboardList,
|
||||
texto: 'Boletim Escolar',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(icone: LineIcons.fileContract,texto: 'Histórico Escolar',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.fileContract,
|
||||
texto: 'Histórico Escolar',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(icone: LineIcons.checkSquareAlt,texto: 'Chamadas / Presenças',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.checkSquareAlt,
|
||||
texto: 'Chamadas / Presenças',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(icone: LineIcons.calendarAlt,texto: 'Agenda Escolar',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.calendarAlt,
|
||||
texto: 'Agenda Escolar',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(icone: LineIcons.calendarTimes,texto: 'Eventos Escolares',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.calendarTimes,
|
||||
texto: 'Eventos Escolares',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(icone: LineIcons.mobilePhone,texto: 'Contatos',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.mobilePhone,
|
||||
texto: 'Contatos',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(icone: LineIcons.bus,texto: 'Passe',),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.bus,
|
||||
texto: 'Passe',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -6,10 +6,12 @@ import '../utils/colors.dart';
|
||||
class ItemDrawer extends StatelessWidget {
|
||||
IconData icone;
|
||||
String texto;
|
||||
var onPressed;
|
||||
|
||||
ItemDrawer({
|
||||
required this.texto,
|
||||
required this.icone
|
||||
required this.texto,
|
||||
required this.icone,
|
||||
required this.onPressed
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -19,7 +21,7 @@ class ItemDrawer extends StatelessWidget {
|
||||
padding: EdgeInsets.symmetric(horizontal: width*0.07),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: TextButton.icon(
|
||||
onPressed: (){},
|
||||
onPressed: onPressed,
|
||||
icon: Icon(icone,color: PaletteColors.grey,),
|
||||
label: TextCustom(text: texto,size: 16.0,)
|
||||
),
|
||||
|
||||
26
lib/widgets/item_perfil.dart
Normal file
26
lib/widgets/item_perfil.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_app/widgets/text_custom.dart';
|
||||
|
||||
class ItemPerfil extends StatelessWidget {
|
||||
String texto;
|
||||
String titulo;
|
||||
|
||||
ItemPerfil({
|
||||
required this.texto,
|
||||
required this.titulo,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: titulo,size: 14.0,fontWeight: FontWeight.bold,),
|
||||
SizedBox(width: 10,),
|
||||
TextCustom(text: texto,size: 14.0),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user