criada tela_situacao_escolar.dart
This commit is contained in:
@@ -109,7 +109,7 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
loading?Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CircularProgressIndicator(),
|
||||
CircularProgressIndicator(color: PaletaCores.cinzaClaro,),
|
||||
SizedBox(width: 20,),
|
||||
TextCustom(text: 'VALIDANDO ACESSO...')
|
||||
],
|
||||
|
||||
@@ -3,7 +3,10 @@ import 'package:rkm_educa_app/modelos/estudante_modelo.dart';
|
||||
import 'package:rkm_educa_app/telas/tela_avisos.dart';
|
||||
import 'package:rkm_educa_app/utils/cores.dart';
|
||||
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
||||
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||
import '../componentes/drawer_custom.dart';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
class TelaSituacaoEscolar extends StatefulWidget {
|
||||
EstudanteModelo estudanteModelo;
|
||||
@@ -17,6 +20,35 @@ class TelaSituacaoEscolar extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _TelaSituacaoEscolarState extends State<TelaSituacaoEscolar> {
|
||||
|
||||
late List<_ChartData> data;
|
||||
late TooltipBehavior _tooltip;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
data = [
|
||||
_ChartData('Faltas', 10,Color(0xffD9D9D9)),
|
||||
_ChartData('Presenças', 90,Color(0xff43A65F)),
|
||||
];
|
||||
_tooltip = TooltipBehavior(enable: true);
|
||||
}
|
||||
|
||||
Widget graph(BuildContext context) {
|
||||
return SfCircularChart(
|
||||
tooltipBehavior: _tooltip,
|
||||
series: <CircularSeries<dynamic, dynamic>>[
|
||||
DoughnutSeries<_ChartData, String>(
|
||||
dataSource: data,
|
||||
xValueMapper: (_ChartData data, _) => data.x,
|
||||
yValueMapper: (_ChartData data, _) => data.y,
|
||||
pointColorMapper: (_ChartData data, _) => data.color,
|
||||
radius:'45'
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -41,8 +73,271 @@ class _TelaSituacaoEscolarState extends State<TelaSituacaoEscolar> {
|
||||
Center(
|
||||
child: TextCustom(text: 'Situção Escolar',fontWeight: FontWeight.bold,size: 20.0,),
|
||||
),
|
||||
SizedBox(
|
||||
height: Dimensoes.height*0.1,
|
||||
),
|
||||
Card(
|
||||
margin: EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextCustom(text: 'Últimas Notas',fontWeight: FontWeight.bold,),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'Matemática',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '10',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'Português',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '9',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'História',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '10',)
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: Dimensoes.height*0.03,
|
||||
),
|
||||
Card(
|
||||
margin: EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextCustom(text: 'Faltas',fontWeight: FontWeight.bold,),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'Matemática',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '3',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'Português',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '1',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'História',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '5',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'Geografia',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '2',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: 'Ciências',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.1,
|
||||
child: TextCustom(text: '4',)
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
TextCustom(text: 'Presenças',fontWeight: FontWeight.bold,),
|
||||
Stack(
|
||||
children: [
|
||||
Container(
|
||||
alignment: Alignment.topCenter,
|
||||
width: 150,
|
||||
height: 110,
|
||||
child: graph(context)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: 150,
|
||||
height: 110,
|
||||
child: TextCustom(text: '90%',size: 14.0,)
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: Dimensoes.height*0.03,
|
||||
),
|
||||
Card(
|
||||
margin: EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextCustom(text: 'Próximos Eventos',fontWeight: FontWeight.bold,),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.5,
|
||||
child: TextCustom(text: 'Viagem para o Museu',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: '01/06/2023',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.5,
|
||||
child: TextCustom(text: 'Apresentação dia dos pais',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: '13/08/2023',)
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: Dimensoes.height*0.03,
|
||||
),
|
||||
Card(
|
||||
margin: EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextCustom(text: 'Próximas Datas - Agenda',fontWeight: FontWeight.bold,),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.5,
|
||||
child: TextCustom(text: 'Feriado Corpus Chisti',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: '08/06/2023',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.5,
|
||||
child: TextCustom(text: 'Início Férias',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: '19/07/2023',)
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.5,
|
||||
child: TextCustom(text: 'Início 3 bimestre',)
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
width: Dimensoes.width*0.3,
|
||||
child: TextCustom(text: '30/07/2023',)
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ChartData {
|
||||
_ChartData(this.x, this.y, this.color);
|
||||
|
||||
final String x;
|
||||
final double y;
|
||||
final Color color;
|
||||
}
|
||||
|
||||
16
pubspec.lock
16
pubspec.lock
@@ -261,6 +261,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
syncfusion_flutter_charts:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: syncfusion_flutter_charts
|
||||
sha256: "9391ce007e011dae05c0a44fb5c96752d3986acad853a73b35cb2e40d1ab492a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "21.2.9"
|
||||
syncfusion_flutter_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: syncfusion_flutter_core
|
||||
sha256: "4aa69e3541d38810533b1455aa38997a89755f9928e16ef813b62b2e8bcc398c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "21.2.9"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -16,6 +16,7 @@ dependencies:
|
||||
flutter_calendar_carousel: ^2.4.2
|
||||
http:
|
||||
intl:
|
||||
syncfusion_flutter_charts: ^21.2.9
|
||||
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
|
||||
Reference in New Issue
Block a user