criada a tela attendance_list_screen.dart, about_screen.dart e main_procedures_screen.dart
This commit is contained in:
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,
|
||||
|
||||
Reference in New Issue
Block a user