criada a tela seleciona_filho_screen.dart e situacao_escolar_screen.dart
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.rkm.educaapp.rkm_educa_app">
|
package="com.rkm.educaapp.rkm_educa_app">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<application
|
<application
|
||||||
android:label="rkm_educa_app"
|
android:label="rkm_educa_app"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ subprojects {
|
|||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(':app')
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
assets/images/aluna.jpeg
Normal file
BIN
assets/images/aluna.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
BIN
assets/images/aluno.jpeg
Normal file
BIN
assets/images/aluno.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
42
lib/controllers/main_controllers.dart
Normal file
42
lib/controllers/main_controllers.dart
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import 'package:gainer_crypto/crypto.dart';
|
||||||
|
|
||||||
|
class MainControllers{
|
||||||
|
encrypt(String senhaDigitada,String senhaUsuario) {
|
||||||
|
// Deixa e senha digitada em maiuscula
|
||||||
|
var senha = senhaDigitada.toUpperCase();
|
||||||
|
// Faz a criptografia da senha inserida
|
||||||
|
String senhaMD5 = grHashString(GRCryptoType.md5, senha);
|
||||||
|
// Retira o tipo (1, 2 ou 3) da senha do Usuário
|
||||||
|
int tipo = int.parse(senhaUsuario.substring(0, 1));
|
||||||
|
// Define a possição inicial da quebra da senha
|
||||||
|
int posicaoInicialMin = 0;
|
||||||
|
int posicaoInicialMax= 0;
|
||||||
|
int posicaoFinalMin = 0;
|
||||||
|
int posicaoFinalMax = 0;
|
||||||
|
// Pra cada tipo (1, 2 ou 3) define a posição inicial da quebra da senha
|
||||||
|
if(tipo == 1){
|
||||||
|
posicaoInicialMin = 0;
|
||||||
|
posicaoInicialMax = 16;
|
||||||
|
posicaoFinalMin = 16;
|
||||||
|
posicaoFinalMax = 32;
|
||||||
|
} else if(tipo == 2){
|
||||||
|
posicaoInicialMin = 16;
|
||||||
|
posicaoInicialMax = 32;
|
||||||
|
posicaoFinalMin = 0;
|
||||||
|
posicaoFinalMax = 16;
|
||||||
|
} else if(tipo == 3){
|
||||||
|
posicaoInicialMin = 0;
|
||||||
|
posicaoInicialMax = 1;
|
||||||
|
posicaoFinalMin = 31;
|
||||||
|
posicaoFinalMax = 32;
|
||||||
|
}
|
||||||
|
|
||||||
|
String inicio = senhaMD5.substring(posicaoInicialMin, posicaoInicialMax);
|
||||||
|
String fim = senhaMD5.substring(posicaoFinalMin, posicaoFinalMax);
|
||||||
|
|
||||||
|
// Faz a criptografia e concatena ela com sha1 e md5
|
||||||
|
String senhaCriptogradafa = tipo.toString() + '\$'+ grHashString(GRCryptoType.sha1, inicio + senha + fim);
|
||||||
|
// Retorna a senha criptografada
|
||||||
|
return senhaCriptogradafa;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,17 @@
|
|||||||
|
import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:rkm_educa_app/screens/login_screen.dart';
|
import 'package:rkm_educa_app/screens/login_screen.dart';
|
||||||
|
|
||||||
|
class PostHttpOverrides extends HttpOverrides{
|
||||||
|
@override
|
||||||
|
HttpClient createHttpClient( context){
|
||||||
|
return super.createHttpClient(context)
|
||||||
|
..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
HttpOverrides.global = new PostHttpOverrides();
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rkm_educa_app/screens/seleciona_filho_screen.dart';
|
||||||
|
import '../controllers/main_controllers.dart';
|
||||||
import '../utils/colors.dart';
|
import '../utils/colors.dart';
|
||||||
import '../widgets/buttom_custom.dart';
|
import '../widgets/buttom_custom.dart';
|
||||||
import '../widgets/input_text.dart';
|
import '../widgets/input_text.dart';
|
||||||
import '../widgets/snackBars.dart';
|
import '../widgets/snackBars.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
|
import '../widgets/text_custom.dart';
|
||||||
|
|
||||||
class LoginScreen extends StatefulWidget {
|
class LoginScreen extends StatefulWidget {
|
||||||
const LoginScreen({Key? key}) : super(key: key);
|
const LoginScreen({Key? key}) : super(key: key);
|
||||||
@@ -14,33 +20,63 @@ class LoginScreen extends StatefulWidget {
|
|||||||
|
|
||||||
class _LoginScreenState extends State<LoginScreen> {
|
class _LoginScreenState extends State<LoginScreen> {
|
||||||
|
|
||||||
final inputLogin = TextEditingController(text: 'teste');
|
final inputLogin = TextEditingController(text: 'mmatos');
|
||||||
final inputSenha = TextEditingController(text: 'senha123');
|
final inputSenha = TextEditingController(text: 'mmatos');
|
||||||
|
bool loading = false;
|
||||||
|
|
||||||
verificacao(){
|
verificacao(){
|
||||||
if(inputLogin.text.isNotEmpty){
|
if(inputLogin.text.isNotEmpty){
|
||||||
if(inputSenha.text.isNotEmpty){
|
if(inputSenha.text.isNotEmpty){
|
||||||
if(inputLogin.text == 'teste'){
|
setState(() {
|
||||||
if(inputSenha.text == 'senha123'){
|
loading = true;
|
||||||
showSnackBar(context, 'Acesso validado', Colors.green);
|
});
|
||||||
// Navigator.pushReplacement(
|
conectAPI();
|
||||||
// context,
|
|
||||||
// MaterialPageRoute(builder: (context) => HomeScreen()),
|
|
||||||
// );
|
|
||||||
}else{
|
|
||||||
showSnackBar(context, 'E-mail não cadastrado e/ou senha incorreta', Colors.red);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
showSnackBar(context, 'E-mail não cadastrado e/ou senha incorreta', Colors.red);
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
showSnackBar(context, 'Preencha sua senha', Colors.red);
|
showSnackBar(context, 'Preencha sua senha', Colors.red);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
showSnackBar(context, 'Preencha seu e-mail', Colors.red);
|
showSnackBar(context, 'Preencha seu Login', Colors.red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conectAPI()async{
|
||||||
|
final url = 'http://192.168.18.2/projeto/api_educa/index.php/?NO_USERNAME=${inputLogin.text.toUpperCase()}';
|
||||||
|
print(url);
|
||||||
|
final response = await http.get(Uri.parse(url));
|
||||||
|
var map = json.decode(response.body);
|
||||||
|
print(map);
|
||||||
|
if(map==false){
|
||||||
|
showSnackBar(context, 'Login não cadastrado e/ou senha incorreta', Colors.red);
|
||||||
|
}else{
|
||||||
|
if(map['NO_USERNAME']==map['SENHA']){
|
||||||
|
if(map['NO_USERNAME']==inputLogin.text.toUpperCase() && map['SENHA']==inputSenha.text.toUpperCase()){
|
||||||
|
showSnackBar(context, 'Acesso validado', Colors.green);
|
||||||
|
Navigator.pushReplacement(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) => SelecionaFilhoScreen()),
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
showSnackBar(context, 'Login não cadastrado e/ou senha incorreta', Colors.red);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
print(MainControllers().encrypt(inputSenha.text,map['SENHA']));
|
||||||
|
if(MainControllers().encrypt(inputSenha.text,map['SENHA']) == map['SENHA']){
|
||||||
|
showSnackBar(context, 'Acesso validado', Colors.green);
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) => SelecionaFilhoScreen()),
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
showSnackBar(context, 'Login não cadastrado e/ou senha incorreta', Colors.red);
|
||||||
|
}
|
||||||
|
// MainControllers().encrypt(inputSenha.text,map['SENHA']) == map['SENHA']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setState(() {
|
||||||
|
loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
@@ -56,7 +92,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
Container(
|
Container(
|
||||||
child: Image.asset("assets/images/logoEduca.png",width:width * 0.4,height: height * 0.12)
|
child: Image.asset("assets/images/logoEduca.png",width:width * 0.4,height: height * 0.12)
|
||||||
),
|
),
|
||||||
Container(
|
loading?Container():Container(
|
||||||
width: width>900? width * 0.18:width*0.7,
|
width: width>900? width * 0.18:width*0.7,
|
||||||
child: InputText(
|
child: InputText(
|
||||||
inputFormatters: [],
|
inputFormatters: [],
|
||||||
@@ -66,7 +102,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
colorBorder: PaletteColors.white,
|
colorBorder: PaletteColors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
loading?Container():Container(
|
||||||
width: width>900? width * 0.18:width*0.7,
|
width: width>900? width * 0.18:width*0.7,
|
||||||
child: InputText(
|
child: InputText(
|
||||||
inputFormatters: [],
|
inputFormatters: [],
|
||||||
@@ -78,7 +114,14 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: height * 0.02),
|
SizedBox(height: height * 0.02),
|
||||||
ButtonCustom(
|
loading?Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
CircularProgressIndicator(),
|
||||||
|
SizedBox(width: 20,),
|
||||||
|
TextCustom(text: 'VALIDANDO ACESSO...')
|
||||||
|
],
|
||||||
|
):ButtonCustom(
|
||||||
widthCustom: 0.7,
|
widthCustom: 0.7,
|
||||||
heightCustom: 0.07,
|
heightCustom: 0.07,
|
||||||
text: "Entrar",
|
text: "Entrar",
|
||||||
|
|||||||
114
lib/screens/seleciona_filho_screen.dart
Normal file
114
lib/screens/seleciona_filho_screen.dart
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rkm_educa_app/screens/situacao_escolar_screen.dart';
|
||||||
|
import 'package:rkm_educa_app/widgets/appbar_custom.dart';
|
||||||
|
import '../controllers/main_controllers.dart';
|
||||||
|
import '../utils/colors.dart';
|
||||||
|
import '../widgets/buttom_custom.dart';
|
||||||
|
import '../widgets/input_text.dart';
|
||||||
|
import '../widgets/snackBars.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
|
import '../widgets/text_custom.dart';
|
||||||
|
|
||||||
|
class SelecionaFilhoScreen extends StatefulWidget {
|
||||||
|
const SelecionaFilhoScreen({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SelecionaFilhoScreen> createState() => _SelecionaFilhoScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SelecionaFilhoScreenState extends State<SelecionaFilhoScreen> {
|
||||||
|
|
||||||
|
String? select;
|
||||||
|
List<String> alunos = [
|
||||||
|
"Maria da Silva",
|
||||||
|
"João da Silva"
|
||||||
|
];
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
double height = MediaQuery.of(context).size.height;
|
||||||
|
double width = MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: PaletteColors.white,
|
||||||
|
appBar: AppBarCustom().appbar(context, 'SELECIONAR FILHO'),
|
||||||
|
body: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
child: Image.asset("assets/images/logoEduca.png",width:width * 0.4,height: height * 0.12)
|
||||||
|
),
|
||||||
|
SizedBox(height: height * 0.02),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'Estudantes',fontWeight: FontWeight.bold,size: 14.0,),
|
||||||
|
Container(
|
||||||
|
width: width*0.8,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.white
|
||||||
|
),
|
||||||
|
color: PaletteColors.greyInput
|
||||||
|
),
|
||||||
|
child: DropdownButtonHideUnderline(
|
||||||
|
child: DropdownButton(
|
||||||
|
hint: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: TextCustom(text: 'Selecione'),
|
||||||
|
),
|
||||||
|
value: select,
|
||||||
|
items: alunos.map((value) => DropdownMenuItem(
|
||||||
|
value: value,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: TextCustom(
|
||||||
|
text: value,
|
||||||
|
color: Colors.black54,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
).toList(),
|
||||||
|
onChanged: (value){
|
||||||
|
setState(() {
|
||||||
|
select = value!;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: height * 0.02),
|
||||||
|
ButtonCustom(
|
||||||
|
widthCustom: 0.7,
|
||||||
|
heightCustom: 0.07,
|
||||||
|
text: "Avançar",
|
||||||
|
size: 14.0,
|
||||||
|
colorText: PaletteColors.white,
|
||||||
|
colorButton: PaletteColors.primaryColor,
|
||||||
|
colorBorder: PaletteColors.primaryColor,
|
||||||
|
onPressed: () {
|
||||||
|
if(select!=null){
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) => SituacaoEscolarScreen()),
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
showSnackBar(context, 'Selecione um estudante para avançar', Colors.red);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(height: height * 0.02),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
43
lib/screens/situacao_escolar_screen.dart
Normal file
43
lib/screens/situacao_escolar_screen.dart
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rkm_educa_app/utils/colors.dart';
|
||||||
|
import 'package:rkm_educa_app/widgets/text_custom.dart';
|
||||||
|
|
||||||
|
import '../widgets/drawer_custom.dart';
|
||||||
|
|
||||||
|
class SituacaoEscolarScreen extends StatefulWidget {
|
||||||
|
const SituacaoEscolarScreen({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SituacaoEscolarScreen> createState() => _SituacaoEscolarScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SituacaoEscolarScreenState extends State<SituacaoEscolarScreen> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: PaletteColors.backPage,
|
||||||
|
appBar: AppBar(
|
||||||
|
iconTheme: IconThemeData(color: PaletteColors.grey),
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
elevation: 0,
|
||||||
|
actions: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(4.0),
|
||||||
|
child: IconButton(
|
||||||
|
onPressed: (){},
|
||||||
|
icon: Icon(Icons.notifications_outlined,size: 32),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
drawer: DrawerCustom(),
|
||||||
|
body: ListView(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: TextCustom(text: 'Situção Escolar',fontWeight: FontWeight.bold,size: 20.0,),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,11 +4,14 @@ class PaletteColors{
|
|||||||
static const Color white = Colors.white;
|
static const Color white = Colors.white;
|
||||||
static const Color primaryColor = Color(0xffBB0202);
|
static const Color primaryColor = Color(0xffBB0202);
|
||||||
static const Color secundColor = Color(0xffFF9E75);
|
static const Color secundColor = Color(0xffFF9E75);
|
||||||
|
static const Color backPage = Color(0xffdfdfdf);
|
||||||
static const Color bgColor = Color(0xff3A3A3A);
|
static const Color bgColor = Color(0xff3A3A3A);
|
||||||
static const Color grey = Color (0xff757575);
|
static const Color grey = Color (0xff757575);
|
||||||
|
static const Color divider = Color (0xffc9c9c9);
|
||||||
static const Color greyInput = Color (0xffE1E1E1);
|
static const Color greyInput = Color (0xffE1E1E1);
|
||||||
static const Color lightGrey = Color(0xffD0D0D0);
|
static const Color lightGrey = Color(0xffD0D0D0);
|
||||||
static const Color midGrey = Color(0xffC4C4C4);
|
static const Color midGrey = Color(0xffC4C4C4);
|
||||||
static const Color backGrey = Color(0xffE9E9E9);
|
static const Color backGrey = Color(0xffE9E9E9);
|
||||||
static const Color green = Color(0xff06790c);
|
static const Color green = Color(0xff06790c);
|
||||||
|
static const Color appBar = Color(0xff3A3A3A);
|
||||||
}
|
}
|
||||||
19
lib/widgets/appbar_custom.dart
Normal file
19
lib/widgets/appbar_custom.dart
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rkm_educa_app/widgets/text_custom.dart';
|
||||||
|
|
||||||
|
import '../utils/colors.dart';
|
||||||
|
|
||||||
|
class AppBarCustom{
|
||||||
|
@override
|
||||||
|
PreferredSize appbar(BuildContext context,String title) {
|
||||||
|
|
||||||
|
return PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(50),
|
||||||
|
child: AppBar(
|
||||||
|
backgroundColor: PaletteColors.appBar,
|
||||||
|
centerTitle: true,
|
||||||
|
title: TextCustom(text: title,color: Colors.white,fontWeight: FontWeight.bold,size: 20.0,),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
75
lib/widgets/drawer_custom.dart
Normal file
75
lib/widgets/drawer_custom.dart
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:line_icons/line_icons.dart';
|
||||||
|
import 'package:rkm_educa_app/screens/login_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 {
|
||||||
|
const DrawerCustom({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@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("assets/images/aluna.jpeg"),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: TextCustom(text: 'Maria da Silva',fontWeight: FontWeight.bold,size: 16.0,textAlign: TextAlign.center),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: height*0.5,
|
||||||
|
child: ListView(
|
||||||
|
children: [
|
||||||
|
ItemDrawer(icone: LineIcons.userCircle,texto: 'Perfil',),
|
||||||
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
|
ItemDrawer(icone: LineIcons.clipboardList,texto: 'Boletim Escolar',),
|
||||||
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
|
ItemDrawer(icone: LineIcons.fileContract,texto: 'Histórico Escolar',),
|
||||||
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
|
ItemDrawer(icone: LineIcons.checkSquareAlt,texto: 'Chamadas / Presenças',),
|
||||||
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
|
ItemDrawer(icone: LineIcons.calendarAlt,texto: 'Agenda Escolar',),
|
||||||
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
|
ItemDrawer(icone: LineIcons.calendarTimes,texto: 'Eventos Escolares',),
|
||||||
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
|
ItemDrawer(icone: LineIcons.mobilePhone,texto: 'Contatos',),
|
||||||
|
Container(height: 1,color: PaletteColors.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
|
ItemDrawer(icone: LineIcons.bus,texto: 'Passe',),
|
||||||
|
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()),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
28
lib/widgets/item_drawer.dart
Normal file
28
lib/widgets/item_drawer.dart
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rkm_educa_app/widgets/text_custom.dart';
|
||||||
|
|
||||||
|
import '../utils/colors.dart';
|
||||||
|
|
||||||
|
class ItemDrawer extends StatelessWidget {
|
||||||
|
IconData icone;
|
||||||
|
String texto;
|
||||||
|
|
||||||
|
ItemDrawer({
|
||||||
|
required this.texto,
|
||||||
|
required this.icone
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double width = MediaQuery.of(context).size.width;
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: width*0.07),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: TextButton.icon(
|
||||||
|
onPressed: (){},
|
||||||
|
icon: Icon(icone,color: PaletteColors.grey,),
|
||||||
|
label: TextCustom(text: texto,size: 16.0,)
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
lib/widgets/text_custom.dart
Normal file
42
lib/widgets/text_custom.dart
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../utils/colors.dart';
|
||||||
|
|
||||||
|
class TextCustom extends StatelessWidget {
|
||||||
|
final text;
|
||||||
|
final size;
|
||||||
|
final color;
|
||||||
|
final fontWeight;
|
||||||
|
final textAlign;
|
||||||
|
final maxLines;
|
||||||
|
final underscore;
|
||||||
|
|
||||||
|
TextCustom({
|
||||||
|
required this.text,
|
||||||
|
this.size = 16.0,
|
||||||
|
this.color = PaletteColors.grey,
|
||||||
|
this.fontWeight = FontWeight.normal,
|
||||||
|
this.textAlign = TextAlign.start,
|
||||||
|
this.maxLines = 1,
|
||||||
|
this.underscore,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Text(
|
||||||
|
text,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
textAlign: textAlign,
|
||||||
|
style: TextStyle(
|
||||||
|
color: color,
|
||||||
|
fontSize: size,
|
||||||
|
fontWeight: fontWeight,
|
||||||
|
decoration: underscore,
|
||||||
|
decorationThickness: 4,
|
||||||
|
fontFamily: 'Nunito'
|
||||||
|
),
|
||||||
|
maxLines: maxLines,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
186
pubspec.lock
186
pubspec.lock
@@ -1,53 +1,100 @@
|
|||||||
# Generated by pub
|
# Generated by pub
|
||||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
packages:
|
packages:
|
||||||
|
args:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: args
|
||||||
|
sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.1"
|
||||||
|
asn1lib:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: asn1lib
|
||||||
|
sha256: ab96a1cb3beeccf8145c52e449233fe68364c9641623acd3adad66f8184f1039
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.0"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.9.0"
|
version: "2.11.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.3.0"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.1"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.0"
|
version: "1.17.1"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.1"
|
||||||
|
crypto:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: crypto
|
||||||
|
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.3"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
url: "https://pub.dartlang.org"
|
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.5"
|
||||||
|
encrypt:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: encrypt
|
||||||
|
sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.0.1"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.1"
|
||||||
flutter:
|
flutter:
|
||||||
@@ -59,7 +106,8 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
url: "https://pub.dartlang.org"
|
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@@ -67,41 +115,94 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
gainer_crypto:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: gainer_crypto
|
||||||
|
sha256: "252b371d61dd7736494e740c3c432b62cefadf8416d8899cdb6d42491ceda6c0"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.0.6"
|
||||||
|
http:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: http
|
||||||
|
sha256: "4c3f04bfb64d3efd508d06b41b825542f08122d30bda4933fb95c069d22a4fa3"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0"
|
||||||
|
http_parser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_parser
|
||||||
|
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.2"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.7"
|
||||||
|
line_icons:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: line_icons
|
||||||
|
sha256: "609ce366e38fb046199b7b8f627a703ca4e07018216f4e60d2d7027e7f666b71"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.12"
|
version: "0.12.15"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.dartlang.org"
|
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.5"
|
version: "0.2.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.9.1"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.8.3"
|
||||||
|
pointycastle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pointycastle
|
||||||
|
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.7.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -111,50 +212,65 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.0"
|
version: "1.9.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
url: "https://pub.dartlang.org"
|
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.11.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.2.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.2.1"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.12"
|
version: "0.5.1"
|
||||||
|
typed_data:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: typed_data
|
||||||
|
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.2"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.dartlang.org"
|
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||||
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.4"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.18.6 <3.0.0"
|
dart: ">=3.0.0 <4.0.0"
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
|
gainer_crypto: ^0.0.6
|
||||||
|
line_icons:
|
||||||
|
http:
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user