diff --git a/lib/main.dart b/lib/main.dart index 3a21748..685b098 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,7 +17,7 @@ class MyApp extends StatelessWidget { ) ), debugShowCheckedModeBanner: false, - initialRoute: '/login', + initialRoute: '/splash', routes: routes, ); } diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 1286a3e..d3fd5a0 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -67,7 +67,10 @@ class _HomeScreenState extends State { mother: 'MARIA DA SILVA', numberCNS: '123456789', numberMedicalRecord: '012345', - onTap: ()=>Navigator.pushNamed(context, '/register_citizen'), + onTap: ()=> Navigator.push( + context, + MaterialPageRoute(builder: (context) => MainRegisterCitizenScreen(screens: 3,)), + ), ); } ) diff --git a/lib/screens/main_register_citizen_screen.dart b/lib/screens/main_register_citizen_screen.dart index f8801b9..0e27abd 100644 --- a/lib/screens/main_register_citizen_screen.dart +++ b/lib/screens/main_register_citizen_screen.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; import 'package:rkm/screens/register_citizen_screen.dart'; +import 'package:rkm/screens/register_home_screen.dart'; +import 'package:rkm/screens/register_individual_screen.dart'; import 'package:rkm/utils/color_palette.dart'; import 'package:rkm/widgets/text_default.dart'; import '../widgets/alert_dialog_settings.dart'; @@ -44,7 +46,7 @@ class _MainRegisterCitizenScreenState extends State { @override Widget build(BuildContext context) =>DefaultTabController( - length: 1, + length: index, child: Scaffold( appBar: AppBar( title: TextDefault(text: 'RKM AB - Cadastro Cidadão',color: ColorPalette.white,), @@ -76,8 +78,8 @@ class _MainRegisterCitizenScreenState extends State { ):TabBarView( children: [ RegisterCitizenScreen(), - Center(child: Text('2'),), - Center(child: Text('3'),), + RegisterIndividualScreen(), + RegisterHomeScreen(), ], ), ) diff --git a/lib/screens/register_home_screen.dart b/lib/screens/register_home_screen.dart new file mode 100644 index 0000000..1585c91 --- /dev/null +++ b/lib/screens/register_home_screen.dart @@ -0,0 +1,519 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:rkm/utils/color_palette.dart'; +import 'package:rkm/utils/const_variable.dart'; +import 'package:rkm/widgets/alert_dialog_default.dart'; +import 'package:rkm/widgets/button_default.dart'; +import 'package:rkm/widgets/title_containers.dart'; +import '../widgets/dropdown_with_subtitle.dart'; +import '../widgets/input_with_subtitle.dart'; +import '../widgets/onbackbutton.dart'; +import '../widgets/switch_with_subtitle.dart'; +import '../widgets/text_default.dart'; +class RegisterHomeScreen extends StatefulWidget { + const RegisterHomeScreen({Key? key}) : super(key: key); + + @override + State createState() => _RegisterHomeScreenState(); +} + +class _RegisterHomeScreenState extends State { + + var nameController = TextEditingController(); + var nameSocialController = TextEditingController(); + var renponsibleController = TextEditingController(text: 'NOME COMPLETO'); + var enterBrazilController = TextEditingController(); + var porterNaturalnessController = TextEditingController(); + var dateNaturalnessController = TextEditingController(); + var naturalnessController = TextEditingController(text: 'BRASILEIRO'); + var cityBirthController = TextEditingController(); + var cityController = TextEditingController(); + var searchCityBirthController = TextEditingController(); + var searchCityController = TextEditingController(); + var nameMotherController = TextEditingController(); + var nameFatherController = TextEditingController(); + var codIBGEController = TextEditingController(); + var maternityController = TextEditingController(); + var medicalRecordController = TextEditingController(); + var medicalRecordProvController = TextEditingController(); + var classificationProvController = TextEditingController(); + var plantsController = TextEditingController(); + var numberFamilyController = TextEditingController(); + var whatCompanyController = TextEditingController(); + var otherCondicionsController = TextEditingController(); + var cepController = TextEditingController(); + var numberController = TextEditingController(); + var complementController = TextEditingController(); + var referencePointController = TextEditingController(); + var responsibleRegisterController = TextEditingController(); + var unitProfessionalController = TextEditingController(); + var dataRegisterController = TextEditingController(text: '06/12/2022'); + var foneDDDController = TextEditingController(); + var foneController = TextEditingController(); + var mobileDDDController = TextEditingController(); + var mobileController = TextEditingController(); + var messageDDDController = TextEditingController(); + var messageController = TextEditingController(); + var emailController = TextEditingController(); + var observationController = TextEditingController(); + var CPFController = TextEditingController(); + var CNSController = TextEditingController(); + var voterController = TextEditingController(); + var RGController = TextEditingController(); + var RGComplementController = TextEditingController(); + var RGOrganController = TextEditingController(); + var RGDateController = TextEditingController(); + var numberCertificateController = TextEditingController(); + var nameCertificateController = TextEditingController(); + var bookCertificateController = TextEditingController(); + var sheetCertificateController = TextEditingController(); + var termCertificateController = TextEditingController(); + var dateCertificateController = TextEditingController(); + var CTPSController = TextEditingController(); + var numberCTPSController = TextEditingController(); + var PISController = TextEditingController(); + var NISController = TextEditingController(); + var incomeController = TextEditingController(); + var professionalController = TextEditingController(); + var controllerComfortable = TextEditingController(); + var dateDeathController = TextEditingController(); + var controllerResidents = TextEditingController(); + var controllerAmount = TextEditingController(); + + String? selectTypeCertificate; + String? selectCTPSUF; + String? selectRGUF; + String? selectTypeStreet; + String? selectStreet; + String? selectSubdivision; + String? selectHeartDisease; + String? selectKidneyProblem; + String? selectLungProblem; + String? selectCBO; + String? selectZone; + String? selectVillage; + String? selectCountry; + String? selectTypeHome; + String? selectSituation; + String? selectResidence; + String? selectAcessHome; + String? selectMaterialWall; + String? selectWater; + String? selectTreatmentWater; + String? selectDestinyTrash; + String? selectFormSanitaryDrainage; + String? selectRural; + String? selectSituationStreet; + String? selectClassification; + String? selectINE; + String? selectMaritalStatus; + String? selectBreed; + String? selectCurse; + String? selectScooling; + String? selectWork; + String? selectSexualOrientation; + String? selectGender; + String? selectWeight; + String? selectDeficiency; + String? selectKin; + bool enableSpouse = false; + bool enableAnimals = false; + bool enableCats = false; + bool enableDogs = false; + bool enableBirds = false; + bool enableOther = false; + bool enableAccompaniedCompany = false; + bool outOfArea = false; + bool enableEnergy = false; + bool statusRegister = true; + bool renponsibleFamily = true; + bool frequencySchool = false; + bool enableFather = false; + bool enableCityCard = false; + bool enableBlocked = false; + bool checkBoxNumber = false; + String date = 'Data de Nascimento'; + + escolherprazoInicio(BuildContext context) async { + var pickDate = await showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime(2022), + lastDate: DateTime(2025)); + if (pickDate != null) { + setState(() { + date = formatData(year: pickDate.year, month: pickDate.month, day: pickDate.day); + }); + } + } + + String formatData({int? year, int? month, int? day}) { + DateTime data = DateTime(year!, month!, day!); + String formattedDate = DateFormat('dd/MM/yyyy').format(data); + return formattedDate; + } + + @override + Widget build(BuildContext context) { + + double heigth = MediaQuery.of(context).size.height; + double width = MediaQuery.of(context).size.width; + + return WillPopScope( + onWillPop: ()=> OnBackButton().onBackButton(context), + child: Scaffold( + body: Container( + height: double.infinity, + width: double.infinity, + decoration: ConstVariable().backgroundGradient, + child: ListView( + children: [ + Card( + margin: EdgeInsets.all(10), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + ButtonDefault( + onPressed: (){}, + title: 'Alterar', + borderColor: ColorPalette.appBar, + background: ColorPalette.appBar, + textColor: ColorPalette.white, + width: double.infinity, + ), + ButtonDefault( + onPressed: ()=>Navigator.pop(context), + title: 'Cancelar', + borderColor: ColorPalette.blackButton, + background: ColorPalette.blackButton, + textColor: ColorPalette.white, + width: double.infinity, + ) + ], + ), + ), + ), + Card( + margin: EdgeInsets.all(10), + child: Column( + children: [ + TitleContainers(title: 'Condições de Moradia'), + Row( + children: [ + Container( + height: heigth*0.5, + width: width*0.2, + child: Icon(Icons.home,size: 80,), + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + DropdownWithSubtitle( + list:['DOMICÍLIO'], + widthSubtitle: width*0.7, + subtitle: 'Tipo de Imóvel', + hintDropdown: 'Tipo de Imóvel', + select: selectSituation, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value){ + setState(() { + selectSituation = value!; + }); + }, + ), + DropdownWithSubtitle( + list:[], + widthSubtitle: width*0.7, + subtitle: 'INE - Área / Microárea do Domicílio', + hintDropdown: 'INE - Área / Microárea do Domicílio', + select: selectTypeHome, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value){ + setState(() { + selectTypeHome = value!; + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Fora de área', + value: outOfArea, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + DropdownWithSubtitle( + list:['PRÓPRIO'], + widthSubtitle: width*0.7, + subtitle: 'Situação', + hintDropdown: 'Situação', + select: selectTypeHome, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value){ + setState(() { + selectTypeHome = value!; + }); + }, + ), + DropdownWithSubtitle( + list:['URBANO','RURAL'], + widthSubtitle: width*0.7, + subtitle: 'Localização', + hintDropdown: 'Localização', + select: selectSituation, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value){ + setState(() { + selectSituation = value!; + }); + }, + ), + DropdownWithSubtitle( + list:['CASA'], + widthSubtitle: width*0.7, + subtitle: 'Tipo de Domicílio', + hintDropdown: 'Tipo de Domicílio', + select: selectResidence, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectResidence = value!)), + InputWithSubtitle( + subtitle: 'Moradores', + hintInput: 'Moradores', + errorInput: 'Campo obrigatório', + labelInput: 'Moradores', + widthSubtitle: width*0.4, + widthInput: width*0.7, + controller: controllerResidents + ), + InputWithSubtitle( + subtitle: 'Cômodos', + hintInput: 'Cômodos', + errorInput: 'Campo obrigatório', + labelInput: 'Cômodos', + widthSubtitle: width*0.4, + widthInput: width*0.7, + controller: controllerComfortable + ), + DropdownWithSubtitle( + list:[], + widthSubtitle: width*0.7, + subtitle: 'Situação Rural', + hintDropdown: 'Situação Rural', + select: selectRural, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectRural = value!) + ), + DropdownWithSubtitle( + list:['ASFALTO'], + widthSubtitle: width*0.7, + subtitle: 'Tipo de Acesso ao Domicílio', + hintDropdown: 'Tipo de Acesso ao Domicílio', + select: selectAcessHome, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectAcessHome = value!) + ), + DropdownWithSubtitle( + list:['ALVENARIA COM REVESTIMENTO'], + widthSubtitle: width*0.7, + subtitle: 'Material Predominante - Parede', + hintDropdown: 'Material Predominante - Parede', + select: selectMaterialWall, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectMaterialWall = value!) + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Disponibilidade de Energia Elétroca', + value: enableEnergy, + onChanged: (value)=>setState(()=>enableEnergy = value), + ), + DropdownWithSubtitle( + list:['REDE ENCANADA ATÉ O DOMICÍLIO'], + widthSubtitle: width*0.7, + subtitle: 'Abastecimento de Água', + hintDropdown: 'Abastecimento de Água', + select: selectWater, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectWater = value!) + ), + DropdownWithSubtitle( + list:['FILTRAÇÃO'], + widthSubtitle: width*0.7, + subtitle: 'Tratamento de Água', + hintDropdown: 'Tratamento de Água', + select: selectTreatmentWater, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectTreatmentWater = value!) + ), + DropdownWithSubtitle( + list:['COLETADO'], + widthSubtitle: width*0.7, + subtitle: 'Destino de Lixo', + hintDropdown: 'Destino de Lixo', + select: selectDestinyTrash, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectDestinyTrash = value!) + ), + DropdownWithSubtitle( + list:['REDE COLETORA DE ESGOTO OU PLUVIAL'], + widthSubtitle: width*0.7, + subtitle: 'Forma de Escoamento Sanitário', + hintDropdown: 'Forma de Escoamento Sanitário', + select: selectFormSanitaryDrainage, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value)=>setState(()=>selectFormSanitaryDrainage = value!) + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Animais', + value: enableAnimals, + onChanged: (value)=>setState(()=>enableAnimals = value!), + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Quais - Gato', + value: enableCats, + onChanged: (value)=>setState(()=>enableCats = value!), + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Quais - Cachorro', + value: enableDogs, + onChanged: (value)=>setState(()=>enableDogs = value!), + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Quais - Pássaro', + value: enableBirds, + onChanged: (value)=>setState(()=>enableBirds = value!), + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Quais - Outros', + value: enableOther, + onChanged: (value)=>setState(()=>enableOther = value!), + ), + InputWithSubtitle( + subtitle: 'Quantidade', + hintInput: 'Quantidade', + errorInput: 'Campo obrigatório', + labelInput: 'Quantidade', + widthSubtitle: width*0.4, + widthInput: width*0.7, + controller: controllerAmount + ), + ], + ) + ], + ) + ], + ), + ), + Card( + margin: EdgeInsets.all(10), + child: Column( + children: [ + TitleContainers(title: 'Outros'), + Row( + children: [ + Container( + height: heigth*0.4, + width: width*0.2, + child: Icon(Icons.business_center,size: 80,), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + InputWithSubtitle( + controller: responsibleRegisterController, + subtitle: 'Usuário responsável Pelo Cadastro', + errorInput: 'Campo Obrigatório', + labelInput: 'Usuário responsável Pelo Cadastro', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + ), + InputWithSubtitle( + controller: unitProfessionalController, + subtitle: 'Unidade do Profissional', + errorInput: 'Campo Obrigatório', + labelInput: 'Unidade do Profissional', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + ), + DropdownWithSubtitle( + subtitle: 'CBO', + select: selectCBO, + widthDropdown: width*0.673, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'CBO', + onChanged: (value){ + setState(() { + selectCBO = value; + }); + }, + list: [] + ), + DropdownWithSubtitle( + subtitle: 'Código da Equipe', + select: selectCBO, + widthDropdown: width*0.672, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'Código da Equipe', + onChanged: (value){ + setState(() { + selectCBO = value; + }); + }, + list: ['INE - 0001558536 / Área 4 - Microárea: - '] + ), + InputWithSubtitle( + controller: dataRegisterController, + subtitle: 'Data do Cadastro', + errorInput: 'Campo Obrigatório', + labelInput: 'Data do Cadastro', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + ], + ), + ), + ] + ), + ], + ), + ), + ] + ) + ), + ), + ); + } +} diff --git a/lib/screens/register_individual_screen.dart b/lib/screens/register_individual_screen.dart new file mode 100644 index 0000000..13780f5 --- /dev/null +++ b/lib/screens/register_individual_screen.dart @@ -0,0 +1,1197 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:line_icons/line_icons.dart'; +import 'package:rkm/utils/color_palette.dart'; +import 'package:rkm/utils/const_variable.dart'; +import 'package:rkm/widgets/alert_dialog_default.dart'; +import 'package:rkm/widgets/button_default.dart'; +import 'package:rkm/widgets/title_containers.dart'; +import '../widgets/check_box_two_subtitle.dart'; +import '../widgets/dropdown_with_subtitle.dart'; +import '../widgets/input_with_subtitle.dart'; +import '../widgets/onbackbutton.dart'; +import '../widgets/switch_with_subtitle.dart'; +import '../widgets/text_default.dart'; +class RegisterIndividualScreen extends StatefulWidget { + const RegisterIndividualScreen({Key? key}) : super(key: key); + + @override + State createState() => _RegisterIndividualScreenState(); +} + +class _RegisterIndividualScreenState extends State { + + var nameController = TextEditingController(); + var nameSocialController = TextEditingController(); + var renponsibleController = TextEditingController(text: 'NOME COMPLETO'); + var enterBrazilController = TextEditingController(); + var porterNaturalnessController = TextEditingController(); + var dateNaturalnessController = TextEditingController(); + var naturalnessController = TextEditingController(text: 'BRASILEIRO'); + var cityBirthController = TextEditingController(); + var cityController = TextEditingController(); + var searchCityBirthController = TextEditingController(); + var searchCityController = TextEditingController(); + var nameMotherController = TextEditingController(); + var nameFatherController = TextEditingController(); + var codIBGEController = TextEditingController(); + var maternityController = TextEditingController(); + var medicalRecordController = TextEditingController(); + var medicalRecordProvController = TextEditingController(); + var classificationProvController = TextEditingController(); + var plantsController = TextEditingController(); + var numberFamilyController = TextEditingController(); + var whatCompanyController = TextEditingController(); + var otherCondicionsController = TextEditingController(); + var cepController = TextEditingController(); + var numberController = TextEditingController(); + var complementController = TextEditingController(); + var referencePointController = TextEditingController(); + var responsibleRegisterController = TextEditingController(); + var unitProfessionalController = TextEditingController(); + var dataRegisterController = TextEditingController(text: '06/12/2022'); + var foneDDDController = TextEditingController(); + var foneController = TextEditingController(); + var mobileDDDController = TextEditingController(); + var mobileController = TextEditingController(); + var messageDDDController = TextEditingController(); + var messageController = TextEditingController(); + var emailController = TextEditingController(); + var observationController = TextEditingController(); + var CPFController = TextEditingController(); + var CNSController = TextEditingController(); + var voterController = TextEditingController(); + var RGController = TextEditingController(); + var RGComplementController = TextEditingController(); + var RGOrganController = TextEditingController(); + var RGDateController = TextEditingController(); + var numberCertificateController = TextEditingController(); + var nameCertificateController = TextEditingController(); + var bookCertificateController = TextEditingController(); + var sheetCertificateController = TextEditingController(); + var termCertificateController = TextEditingController(); + var dateCertificateController = TextEditingController(); + var CTPSController = TextEditingController(); + var numberCTPSController = TextEditingController(); + var PISController = TextEditingController(); + var NISController = TextEditingController(); + var incomeController = TextEditingController(); + var professionalController = TextEditingController(); + var dateDeathController = TextEditingController(); + + String? selectTypeCertificate; + String? selectCTPSUF; + String? selectRGUF; + String? selectTypeStreet; + String? selectStreet; + String? selectSubdivision; + String? selectHeartDisease; + String? selectKidneyProblem; + String? selectLungProblem; + String? selectCBO; + String? selectZone; + String? selectVillage; + String? selectCountry; + String? selectSituationStreet; + String? selectClassification; + String? selectINE; + String? selectMaritalStatus; + String? selectBreed; + String? selectCurse; + String? selectScooling; + String? selectWork; + String? selectSexualOrientation; + String? selectGender; + String? selectWeight; + String? selectDeficiency; + String? selectKin; + bool enableSpouse = false; + bool enableAccompaniedCompany = false; + bool outOfArea = false; + bool statusRegister = true; + bool renponsibleFamily = true; + bool frequencySchool = false; + bool enableFather = false; + bool enableCityCard = false; + bool enableBlocked = false; + bool checkBoxNumber = false; + String date = 'Data de Nascimento'; + + escolherprazoInicio(BuildContext context) async { + var pickDate = await showDatePicker( + context: context, + initialDate: DateTime.now(), + firstDate: DateTime(2022), + lastDate: DateTime(2025)); + if (pickDate != null) { + setState(() { + date = formatData(year: pickDate.year, month: pickDate.month, day: pickDate.day); + }); + } + } + + String formatData({int? year, int? month, int? day}) { + DateTime data = DateTime(year!, month!, day!); + String formattedDate = DateFormat('dd/MM/yyyy').format(data); + return formattedDate; + } + + @override + Widget build(BuildContext context) { + + double heigth = MediaQuery.of(context).size.height; + double width = MediaQuery.of(context).size.width; + + return WillPopScope( + onWillPop: ()=> OnBackButton().onBackButton(context), + child: Scaffold( + body: Container( + height: double.infinity, + width: double.infinity, + decoration: ConstVariable().backgroundGradient, + child: ListView( + children: [ + Card( + margin: EdgeInsets.all(10), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + ButtonDefault( + onPressed: (){}, + title: 'Alterar', + borderColor: ColorPalette.appBar, + background: ColorPalette.appBar, + textColor: ColorPalette.white, + width: double.infinity, + ), + ButtonDefault( + onPressed: ()=>Navigator.pop(context), + title: 'Cancelar', + borderColor: ColorPalette.blackButton, + background: ColorPalette.blackButton, + textColor: ColorPalette.white, + width: double.infinity, + ) + ], + ), + ), + ), + Card( + margin: EdgeInsets.all(10), + child: Column( + children: [ + TitleContainers(title: 'Informações Sociodemográficas'), + Row( + children: [ + Container( + height: heigth*0.5, + width: width*0.2, + child: Icon(Icons.edit_note,size: 80,), + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + DropdownWithSubtitle( + list:[], + widthSubtitle: width*0.7, + subtitle: 'INE / Área - Microárea', + hintDropdown: 'INE / Área - Microárea', + select: selectINE, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.6, + onChanged: (value){ + setState(() { + selectINE = value!; + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Fora de área', + value: outOfArea, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Status Cadastro', + value: statusRegister, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Responsável Familiar', + value: renponsibleFamily, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + InputWithSubtitle( + controller: renponsibleController, + subtitle: 'Responsável', + errorInput: 'Campo Obrigatório', + labelInput: 'Responsável', + widthInput: width*0.7, + widthSubtitle: width*0.2, + hintInput: 'Escreva aqui', + enable: enableSpouse, + ), + DropdownWithSubtitle( + list: [], + widthSubtitle: width*0.2, + subtitle: 'Parentesco com o Responsável Familiar', + hintDropdown: 'Parentesco com o Responsável Familiar', + select: selectKin, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.4, + onChanged: (value){ + setState(() { + selectKin = value!; + }); + }, + ), + InputWithSubtitle( + controller: naturalnessController, + subtitle: 'Naturalidade', + errorInput: 'Campo Obrigatório', + labelInput: 'Naturalidade', + widthInput: width*0.7, + widthSubtitle: width*0.2, + hintInput: 'Escreva aqui', + enable: enableSpouse, + ), + InputWithSubtitle( + controller: enterBrazilController, + subtitle: 'Entrada no Brasil', + errorInput: 'Campo Obrigatório', + labelInput: 'Entrada no Brasil', + widthInput: width*0.7, + widthSubtitle: width*0.2, + hintInput: 'Escreva aqui', + enable: enableSpouse, + ), + InputWithSubtitle( + controller: dateNaturalnessController, + subtitle: 'Data de Naturalização', + errorInput: 'Campo Obrigatório', + labelInput: 'Data de Naturalização', + widthInput: width*0.7, + widthSubtitle: width*0.2, + hintInput: 'Escreva aqui', + enable: enableSpouse, + ), + InputWithSubtitle( + controller: porterNaturalnessController, + subtitle: 'Portaria de Naturalização', + errorInput: 'Campo Obrigatório', + labelInput: 'Portaria de Naturalização', + widthInput: width*0.7, + widthSubtitle: width*0.2, + hintInput: 'Escreva aqui', + enable: enableSpouse, + ), + DropdownWithSubtitle( + list:['SUPERIOR, APERFEIÇAOMENTO,ESPECIAL'], + widthSubtitle: width*0.4, + subtitle: 'Escolaridade', + hintDropdown: 'Escolaridade', + select: selectCurse, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.5, + onChanged: (value){ + setState(() { + selectCurse = value!; + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Frequenta Escola / Creche', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + DropdownWithSubtitle( + list: ['AUTONOMO COM PREVIDÊNCIA SOCIAL'], + widthSubtitle: width*0.2, + subtitle: 'Situação no Mercado de Trabalho', + hintDropdown: 'Situação no Mercado de Trabalho', + select: selectWork, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.5, + onChanged: (value){ + setState(() { + selectWork = value!; + }); + }, + ), + TitleContainers(title: 'Menores de 9 anos ficam',width: width*0.7), + CheckBoxTwoSubtitle( + width: width*0.7, + checkbox1: false, + checkbox2: false, + subtitle1: 'ADULTO RESPONSÁVEL', + subtitle2: 'SOZINHA', + onChanged1: (value){}, + onChanged2: (value){}, + ), + CheckBoxTwoSubtitle( + width: width*0.7, + checkbox1: false, + checkbox2: false, + subtitle1: 'OUTRA(S) CRIANÇA(S)', + subtitle2: 'CRECHE', + onChanged1: (value){}, + onChanged2: (value){}, + ), + CheckBoxTwoSubtitle( + width: width*0.7, + checkbox1: false, + checkbox2: false, + subtitle1: 'ADOLESCENTE', + subtitle2: 'OUTRO', + onChanged1: (value){}, + onChanged2: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Frequenta Cuidador Tradicional', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Participa de Grupo Comunitário', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Possui Plano de Saúde Privado', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Membro de Comunidade Tradicional', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + InputWithSubtitle( + controller: dateNaturalnessController, + subtitle: 'Qual', + errorInput: 'Campo Obrigatório', + labelInput: 'Qual', + widthInput: width*0.7, + widthSubtitle: width*0.2, + hintInput: 'Escreva aqui', + enable: enableSpouse, + ), + DropdownWithSubtitle( + list: ['NÃO DESEJA INFORMAR'], + widthSubtitle: width*0.2, + subtitle: 'Orientação Sexual', + hintDropdown: 'Orientação Sexual', + select: selectSexualOrientation, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.5, + onChanged: (value){ + setState(() { + selectSexualOrientation = value!; + }); + }, + colorBorder: ColorPalette.white, + ), + DropdownWithSubtitle( + list: [], + widthSubtitle: width*0.2, + subtitle: 'Identidade de Gênero', + hintDropdown: 'Identidade de Gênero', + select: selectGender, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.5, + onChanged: (value){ + setState(() { + selectGender = value!; + }); + }, + colorBorder: ColorPalette.white, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Deficiência Auditiva', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Deficiência Intelectual / Cognitiva', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Deficiência Visual', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Deficiência Fisica', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Outras Deficiências', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + DropdownWithSubtitle( + list: [], + widthSubtitle: width*0.2, + subtitle: 'Saída do Cidadão do Cadastro', + hintDropdown: 'Saída do Cidadão do Cadastro', + select: selectGender, + widthDropdown: width*0.7, + widthContainerDropdown: width*0.5, + onChanged: (value){ + setState(() { + selectGender = value!; + }); + }, + colorBorder: ColorPalette.white, + ), + InputWithSubtitle( + controller: dateNaturalnessController, + subtitle: 'Data', + errorInput: 'Campo Obrigatório', + labelInput: 'Data', + widthInput: width*0.7, + widthSubtitle: width*0.2, + hintInput: 'Escreva aqui', + enable: enableSpouse, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Cadastro Recusado', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + ], + ) + ], + ) + ], + ), + ), + Card( + margin: EdgeInsets.all(10), + child: Column( + children: [ + TitleContainers(title: 'Condições de Saúde em Geral'), + Row( + children: [ + Container( + height: heigth*0.4, + width: width*0.2, + child: Icon(LineIcons.stethoscope,size: 80,), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SwitchWithSubtitle( + width: width*0.7, + title: 'Gestante', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + InputWithSubtitle( + controller: maternityController, + subtitle: 'Maternidade Referência', + errorInput: 'Campo Obrigatório', + labelInput: 'Maternidade Referência', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + DropdownWithSubtitle( + list: [], + widthSubtitle: width*0.2, + subtitle: 'Peso', + hintDropdown: 'Peso', + select: selectWeight, + widthDropdown: width*0.67, + widthContainerDropdown: width*0.3, + onChanged: (value){ + setState(() { + selectWeight = value!; + }); + }, + colorBorder: ColorPalette.white, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Fumante', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Usa Álcool', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Usa Drogas', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Hipertensão', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Diabetes', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Teve AVC/Derrame', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Teve Infarto', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Está com Hanseníase', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Está com Tuberculose', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Tem ou Teve Câncer', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Internação nos Últimos 12 Meses', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + InputWithSubtitle( + controller: medicalRecordController, + subtitle: 'Motivo', + errorInput: 'Campo Obrigatório', + labelInput: 'Motivo', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + DropdownWithSubtitle( + subtitle: 'Doença Cardíaca', + select: selectHeartDisease, + widthDropdown: width*0.672, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'Doença Cardíaca', + onChanged: (value){ + setState(() { + selectHeartDisease = value; + }); + }, + list: [ + 'SIM MAS NÃO SABE QUAL', + ] + ), + DropdownWithSubtitle( + subtitle: 'Tem ou Teve Problema nos Rins', + select: selectKidneyProblem, + widthDropdown: width*0.672, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'Tem ou Teve Problema nos Rins', + onChanged: (value){ + setState(() { + selectKidneyProblem = value; + }); + }, + list: [ + 'NÃO', + ] + ), + DropdownWithSubtitle( + subtitle: 'Tem Doença Respiratória / Pulmão', + select: selectLungProblem, + widthDropdown: width*0.672, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'Tem Doença Respiratória / Pulmão', + onChanged: (value){ + setState(() { + selectLungProblem = value; + }); + }, + list: [ + 'NÃO', + ] + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Saúde Mental - Tratamento ou Internação', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Acamado', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Domiciliado', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Plantas Medicinais', + value: frequencySchool, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + InputWithSubtitle( + controller: plantsController, + subtitle: 'Quais', + errorInput: 'Campo Obrigatório', + labelInput: 'Quais', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + InputWithSubtitle( + controller: otherCondicionsController, + subtitle: 'Outras Condições de Sáude', + errorInput: 'Campo Obrigatório', + labelInput: 'Outras Condições de Sáude', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + ], + ), + ), + ] + ), + ], + ), + ), + Card( + margin: EdgeInsets.all(10), + child: Column( + children: [ + TitleContainers(title: 'Condição de Rua'), + Row( + children: [ + Container( + height: heigth*0.4, + width: width*0.2, + child: Icon(LineIcons.horizontalEllipsis,size: 80,), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + DropdownWithSubtitle( + subtitle: 'Tempo em Situação de Rua', + select: selectSituationStreet, + widthDropdown: width*0.672, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'Tempo em Situação de Rua', + onChanged: (value){ + setState(() { + selectSituationStreet = value; + }); + }, + list: [ + 'NÃO ESTÁ EM SITUAÇÃO DE RUA', + ] + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Acompanhado por Outra Instituição', + value: enableAccompaniedCompany, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + InputWithSubtitle( + controller: whatCompanyController, + subtitle: 'Qual(is)', + errorInput: 'Campo Obrigatório', + labelInput: 'Qual(is)', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Recebe Algum Benefício', + value: enableAccompaniedCompany, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Possui Referência Familiar', + value: enableAccompaniedCompany, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Visita Algum Familiar com Frequência', + value: enableAccompaniedCompany, + onChanged: (value){ + setState(() { + // enableMother = value; + // if(enableMother){ + // nameMotherController.text = ''; + // } + }); + }, + ), + InputWithSubtitle( + controller: whatCompanyController, + subtitle: 'Parentesco com o Responsável Familiar', + errorInput: 'Campo Obrigatório', + labelInput: 'Parentesco com o Responsável Familiar', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + DropdownWithSubtitle( + subtitle: 'Alimentação Diária', + select: selectSituationStreet, + widthDropdown: width*0.672, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'Alimentação Diária', + onChanged: (value){ + setState(() { + selectSituationStreet = value; + }); + }, + list: [] + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Restaurante Popular', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Doação Restaurante', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Doação Grupo Religioso', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Doação Popular', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Outros', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Acesso a Higiene Pessoal', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Banho', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Sanitário', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Higiene Bucal', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + SwitchWithSubtitle( + width: width*0.7, + title: 'Outros', + value: enableAccompaniedCompany, + onChanged: (value){}, + ), + ], + ), + ), + ] + ), + ], + ), + ), + Card( + margin: EdgeInsets.all(10), + child: Column( + children: [ + TitleContainers(title: 'Profissional Responsável'), + Row( + children: [ + Container( + height: heigth*0.4, + width: width*0.2, + child: Icon(Icons.business_center,size: 80,), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + InputWithSubtitle( + controller: responsibleRegisterController, + subtitle: 'Usuário responsável Pelo Cadastro', + errorInput: 'Campo Obrigatório', + labelInput: 'Usuário responsável Pelo Cadastro', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + ), + InputWithSubtitle( + controller: unitProfessionalController, + subtitle: 'Unidade do Profissional', + errorInput: 'Campo Obrigatório', + labelInput: 'Unidade do Profissional', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + ), + DropdownWithSubtitle( + subtitle: 'CBO', + select: selectCBO, + widthDropdown: width*0.673, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'CBO', + onChanged: (value){ + setState(() { + selectCBO = value; + }); + }, + list: [] + ), + DropdownWithSubtitle( + subtitle: 'Código da Equipe', + select: selectCBO, + widthDropdown: width*0.672, + widthContainerDropdown: width*0.5, + widthSubtitle: width*0.3, + hintDropdown: 'Código da Equipe', + onChanged: (value){ + setState(() { + selectCBO = value; + }); + }, + list: ['INE - 0001558536 / Área 4 - Microárea: - '] + ), + InputWithSubtitle( + controller: dataRegisterController, + subtitle: 'Data do Cadastro', + errorInput: 'Campo Obrigatório', + labelInput: 'Data do Cadastro', + widthInput: width*0.7, + widthSubtitle: width*0.7, + hintInput: 'Escreva aqui', + enable: false, + ), + ], + ), + ), + ] + ), + ], + ), + ), + ] + ) + ), + ), + ); + } +} diff --git a/lib/screens/splash_screen.dart b/lib/screens/splash_screen.dart new file mode 100644 index 0000000..e29b9c1 --- /dev/null +++ b/lib/screens/splash_screen.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:rkm/utils/const_variable.dart'; + +class SplashScreen extends StatefulWidget { + const SplashScreen({Key? key}) : super(key: key); + + @override + State createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + + @override + void initState() { + super.initState(); + timer(); + } + + timer()async{ + Future.delayed(Duration(seconds: 3),(){ + Navigator.pushReplacementNamed(context, '/home'); + }); + } + + @override + Widget build(BuildContext context) { + double width = MediaQuery.of(context).size.width; + return Scaffold( + body: Container( + decoration: ConstVariable().backgroundGradient, + child: Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Image.asset('assets/images/logo.PNG',width: width*0.5,), + CircularProgressIndicator() + ], + ), + ), + ), + ); + } +} diff --git a/lib/utils/routes.dart b/lib/utils/routes.dart index f1e12c8..3eaf293 100644 --- a/lib/utils/routes.dart +++ b/lib/utils/routes.dart @@ -2,6 +2,7 @@ import 'package:rkm/screens/about_screen.dart'; import 'package:rkm/screens/attendance_list_screen.dart'; import 'package:rkm/screens/home_screen.dart'; import 'package:rkm/screens/login_screen.dart'; +import 'package:rkm/screens/splash_screen.dart'; import '../screens/clear_data_screen.dart'; import '../screens/edit_procedures_screen.dart'; import '../screens/import_sigtap_screen.dart'; @@ -21,4 +22,5 @@ var routes = { '/clear_data': (context) => ClearDataScreen(), '/import_sigtap': (context) => ImportSigtapScreen(), '/edit_procedure': (context) => EditProceduresScreen(), + '/splash': (context) => SplashScreen(), }; \ No newline at end of file diff --git a/lib/widgets/check_box_two_subtitle.dart b/lib/widgets/check_box_two_subtitle.dart new file mode 100644 index 0000000..efb029c --- /dev/null +++ b/lib/widgets/check_box_two_subtitle.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; +import 'package:rkm/utils/color_palette.dart'; +import 'package:rkm/widgets/text_default.dart'; + +class CheckBoxTwoSubtitle extends StatelessWidget { + + double width; + String subtitle1; + String subtitle2; + bool checkbox1; + bool checkbox2; + var onChanged1; + var onChanged2; + + CheckBoxTwoSubtitle({ + this.width = double.infinity, + required this.checkbox1, + required this.checkbox2, + required this.subtitle1, + required this.subtitle2, + required this.onChanged1, + required this.onChanged2, +}); + + @override + Widget build(BuildContext context) { + + return Container( + width: width, + child: Row( + children: [ + Checkbox( + value: checkbox1, + onChanged: onChanged1 + ), + Container( + width: width/2.5, + child: TextDefault(text: subtitle1,fontSize: 15,color: ColorPalette.black54,) + ), + Spacer(), + Checkbox( + value: checkbox2, + onChanged: onChanged2 + ), + Container( + width: width/3, + child: TextDefault(text: subtitle2,fontSize: 15,color: ColorPalette.black54) + ), + ], + ), + ); + } +} diff --git a/lib/widgets/dropdown_with_subtitle.dart b/lib/widgets/dropdown_with_subtitle.dart index 843b3c4..84c84f0 100644 --- a/lib/widgets/dropdown_with_subtitle.dart +++ b/lib/widgets/dropdown_with_subtitle.dart @@ -14,6 +14,7 @@ class DropdownWithSubtitle extends StatelessWidget { double widthContainerDropdown; List list; var onChanged; + Color colorBorder; DropdownWithSubtitle({ required this.subtitle, @@ -24,6 +25,7 @@ class DropdownWithSubtitle extends StatelessWidget { required this.hintDropdown, required this.onChanged, required this.list, + this.colorBorder = ColorPalette.black54, }); @override @@ -47,7 +49,7 @@ class DropdownWithSubtitle extends StatelessWidget { Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), - border: Border.all(color: ColorPalette.black54) + border: Border.all(color: colorBorder) ), margin: EdgeInsets.symmetric(horizontal: 5), padding: EdgeInsets.symmetric(horizontal: 2), diff --git a/lib/widgets/switch_with_subtitle.dart b/lib/widgets/switch_with_subtitle.dart index fc17ac9..e235bf6 100644 --- a/lib/widgets/switch_with_subtitle.dart +++ b/lib/widgets/switch_with_subtitle.dart @@ -21,7 +21,7 @@ class SwitchWithSubtitle extends StatelessWidget { width: width, child: Row( children: [ - TextDefault(text: title,color: ColorPalette.black54,), + TextDefault(text: title,color: ColorPalette.black54,fontSize: 18), Spacer(), Switch( value: value, diff --git a/lib/widgets/title_containers.dart b/lib/widgets/title_containers.dart index 5b90867..1b914a9 100644 --- a/lib/widgets/title_containers.dart +++ b/lib/widgets/title_containers.dart @@ -5,16 +5,18 @@ import 'package:rkm/widgets/text_default.dart'; class TitleContainers extends StatelessWidget { String title; + double width; TitleContainers({ - required this.title + required this.title, + this.width = double.infinity }); @override Widget build(BuildContext context) { return Container( padding: ConstVariable().marginHightInput, - width: double.infinity, + width: width, color: ColorPalette.titleContainer, child: TextDefault(text: title,fontWeigth: FontWeight.bold,textAlign: TextAlign.center,color: ColorPalette.black54,), ); diff --git a/pubspec.lock b/pubspec.lock index 359c189..ea2f930 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -107,6 +107,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.4" + line_icons: + dependency: "direct main" + description: + name: line_icons + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" lints: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c23b187..5a00053 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: cupertino_icons: ^1.0.2 intl: package_info_plus: ^3.0.2 + line_icons: ^2.0.1 dev_dependencies: flutter_test: