criada a tela seleciona_filho_screen.dart e situacao_escolar_screen.dart
This commit is contained in:
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),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user