90 lines
3.8 KiB
Dart
90 lines
3.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm/config/const_variable.dart';
|
|
import 'package:rkm/screens/configurations/clear_data_screen.dart';
|
|
import 'package:rkm/screens/configurations/import_sigtap_screen.dart';
|
|
import 'package:rkm/screens/configurations/main_procedures_screen.dart';
|
|
import 'package:rkm/screens/configurations/sync_data_screen.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, String username) {
|
|
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: (){
|
|
Navigator.pop(context);
|
|
Navigator.push(context,MaterialPageRoute(builder: (context) => ImportSigtapScreen(username: username,)));
|
|
},
|
|
title: 'Importar SIGTAP',
|
|
body: 'Atulizar as informações do SIGTAP no aplicativo\n'
|
|
'(com base no ConectaSUS)',
|
|
icon: Icons.refresh
|
|
),
|
|
ItemAlertSettings(
|
|
onTap: (){
|
|
Navigator.pop(context);
|
|
Navigator.push(context,MaterialPageRoute(builder:(context) => ClearDataScreen(username: username,)));
|
|
},
|
|
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.pop(context);
|
|
Navigator.push(context,MaterialPageRoute(builder:(context) => MainProceduresScreen(username:username,)));
|
|
},
|
|
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: (){
|
|
Navigator.pop(context);
|
|
Navigator.push(context,MaterialPageRoute(builder:(context) => SyncDataScreen(username: username,)));
|
|
},
|
|
title: 'Sincronia de Envio',
|
|
body: 'Efetua a Sincronia de Envio levandoas informações\n'
|
|
'do dispositivo para o ConectaSUS.',
|
|
icon: Icons.send
|
|
),
|
|
],
|
|
),
|
|
),
|
|
actions: [
|
|
ButtonDefault(
|
|
onPressed: ()=>Navigator.pop(context),
|
|
title: 'Fechar',
|
|
)
|
|
],
|
|
);
|
|
}
|
|
);
|
|
}
|
|
}
|