criada tela_agenda.dart
This commit is contained in:
@@ -2,11 +2,14 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:line_icons/line_icons.dart';
|
import 'package:line_icons/line_icons.dart';
|
||||||
import 'package:rkm_educa_app/Telas/tela_situacao_escolar.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/modelos/estudante_modelo.dart';
|
||||||
|
import 'package:rkm_educa_app/telas/tela_agenda.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_botetim.dart';
|
import 'package:rkm_educa_app/telas/tela_botetim.dart';
|
||||||
|
import 'package:rkm_educa_app/telas/tela_chamada.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_contatos.dart';
|
import 'package:rkm_educa_app/telas/tela_contatos.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_eventos.dart';
|
import 'package:rkm_educa_app/telas/tela_eventos.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_historico.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_login.dart';
|
||||||
|
import 'package:rkm_educa_app/telas/tela_passe.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_perfil.dart';
|
import 'package:rkm_educa_app/telas/tela_perfil.dart';
|
||||||
import 'package:rkm_educa_app/utils/cores.dart';
|
import 'package:rkm_educa_app/utils/cores.dart';
|
||||||
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
||||||
@@ -76,13 +79,13 @@ class DrawerCustom extends StatelessWidget {
|
|||||||
ItemDrawer(
|
ItemDrawer(
|
||||||
icone: LineIcons.checkSquareAlt,
|
icone: LineIcons.checkSquareAlt,
|
||||||
texto: 'Chamadas / Presenças',
|
texto: 'Chamadas / Presenças',
|
||||||
onPressed: (){},
|
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaChamada(estudanteModelo: estudanteModelo))),
|
||||||
),
|
),
|
||||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
ItemDrawer(
|
ItemDrawer(
|
||||||
icone: LineIcons.calendarAlt,
|
icone: LineIcons.calendarAlt,
|
||||||
texto: 'Agenda Escolar',
|
texto: 'Agenda Escolar',
|
||||||
onPressed: (){},
|
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaAgenda(estudanteModelo: estudanteModelo))),
|
||||||
),
|
),
|
||||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
ItemDrawer(
|
ItemDrawer(
|
||||||
@@ -100,7 +103,7 @@ class DrawerCustom extends StatelessWidget {
|
|||||||
ItemDrawer(
|
ItemDrawer(
|
||||||
icone: LineIcons.bus,
|
icone: LineIcons.bus,
|
||||||
texto: 'Passe',
|
texto: 'Passe',
|
||||||
onPressed: (){},
|
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaPasse(estudanteModelo: estudanteModelo))),
|
||||||
),
|
),
|
||||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
],
|
],
|
||||||
|
|||||||
58
lib/componentes/item_agenda.dart
Normal file
58
lib/componentes/item_agenda.dart
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
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 ItemAgenda extends StatelessWidget {
|
||||||
|
|
||||||
|
String data;
|
||||||
|
String titulo;
|
||||||
|
|
||||||
|
ItemAgenda({
|
||||||
|
required this.data,
|
||||||
|
required this.titulo,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
return 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: 'Data',size: 14.0,fontWeight: FontWeight.bold),
|
||||||
|
SizedBox(width: 10,),
|
||||||
|
TextCustom(text: data,size: 14.0,fontWeight: FontWeight.normal,color: PaletaCores.cinzaClaro,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 5),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'Título',size: 14.0,fontWeight: FontWeight.bold),
|
||||||
|
SizedBox(width: 10,),
|
||||||
|
TextCustom(text: titulo),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(width: double.infinity,height: 2,color: PaletaCores.divider,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,7 +19,6 @@ class TextCustom extends StatelessWidget {
|
|||||||
this.textAlign = TextAlign.start,
|
this.textAlign = TextAlign.start,
|
||||||
this.maxLines = 1,
|
this.maxLines = 1,
|
||||||
this.underscore,
|
this.underscore,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_login.dart';
|
import 'package:rkm_educa_app/telas/tela_login.dart';
|
||||||
|
|
||||||
class PostHttpOverrides extends HttpOverrides{
|
class PostHttpOverrides extends HttpOverrides{
|
||||||
@@ -21,7 +22,16 @@ class MyApp extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
|
localizationsDelegates: [
|
||||||
|
GlobalMaterialLocalizations.delegate,
|
||||||
|
GlobalCupertinoLocalizations.delegate,
|
||||||
|
GlobalWidgetsLocalizations.delegate,
|
||||||
|
],
|
||||||
|
supportedLocales: [
|
||||||
|
const Locale('pt','BR')
|
||||||
|
],
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
|
locale: const Locale('pt'),
|
||||||
home: TelaLogin(),
|
home: TelaLogin(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
142
lib/telas/tela_agenda.dart
Normal file
142
lib/telas/tela_agenda.dart
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_calendar_carousel/classes/event.dart';
|
||||||
|
import 'package:flutter_calendar_carousel/flutter_calendar_carousel.dart';
|
||||||
|
import 'package:intl/intl.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_agenda.dart';
|
||||||
|
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
||||||
|
import 'package:rkm_educa_app/modelos/estudante_modelo.dart';
|
||||||
|
import 'package:rkm_educa_app/utils/cores.dart';
|
||||||
|
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
||||||
|
|
||||||
|
class TelaAgenda extends StatefulWidget {
|
||||||
|
EstudanteModelo estudanteModelo;
|
||||||
|
|
||||||
|
TelaAgenda({
|
||||||
|
required this.estudanteModelo
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TelaAgenda> createState() => _TelaAgendaState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TelaAgendaState extends State<TelaAgenda> {
|
||||||
|
|
||||||
|
DateTime _currentDate = DateTime.now();
|
||||||
|
DateTime dataAtual = DateTime.now();
|
||||||
|
EventList<Event> _markedDateMap = new EventList<Event>(
|
||||||
|
events: {},
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _eventIcon(String dia) => Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
color: PaletaCores.verdeCalendario,
|
||||||
|
),
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
child: Center(
|
||||||
|
child: TextCustom(text: dia,fontWeight: FontWeight.bold,size: 14.0,color: PaletaCores.cinza),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
TextStyle textStyle = TextStyle(
|
||||||
|
color: PaletaCores.cinza,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
fontSize: 14
|
||||||
|
);
|
||||||
|
|
||||||
|
TextStyle textStyleFDS = TextStyle(
|
||||||
|
color: Colors.red,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
fontSize: 14
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_markedDateMap.add(DateTime(2023,5,1), Event(date: DateTime(2023,5,1),icon: _eventIcon('1')));
|
||||||
|
_markedDateMap.add(DateTime(2023,5,15), Event(date: DateTime(2023,5,1),icon: _eventIcon('15')));
|
||||||
|
_markedDateMap.add(DateTime(2023,6,30), Event(date: DateTime(2023,6,30),icon: _eventIcon('30')));
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
final _calendario = CalendarCarousel<Event>(
|
||||||
|
locale: 'pt',
|
||||||
|
weekdayTextStyle: TextStyle(color: PaletaCores.cinza,fontSize: 14,fontFamily: 'Nunito',),
|
||||||
|
disableDayPressed: true,
|
||||||
|
daysTextStyle: textStyle,
|
||||||
|
selectedDayButtonColor: Colors.red,
|
||||||
|
weekendTextStyle: textStyleFDS,
|
||||||
|
markedDatesMap: _markedDateMap,
|
||||||
|
height: Dimensoes.height*0.40,
|
||||||
|
targetDateTime: dataAtual,
|
||||||
|
markedDateCustomTextStyle: textStyle,
|
||||||
|
markedDateMoreShowTotal: null,
|
||||||
|
showHeader: false,
|
||||||
|
todayTextStyle: textStyle,
|
||||||
|
isScrollable: false,
|
||||||
|
todayButtonColor: PaletaCores.calendario,
|
||||||
|
selectedDayTextStyle: textStyle,
|
||||||
|
minSelectedDate: _currentDate.subtract(Duration(days: 360)),
|
||||||
|
maxSelectedDate: _currentDate.add(Duration(days: 360)),
|
||||||
|
markedDateIconBuilder: (event){
|
||||||
|
return event.icon;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBarCustom().appbar(context, 'AGENDA ESCOLAR'),
|
||||||
|
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||||
|
body: ListView(
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
dataAtual = DateTime(dataAtual.year, dataAtual.month -1);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: Icon(Icons.arrow_left,size: 30,color: PaletaCores.cinzaClaro,)
|
||||||
|
),
|
||||||
|
TextCustom(text: DateFormat('MMMM / yyyy','pt_Br').format(dataAtual),fontWeight: FontWeight.bold),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
dataAtual = DateTime(dataAtual.year, dataAtual.month +1);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: Icon(Icons.arrow_right,size: 30,color: PaletaCores.cinzaClaro,)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 300,
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: _calendario,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 15),
|
||||||
|
height: Dimensoes.height*0.60,
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
dataAtual.month==5?ItemAgenda(data: '01/05/2023', titulo: 'Feriado - Dia do Trabalhador',):Container(),
|
||||||
|
dataAtual.month==5?ItemAgenda(data: '15/05/2023', titulo: 'Reunisão para os pais',):Container(),
|
||||||
|
dataAtual.month==6?ItemAgenda(data: '30/06/2023', titulo: 'Início Férias',):Container(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
25
lib/telas/tela_chamada.dart
Normal file
25
lib/telas/tela_chamada.dart
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
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/modelos/estudante_modelo.dart';
|
||||||
|
|
||||||
|
class TelaChamada extends StatefulWidget {
|
||||||
|
EstudanteModelo estudanteModelo;
|
||||||
|
|
||||||
|
TelaChamada({
|
||||||
|
required this.estudanteModelo
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TelaChamada> createState() => _TelaChamadaState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TelaChamadaState extends State<TelaChamada> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBarCustom().appbar(context, 'CHAMADAS / PRESENÇAS'),
|
||||||
|
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
25
lib/telas/tela_passe.dart
Normal file
25
lib/telas/tela_passe.dart
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
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/modelos/estudante_modelo.dart';
|
||||||
|
|
||||||
|
class TelaPasse extends StatefulWidget {
|
||||||
|
EstudanteModelo estudanteModelo;
|
||||||
|
|
||||||
|
TelaPasse({
|
||||||
|
required this.estudanteModelo
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TelaPasse> createState() => _TelaPasseState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TelaPasseState extends State<TelaPasse> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBarCustom().appbar(context, 'PASSE ESCOLAR'),
|
||||||
|
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,8 @@ class PaletaCores{
|
|||||||
static const Color cinzaClaro = Color (0xff7A7A7A);
|
static const Color cinzaClaro = Color (0xff7A7A7A);
|
||||||
static const Color divider = Color (0xffc9c9c9);
|
static const Color divider = Color (0xffc9c9c9);
|
||||||
static const Color cinzaInput = Color (0xffE1E1E1);
|
static const Color cinzaInput = Color (0xffE1E1E1);
|
||||||
|
static const Color calendario = Color (0xffB1B1B1);
|
||||||
|
static const Color verdeCalendario = Color (0xff84CB7E);
|
||||||
static const Color notificacao = Color (0xffBB0202);
|
static const Color notificacao = Color (0xffBB0202);
|
||||||
static const Color appBar = Color(0xff3A3A3A);
|
static const Color appBar = Color(0xff3A3A3A);
|
||||||
}
|
}
|
||||||
21
pubspec.lock
21
pubspec.lock
@@ -102,6 +102,14 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
flutter_calendar_carousel:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_calendar_carousel
|
||||||
|
sha256: "8666447f3404d2db45a2523095cab053d4d15c4fd5438d4a893d96ea5637a3aa"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.2"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@@ -110,6 +118,11 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
|
flutter_localizations:
|
||||||
|
dependency: "direct main"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -139,6 +152,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.2"
|
version: "4.0.2"
|
||||||
|
intl:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: intl
|
||||||
|
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.18.0"
|
||||||
js:
|
js:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -13,7 +13,12 @@ dependencies:
|
|||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
gainer_crypto: ^0.0.6
|
gainer_crypto: ^0.0.6
|
||||||
line_icons:
|
line_icons:
|
||||||
|
flutter_calendar_carousel: ^2.4.2
|
||||||
http:
|
http:
|
||||||
|
intl:
|
||||||
|
|
||||||
|
flutter_localizations:
|
||||||
|
sdk: flutter
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user