criada a tela attendance_list_screen.dart, about_screen.dart e main_procedures_screen.dart
This commit is contained in:
96
lib/screens/about_screen.dart
Normal file
96
lib/screens/about_screen.dart
Normal file
@@ -0,0 +1,96 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:rkm/utils/color_palette.dart';
|
||||
import 'package:rkm/utils/const_variable.dart';
|
||||
import 'package:rkm/widgets/button_default.dart';
|
||||
import 'package:rkm/widgets/text_default.dart';
|
||||
|
||||
class AboutScreen extends StatefulWidget {
|
||||
|
||||
@override
|
||||
State<AboutScreen> createState() => _AboutScreenState();
|
||||
}
|
||||
|
||||
class _AboutScreenState extends State<AboutScreen> {
|
||||
@override
|
||||
|
||||
|
||||
String version = '';
|
||||
|
||||
getVersion()async{
|
||||
await PackageInfo.fromPlatform().then((value){
|
||||
setState(() {
|
||||
version =value.version;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
|
||||
getVersion();
|
||||
|
||||
return Scaffold(
|
||||
bottomSheet: Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
color: ColorPalette.appBar,
|
||||
child: Row(
|
||||
children: [
|
||||
TextDefault(text: 'www.rkmsistemas.com.br',color: ColorPalette.white,),
|
||||
Spacer(),
|
||||
ButtonDefault(
|
||||
onPressed:()=> Navigator.pop(context),
|
||||
title: 'Voltar',
|
||||
borderColor: ColorPalette.appBar,
|
||||
textColor: ColorPalette.white,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: ConstVariable().backgroundGradient,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 70),
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset('assets/images/logo.PNG',width: width*0.5,),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: TextDefault(
|
||||
text: 'HOMOLOGAÇÃO',
|
||||
color: ColorPalette.red,
|
||||
fontSize: 30,
|
||||
fontWeigth: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 5.0),
|
||||
child: TextDefault(
|
||||
text: 'Versão $version',
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 30,
|
||||
fontWeigth: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 5.0),
|
||||
child: TextDefault(
|
||||
text: 'RKM Sistemas Ltda.\n\n'
|
||||
'(19) 2532-2668\n\n'
|
||||
'(19) 2532-2669',
|
||||
textAlign: TextAlign.center,
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 20,
|
||||
fontWeigth: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
74
lib/screens/attendance_list_screen.dart
Normal file
74
lib/screens/attendance_list_screen.dart
Normal file
@@ -0,0 +1,74 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/utils/color_palette.dart';
|
||||
import 'package:rkm/utils/const_variable.dart';
|
||||
import 'package:rkm/widgets/text_default.dart';
|
||||
import '../widgets/appbar_default.dart';
|
||||
|
||||
class AttendanceListScreen extends StatefulWidget {
|
||||
const AttendanceListScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AttendanceListScreen> createState() => _AttendanceListScreenState();
|
||||
}
|
||||
|
||||
class _AttendanceListScreenState extends State<AttendanceListScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarDefault().appbar(context, 'RKM AB - Lista Atendimentos'),
|
||||
body: Container(
|
||||
decoration: ConstVariable().backgroundGradient,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: ListView(
|
||||
children: [
|
||||
Container(
|
||||
padding: ConstVariable().marginHightInput,
|
||||
color: ColorPalette.white,
|
||||
child: Column(
|
||||
children: [
|
||||
TextDefault(
|
||||
text: 'Atendimentos Domiciliares: 0 | Atendimento Individuais: 0',
|
||||
fontWeigth: FontWeight.bold,
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 18,
|
||||
),
|
||||
TextDefault(
|
||||
text: 'Atendimentos Odontológicos: 0 | Avaliação Elegibilidade: 0',
|
||||
fontWeigth: FontWeight.bold,
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 18,
|
||||
),
|
||||
TextDefault(
|
||||
text: 'Cadastros Cidadãos Realizados / Atualizados : 0',
|
||||
fontWeigth: FontWeight.bold,
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 18,
|
||||
),
|
||||
TextDefault(
|
||||
text: 'Fichas Complementares: 0 | Marcadores de Consumo : 0',
|
||||
fontWeigth: FontWeight.bold,
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 18,
|
||||
),
|
||||
TextDefault(
|
||||
text: 'Procedimentos Consolidados: 0 | Procedimentos Individuais : 0',
|
||||
fontWeigth: FontWeight.bold,
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 18,
|
||||
),
|
||||
TextDefault(
|
||||
text: 'Visitas Domiciliares: 0',
|
||||
fontWeigth: FontWeight.bold,
|
||||
color: ColorPalette.black54,
|
||||
fontSize: 18,
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/utils/color_palette.dart';
|
||||
import 'package:rkm/utils/const_variable.dart';
|
||||
import 'package:rkm/widgets/icon_button_default.dart';
|
||||
import 'package:rkm/widgets/input_search_text.dart';
|
||||
import 'package:rkm/widgets/input_text.dart';
|
||||
|
||||
import '../widgets/appbar_default.dart';
|
||||
import '../widgets/item_citizen.dart';
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
@@ -22,7 +24,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text('RKM - Inicial'),centerTitle: true),
|
||||
appBar: AppBarDefault().appbar(context, 'RKM AB - Início'),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
width: width,
|
||||
@@ -44,7 +46,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
),
|
||||
IconButtonDefault(
|
||||
icon: Icons.article,
|
||||
onPressed: (){}
|
||||
onPressed: ()=>Navigator.pushNamed(context, '/attendance_list')
|
||||
),
|
||||
IconButtonDefault(
|
||||
icon: Icons.edit_note,
|
||||
|
||||
23
lib/screens/main_procedures_screen.dart
Normal file
23
lib/screens/main_procedures_screen.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/utils/const_variable.dart';
|
||||
import 'package:rkm/widgets/appbar_default.dart';
|
||||
|
||||
class MainProceduresScreen extends StatefulWidget {
|
||||
const MainProceduresScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MainProceduresScreen> createState() => _MainProceduresScreenState();
|
||||
}
|
||||
|
||||
class _MainProceduresScreenState extends State<MainProceduresScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarDefault().appbar(context, 'RKM AB - Procedimentos Iniciais'),
|
||||
body: Container(
|
||||
decoration: ConstVariable().backgroundGradient,
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ class _RegisterCitizenScreenState extends State<RegisterCitizenScreen> {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
decoration: ConstVariable().backgroundGradient,
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
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 '../screens/main_procedures_screen.dart';
|
||||
import '../screens/register_citizen_screen.dart';
|
||||
|
||||
var routes = {
|
||||
'/home': (context) => const HomeScreen(),
|
||||
'/login': (context) => const LoginScreen(),
|
||||
'/register_citizen': (context) => const RegisterCitizenScreen(),
|
||||
'/home': (context) => HomeScreen(),
|
||||
'/login': (context) => LoginScreen(),
|
||||
'/register_citizen': (context) => RegisterCitizenScreen(),
|
||||
'/attendance_list': (context) => AttendanceListScreen(),
|
||||
'/about': (context) => AboutScreen(),
|
||||
'/main_procedures': (context) => MainProceduresScreen(),
|
||||
};
|
||||
73
lib/widgets/alert_dialog_settings.dart
Normal file
73
lib/widgets/alert_dialog_settings.dart
Normal file
@@ -0,0 +1,73 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/utils/const_variable.dart';
|
||||
import 'package:rkm/widgets/button_default.dart';
|
||||
import 'package:rkm/widgets/item_alert_settings.dart';
|
||||
import 'package:rkm/widgets/text_default.dart';
|
||||
class AlertDialogSettings {
|
||||
|
||||
@override
|
||||
alert(BuildContext context) {
|
||||
return showDialog(
|
||||
context: context,
|
||||
builder: (context){
|
||||
return AlertDialog(
|
||||
title: TextDefault(text: 'Configurações'),
|
||||
content: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
width: double.infinity,
|
||||
decoration: ConstVariable().backgroundGradient,
|
||||
child: Column(
|
||||
children: [
|
||||
ItemAlertSettings(
|
||||
onTap: (){},
|
||||
title: 'Importar SIGTAP',
|
||||
body: 'Atulizar as informações do SIGTAP no aplicativo\n'
|
||||
'(com base no ConectaSUS)',
|
||||
icon: Icons.refresh
|
||||
),
|
||||
ItemAlertSettings(
|
||||
onTap: (){},
|
||||
title: 'Limpar Dados',
|
||||
body: 'Apaga todos os dados do Aplicativo.\n'
|
||||
'Todos os Cadastros e Atendimento serão\n'
|
||||
'excluídos e uma Carga Inicial deverá ser realizada\n'
|
||||
'para atulizar novamente o aplicativo.',
|
||||
icon: Icons.delete
|
||||
),
|
||||
ItemAlertSettings(
|
||||
onTap: ()=>Navigator.pushNamed(context, '/main_procedures'),
|
||||
title: 'Definir Procedimentos Iniciais',
|
||||
body: 'Define os Procedimentos iniciais que deverão ser\n'
|
||||
'incluídos nas fichas de atendimentos\n',
|
||||
icon: Icons.auto_fix_high
|
||||
),
|
||||
ItemAlertSettings(
|
||||
onTap: (){
|
||||
Navigator.pop(context);
|
||||
Navigator.pushNamed(context, '/about');
|
||||
},
|
||||
title: 'Sobre',
|
||||
body: '\n\n',
|
||||
icon: Icons.info
|
||||
),
|
||||
ItemAlertSettings(
|
||||
onTap: (){},
|
||||
title: 'Sincronia de Envio',
|
||||
body: 'Efetua a Sincronia de Envio levandoas informações\n'
|
||||
'do dispositivo para o ConectaSUS.',
|
||||
icon: Icons.delete
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
ButtonDefault(
|
||||
onPressed: ()=>Navigator.pop(context),
|
||||
title: 'Fechar',
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
29
lib/widgets/appbar_default.dart
Normal file
29
lib/widgets/appbar_default.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/widgets/alert_dialog_settings.dart';
|
||||
import '../utils/color_palette.dart';
|
||||
import 'icon_button_default.dart';
|
||||
|
||||
class AppBarDefault{
|
||||
|
||||
@override
|
||||
PreferredSize appbar(BuildContext context,String title) {
|
||||
return PreferredSize(
|
||||
preferredSize: Size.fromHeight(50),
|
||||
child: AppBar(
|
||||
title: Text(title),
|
||||
centerTitle: true,
|
||||
actions: [
|
||||
IconButtonDefault(
|
||||
icon: Icons.settings,
|
||||
color: ColorPalette.white,
|
||||
onPressed: ()=>AlertDialogSettings().alert(context)
|
||||
),
|
||||
IconButtonDefault(
|
||||
icon: Icons.logout,
|
||||
color: ColorPalette.white,
|
||||
onPressed: ()=>Navigator.pushNamedAndRemoveUntil(context, '/login',(Route<dynamic> route) => false)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,17 +4,19 @@ import 'package:rkm/utils/color_palette.dart';
|
||||
class IconButtonDefault extends StatelessWidget {
|
||||
var onPressed;
|
||||
IconData icon;
|
||||
Color color;
|
||||
|
||||
IconButtonDefault({
|
||||
required this.icon,
|
||||
required this.onPressed,
|
||||
this.color = ColorPalette.black54
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IconButton(
|
||||
onPressed: onPressed,
|
||||
icon: Icon(icon,color: ColorPalette.black54,size: 30,)
|
||||
icon: Icon(icon,color: color,size: 30,)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
45
lib/widgets/item_alert_settings.dart
Normal file
45
lib/widgets/item_alert_settings.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/widgets/text_default.dart';
|
||||
import '../utils/color_palette.dart';
|
||||
import '../utils/const_variable.dart';
|
||||
class ItemAlertSettings extends StatelessWidget {
|
||||
|
||||
var onTap;
|
||||
String title;
|
||||
String body;
|
||||
IconData icon;
|
||||
|
||||
ItemAlertSettings({
|
||||
required this.title,
|
||||
required this.body,
|
||||
required this.icon,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Card(
|
||||
color: ColorPalette.white,
|
||||
child: Container(
|
||||
margin: ConstVariable().marginHightInput,
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ListTile(
|
||||
title: Container(
|
||||
width: width*0.8,
|
||||
child: TextDefault(text: title,fontWeigth: FontWeight.bold,color: ColorPalette.black54,)
|
||||
),
|
||||
subtitle: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: TextDefault(text: body,fontSize: 14),
|
||||
),
|
||||
trailing: Icon(icon,size: 30,color: ColorPalette.black54,),
|
||||
onTap: onTap,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7,18 +7,21 @@ class TextDefault extends StatelessWidget {
|
||||
double fontSize;
|
||||
Color color;
|
||||
FontWeight fontWeigth;
|
||||
TextAlign textAlign;
|
||||
|
||||
TextDefault({
|
||||
required this.text,
|
||||
this.fontSize = 20.0,
|
||||
this.color = ColorPalette.gray,
|
||||
this.fontWeigth = FontWeight.normal
|
||||
this.fontWeigth = FontWeight.normal,
|
||||
this.textAlign = TextAlign.start
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
text,
|
||||
textAlign: textAlign,
|
||||
style: TextStyle(
|
||||
fontSize: fontSize,
|
||||
fontWeight: fontWeigth,
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import package_info_plus
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
|
||||
}
|
||||
|
||||
69
pubspec.lock
69
pubspec.lock
@@ -50,6 +50,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@@ -67,6 +74,25 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
http:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.5"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -74,6 +100,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.18.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.4"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -102,6 +135,20 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
package_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
package_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -109,6 +156,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@@ -156,6 +210,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.12"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -163,5 +224,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.1.1"
|
||||
sdks:
|
||||
dart: ">=2.18.6 <3.0.0"
|
||||
flutter: ">=2.11.0"
|
||||
|
||||
Reference in New Issue
Block a user