criada a tela_historico.dart
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:line_icons/line_icons.dart';
|
||||
import 'package:rkm_educa_app/Telas/tela_situacao_escolar.dart';
|
||||
import 'package:rkm_educa_app/modelos/estudante_modelo.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_contatos.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_historico.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_login.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_perfil.dart';
|
||||
import 'package:rkm_educa_app/utils/cores.dart';
|
||||
@@ -66,7 +67,7 @@ class DrawerCustom extends StatelessWidget {
|
||||
ItemDrawer(
|
||||
icone: LineIcons.fileContract,
|
||||
texto: 'Histórico Escolar',
|
||||
onPressed: (){},
|
||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaHistorico(estudanteModelo: estudanteModelo))),
|
||||
),
|
||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||
ItemDrawer(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
||||
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
||||
import '../utils/cores.dart';
|
||||
|
||||
class ItemAvisos extends StatelessWidget {
|
||||
@@ -19,9 +20,6 @@ class ItemAvisos extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
@@ -33,7 +31,7 @@ class ItemAvisos extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: width*0.8,
|
||||
width: Dimensoes.width*0.8,
|
||||
height: 65,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
child: Column(
|
||||
|
||||
63
lib/componentes/item_historico.dart
Normal file
63
lib/componentes/item_historico.dart
Normal file
@@ -0,0 +1,63 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
||||
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
||||
import '../utils/cores.dart';
|
||||
|
||||
class ItemHistorico extends StatelessWidget {
|
||||
|
||||
String ano;
|
||||
String turma;
|
||||
var onTap;
|
||||
|
||||
ItemHistorico({
|
||||
required this.ano,
|
||||
required this.turma,
|
||||
required this.onTap
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
color: PaletaCores.branco,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20.0,vertical: 5),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.8,
|
||||
height: 65,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5),
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: 'Ano',size: 14.0,fontWeight: FontWeight.bold),
|
||||
SizedBox(width: 10,),
|
||||
TextCustom(text: ano,size: 14.0,fontWeight: FontWeight.normal,color: PaletaCores.cinzaClaro,),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5),
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: 'Turma',size: 14.0,fontWeight: FontWeight.bold),
|
||||
SizedBox(width: 10,),
|
||||
TextCustom(text: turma),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(width: double.infinity,height: 2,color: PaletaCores.divider,)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
41
lib/telas/tela_historico.dart
Normal file
41
lib/telas/tela_historico.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_app/componentes/appbar_custom.dart';
|
||||
import 'package:rkm_educa_app/componentes/drawer_custom.dart';
|
||||
import 'package:rkm_educa_app/componentes/item_historico.dart';
|
||||
import 'package:rkm_educa_app/modelos/estudante_modelo.dart';
|
||||
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class TelaHistorico extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
|
||||
TelaHistorico({
|
||||
required this.estudanteModelo
|
||||
});
|
||||
|
||||
@override
|
||||
State<TelaHistorico> createState() => _TelaHistoricoState();
|
||||
}
|
||||
|
||||
class _TelaHistoricoState extends State<TelaHistorico> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'HISTÓRICO ESCOLAR'),
|
||||
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||
body: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20,horizontal: 10),
|
||||
width: Dimensoes.width,
|
||||
height: Dimensoes.height,
|
||||
child: ListView(
|
||||
children: [
|
||||
ItemHistorico(ano:'2023', turma: '8° ano A',onTap: (){},),
|
||||
ItemHistorico(ano:'2022', turma: '7° ano A',onTap: (){},),
|
||||
ItemHistorico(ano:'2021', turma: '6° ano A',onTap: (){},),
|
||||
ItemHistorico(ano:'2020', turma: '5° ano A',onTap: (){},),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user