115 lines
4.3 KiB
Dart
115 lines
4.3 KiB
Dart
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 {
|
|
AlunoModel alunoModel;
|
|
DrawerCustom({
|
|
required this.alunoModel
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
double width = MediaQuery.of(context).size.width;
|
|
double height = MediaQuery.of(context).size.height;
|
|
return Container(
|
|
padding: EdgeInsets.symmetric(vertical: 20),
|
|
width: width*0.8,
|
|
color: Colors.white,
|
|
child: ListView(
|
|
children: [
|
|
CircleAvatar(
|
|
radius: 70,
|
|
child: ClipRRect(
|
|
borderRadius:BorderRadius.circular(70),
|
|
child: Image.asset(alunoModel.foto),
|
|
)
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
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',
|
|
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',
|
|
onPressed: (){},
|
|
),
|
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
|
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',
|
|
onPressed: (){},
|
|
),
|
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
|
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',
|
|
onPressed: (){},
|
|
),
|
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
|
ItemDrawer(
|
|
icone: LineIcons.mobilePhone,
|
|
texto: 'Contatos',
|
|
onPressed: (){},
|
|
),
|
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
|
ItemDrawer(
|
|
icone: LineIcons.bus,
|
|
texto: 'Passe',
|
|
onPressed: (){},
|
|
),
|
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: height*0.15,),
|
|
SafeArea(
|
|
child: Container(
|
|
alignment: Alignment.bottomRight,
|
|
child: IconButton(
|
|
icon: Icon(LineIcons.alternateSignOut,size: 30),
|
|
onPressed: (){
|
|
Navigator.pushReplacement(
|
|
context,
|
|
MaterialPageRoute(builder: (context) => LoginScreen()),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|