Primeiro commit no ramo main
This commit is contained in:
104
lib/componentes/drawer_custom.dart
Normal file
104
lib/componentes/drawer_custom.dart
Normal file
@@ -0,0 +1,104 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:line_icons/line_icons.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
||||
import '../servicos/shared_preferences/shared.dart';
|
||||
import '../telas/tela_login.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
import 'item_drawer.dart';
|
||||
|
||||
class DrawerCustom extends StatelessWidget {
|
||||
|
||||
String usuario;
|
||||
|
||||
DrawerCustom({
|
||||
required this.usuario
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20),
|
||||
width: Dimensoes.width*0.8,
|
||||
height: Dimensoes.height,
|
||||
color: Colors.white,
|
||||
child: ListView(
|
||||
children: [
|
||||
// CircleAvatar(
|
||||
// radius: 70,
|
||||
// backgroundColor: Colors.grey[300],
|
||||
// child:estudanteModelo.foto==''?Container():
|
||||
// ClipRRect(
|
||||
// child: Image.asset(estudanteModelo.foto),
|
||||
// borderRadius:BorderRadius.circular(70),
|
||||
// )
|
||||
// ),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0,horizontal: 40),
|
||||
child: TextCustom(text: usuario.split(" ").first,fontWeight: FontWeight.bold,size: 16.0,textAlign: TextAlign.start),
|
||||
),
|
||||
Container(
|
||||
height: Dimensoes.height*0.5,
|
||||
child: ListView(
|
||||
children: [
|
||||
ItemDrawer(
|
||||
icone: LineIcons.home,
|
||||
texto: 'HOME',
|
||||
onPressed: (){},
|
||||
// onPressed: ()=> Navigator.pushReplacement(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(alunos: alunos,indiceAluno: indiceFilhos)),
|
||||
// ),
|
||||
),
|
||||
Container(height: 1,color: Colors.grey,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.clipboardList,
|
||||
texto: 'LANÇAMENTO DE NOTAS',
|
||||
onPressed: (){},
|
||||
// onPressed: ()=> Navigator.pushReplacement(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (context) => TelaPerfil(alunos: alunos,indiceAluno: indiceFilhos)),
|
||||
// ),
|
||||
),
|
||||
Container(height: 1,color: Colors.grey,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.checkSquareAlt,
|
||||
texto: 'LANÇAMENTO DE FALTAS/PRESENÇAS',
|
||||
onPressed: (){},
|
||||
),
|
||||
Container(height: 1,color: Colors.grey,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(
|
||||
icone: LineIcons.calendar,
|
||||
texto: 'CALENDÁRIO ESCOLAR',
|
||||
onPressed: (){},
|
||||
// onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaChamada(alunos: alunos,indiceAluno: indiceFilhos))),
|
||||
),
|
||||
Container(height: 1,color: Colors.grey,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: Dimensoes.height*0.3,),
|
||||
SafeArea(
|
||||
child: Container(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: IconButton(
|
||||
icon: Icon(LineIcons.alternateSignOut,size: 30),
|
||||
onPressed: (){
|
||||
final PrefService _prefService = PrefService();
|
||||
_prefService.removeCacheLogin().then((value){
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context, MaterialPageRoute(
|
||||
builder: (context) => TelaLogin()
|
||||
),
|
||||
(Route<dynamic> route) => false
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user