fix handtap qrcode for async setState
This commit is contained in:
parent
6f3b98ed69
commit
330d86c102
|
@ -14,8 +14,10 @@ import 'package:hub/backend/api_requests/api_calls.dart';
|
|||
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||
import 'package:hub/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart';
|
||||
import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/details_component/details_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
|
||||
|
@ -446,9 +448,20 @@ class NotificationHandler {
|
|||
vteUUID: message['idVisitante'].toString(),
|
||||
vawRef: message['referencia'].toString(),
|
||||
vawStatus: 'S',
|
||||
buttons: [],
|
||||
labelsHashMap: Map<String, String>.from({
|
||||
'key': message['documento'],
|
||||
'value': 'E',
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Visitor',
|
||||
ptText: 'Visitante',
|
||||
): message['nomevisita'],
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Reason',
|
||||
ptText: 'Motivo',
|
||||
): message['motivo'],
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Message',
|
||||
ptText: 'Mensagem',
|
||||
): message['mensagem'],
|
||||
}),
|
||||
imageHashMap: Map<String, String>.from({
|
||||
'key': message['documento'],
|
||||
|
@ -459,7 +472,7 @@ class NotificationHandler {
|
|||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Pending',
|
||||
ptText: 'Pendente',
|
||||
): FlutterFlowTheme.of(context).primary,
|
||||
): FlutterFlowTheme.of(context).warning,
|
||||
},
|
||||
],
|
||||
changeStatusAction: changeStatusAction,
|
||||
|
|
|
@ -0,0 +1,415 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:hub/components/templates_components/details_component/details_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
bool? getStatus(dynamic data) {
|
||||
return data == 'A'
|
||||
? true
|
||||
: data == 'F' || data == 'B' || data == 'C' || data == 'I'
|
||||
? false
|
||||
: null;
|
||||
}
|
||||
|
||||
Widget buildDetails(
|
||||
dynamic visitaWrapItem,
|
||||
BuildContext context,
|
||||
Future<dynamic> Function(BuildContext, String, String, String, String)?
|
||||
changeStatusAction) {
|
||||
return VisitRequestTemplateComponentWidget(
|
||||
vteName: 'Lorem Ipsus',
|
||||
vteReason: 'Lorem Ipsus',
|
||||
vawDate: 'Lorem Ipsus',
|
||||
vawStatus: 'Lorem Ipsus',
|
||||
vteMsg: 'Lorem Ipsus',
|
||||
vteUUID: 'Lorem Ipsus',
|
||||
cliUUID: FFAppState().cliUUID,
|
||||
msgUUID: 'Lorem Ipsus',
|
||||
vawDestino: 'Lorem Ipsus',
|
||||
vawUUID: 'Lorem Ipsus',
|
||||
vawName: 'Lorem Ipsus',
|
||||
vawRef: 'Lorem Ipsus',
|
||||
|
||||
changeStatusAction: changeStatusAction,
|
||||
buttons: [
|
||||
if (getStatus(visitaWrapItem['VAW_STATUS']) == null) // ACCEPT ACTION
|
||||
FlutterFlowIconButton(
|
||||
icon: const Icon(Icons.done),
|
||||
onPressed: () async {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Aprovar Visita',
|
||||
enText: 'Approve Visit',
|
||||
),
|
||||
),
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Você tem certeza que deseja aprovar essa visita?',
|
||||
enText: 'Are you sure you want to approve this visit?',
|
||||
),
|
||||
),
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
actions: [
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'No',
|
||||
ptText: 'Não',
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Yes',
|
||||
ptText: 'Sim',
|
||||
),
|
||||
onPressed: () async {
|
||||
await changeStatusAction?.call(
|
||||
context,
|
||||
'L',
|
||||
visitaWrapItem['VAW_REF'] ?? '',
|
||||
'Mensagem',
|
||||
visitaWrapItem['VTE_ID'] ?? '',
|
||||
);
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
if (getStatus(visitaWrapItem['VAW_STATUS']) == null) // REJECT ACTION
|
||||
FlutterFlowIconButton(
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: () async {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Bloquear Visita',
|
||||
enText: 'Block Visit',
|
||||
),
|
||||
),
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Você tem certeza que deseja bloquear essa visita?',
|
||||
enText: 'Are you sure you want to block this visit?',
|
||||
),
|
||||
),
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
actions: [
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'No',
|
||||
ptText: 'Não',
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Yes',
|
||||
ptText: 'Sim',
|
||||
),
|
||||
onPressed: () async {
|
||||
// await changeStatusAction?.call(
|
||||
// context,
|
||||
// 'B',
|
||||
// visitaWrapItem['VAW_REF'] ?? '',
|
||||
// 'Mensagem',
|
||||
// visitaWrapItem['VTE_ID'] ?? '',
|
||||
// );
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
if (getStatus(visitaWrapItem['VAW_STATUS']) == false) // RECALL ACTION
|
||||
FlutterFlowIconButton(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () async {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Bloquear Visita',
|
||||
enText: 'Block Visit',
|
||||
),
|
||||
),
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Você tem certeza que deseja bloquear essa visita?',
|
||||
enText: 'Are you sure you want to block this visit?',
|
||||
),
|
||||
),
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
actions: [
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'No',
|
||||
ptText: 'Não',
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
),
|
||||
FFButtonWidget(
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Yes',
|
||||
ptText: 'Sim',
|
||||
),
|
||||
onPressed: () async {
|
||||
// await changeStatusAction?.call(
|
||||
// context,
|
||||
// 'B',
|
||||
// visitaWrapItem['VAW_REF'] ?? '',
|
||||
// 'Mensagem',
|
||||
// visitaWrapItem['VTE_ID'] ?? '',
|
||||
// );
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
if (getStatus(visitaWrapItem['VAW_STATUS']) == false) // SHARE ACTION
|
||||
FlutterFlowIconButton(
|
||||
icon: const Icon(Icons.share),
|
||||
onPressed: () async {
|
||||
Share.share(r'''
|
||||
Olá ${visitaWrapItem['VTE_NOME']}
|
||||
Você foi convidado para ${visitaWrapItem['NAC_DESCRICAO']}
|
||||
|
||||
Validade do Convite:
|
||||
visitaWrapItem['VAW_DTINICIO']
|
||||
visitaWrapItem['VAW_DTFIM']
|
||||
|
||||
URL do Convite: https://visita.freaccess.com.br/${visitaWrapItem['VAW_ID']}/${visitaWrapItem['CLI_ID']}/${visitaWrapItem['VAW_CHAVE']}
|
||||
''');
|
||||
},
|
||||
),
|
||||
|
||||
// if (getStatus(visitaWrapItem['VAW_STATUS']) == null) // SEND ACTION
|
||||
// FlutterFlowIconButton(
|
||||
// icon: const Icon(Icons.send),
|
||||
// onPressed: () async {
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (context) {
|
||||
// return AlertDialog(
|
||||
// title: Text(
|
||||
// FFLocalizations.of(context).getVariableText(
|
||||
// ptText: 'Bloquear Visita',
|
||||
// enText: 'Block Visit',
|
||||
// ),
|
||||
// ),
|
||||
// content: Text(
|
||||
// FFLocalizations.of(context).getVariableText(
|
||||
// ptText:
|
||||
// 'Você tem certeza que deseja bloquear essa visita?',
|
||||
// enText: 'Are you sure you want to block this visit?',
|
||||
// ),
|
||||
// ),
|
||||
// backgroundColor:
|
||||
// FlutterFlowTheme.of(context).primaryBackground,
|
||||
// actions: [
|
||||
// FFButtonWidget(
|
||||
// text: FFLocalizations.of(context).getVariableText(
|
||||
// enText: 'No',
|
||||
// ptText: 'Não',
|
||||
// ),
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context);
|
||||
// },
|
||||
// options: FFButtonOptions(
|
||||
// width: 100,
|
||||
// height: 40,
|
||||
// color:
|
||||
// FlutterFlowTheme.of(context).primaryBackground,
|
||||
// textStyle: TextStyle(
|
||||
// color: FlutterFlowTheme.of(context).primaryText,
|
||||
// ),
|
||||
// borderSide: BorderSide(
|
||||
// color: FlutterFlowTheme.of(context)
|
||||
// .primaryBackground,
|
||||
// width: 1,
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(10)),
|
||||
// ),
|
||||
// FFButtonWidget(
|
||||
// text: FFLocalizations.of(context).getVariableText(
|
||||
// enText: 'Yes',
|
||||
// ptText: 'Sim',
|
||||
// ),
|
||||
// onPressed: () async {
|
||||
// // await changeStatusAction?.call(
|
||||
// // context,
|
||||
// // 'B',
|
||||
// // visitaWrapItem['VAW_REF'] ?? '',
|
||||
// // 'Mensagem',
|
||||
// // visitaWrapItem['VTE_ID'] ?? '',
|
||||
// // );
|
||||
// },
|
||||
// options: FFButtonOptions(
|
||||
// width: 100,
|
||||
// height: 40,
|
||||
// color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
// textStyle: TextStyle(
|
||||
// color: FlutterFlowTheme.of(context).primaryText,
|
||||
// ),
|
||||
// borderSide: BorderSide(
|
||||
// color:
|
||||
// FlutterFlowTheme.of(context).primaryBackground,
|
||||
// width: 1,
|
||||
// ),
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
labelsHashMap: Map<String, String>.from({
|
||||
'Nome': visitaWrapItem['VTE_NOME'] ?? '',
|
||||
'Inicio': visitaWrapItem['VAW_DTINICIO'] ?? '',
|
||||
'Fim': visitaWrapItem['VAW_DTFIM'] ?? '',
|
||||
}),
|
||||
imageHashMap: Map<String, String>.from({
|
||||
'key': visitaWrapItem['VTE_DOCUMENTO'] ?? '',
|
||||
'value': 'E',
|
||||
}),
|
||||
statusHashMap: [
|
||||
getStatus(visitaWrapItem['VAW_STATUS']) == true
|
||||
? Map<String, Color>.from({
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ativo',
|
||||
enText: 'Active',
|
||||
): FlutterFlowTheme.of(context).success,
|
||||
})
|
||||
: getStatus(visitaWrapItem['VAW_STATUS']) == null
|
||||
? Map<String, Color>.from({
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Pendente',
|
||||
enText: 'Pending',
|
||||
): FlutterFlowTheme.of(context).warning,
|
||||
})
|
||||
: Map<String, Color>.from({
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Cancelado',
|
||||
enText: 'Canceled',
|
||||
): FlutterFlowTheme.of(context).error,
|
||||
}),
|
||||
],
|
||||
// vteDocument: liberationHistoryItem['VTE_DOCUMENTO'],
|
||||
);
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/details_component/details_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||
|
||||
class VisitRequestTemplateComponentModel
|
|
@ -0,0 +1,357 @@
|
|||
import 'dart:collection';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/templates_components/details_component/details_component_model.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class VisitRequestTemplateComponentWidget extends StatefulWidget {
|
||||
const VisitRequestTemplateComponentWidget({
|
||||
Key? key,
|
||||
required this.vteName,
|
||||
required this.vteReason,
|
||||
required this.vteMsg,
|
||||
this.vteDocument,
|
||||
this.cliUUID,
|
||||
this.vteUUID,
|
||||
this.vawName,
|
||||
this.msgUUID,
|
||||
this.vawRef,
|
||||
this.vawUUID,
|
||||
this.vawDestino,
|
||||
required this.vawStatus,
|
||||
this.vawDate,
|
||||
this.changeStatusAction,
|
||||
required this.labelsHashMap,
|
||||
required this.statusHashMap,
|
||||
required this.imageHashMap,
|
||||
this.onTapCardItemAction,
|
||||
required this.buttons,
|
||||
});
|
||||
|
||||
final Map<String, String> labelsHashMap;
|
||||
final List<Map<String, Color>?> statusHashMap;
|
||||
final Map<String, String> imageHashMap;
|
||||
final Future Function()? onTapCardItemAction;
|
||||
final List<Widget> buttons;
|
||||
|
||||
final String? vteName;
|
||||
final String? vteReason;
|
||||
final String? vteMsg;
|
||||
final String? vteDocument;
|
||||
final String? cliUUID;
|
||||
final String? vteUUID;
|
||||
final String? vawName;
|
||||
final String? msgUUID;
|
||||
final String? vawRef;
|
||||
final String? vawUUID;
|
||||
final String? vawDestino;
|
||||
final String? vawStatus;
|
||||
final String? vawDate;
|
||||
|
||||
final Future Function(
|
||||
BuildContext context,
|
||||
String status,
|
||||
String vawREF,
|
||||
String msg,
|
||||
String vteUUID,
|
||||
)? changeStatusAction;
|
||||
|
||||
@override
|
||||
State<VisitRequestTemplateComponentWidget> createState() =>
|
||||
_VisitRequestTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _VisitRequestTemplateComponentWidgetState
|
||||
extends State<VisitRequestTemplateComponentWidget> {
|
||||
late VisitRequestTemplateComponentModel _model;
|
||||
|
||||
LinkedHashMap<String, String> get labelsLinkedHashMap =>
|
||||
LinkedHashMap.from(widget.labelsHashMap ?? {});
|
||||
|
||||
List<LinkedHashMap<String, Color>> get statusLinkedHashMap =>
|
||||
widget.statusHashMap
|
||||
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
||||
.toList();
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => VisitRequestTemplateComponentModel());
|
||||
|
||||
_model.textController1 ??= TextEditingController(text: widget.vteName);
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
||||
_model.textController2 ??= TextEditingController(text: widget.vteReason);
|
||||
_model.textFieldFocusNode2 ??= FocusNode();
|
||||
|
||||
_model.textController3 ??= TextEditingController(text: widget.vteMsg);
|
||||
_model.textFieldFocusNode3 ??= FocusNode();
|
||||
|
||||
_model.textController4 ??= TextEditingController(text: widget.vawDate);
|
||||
_model.textFieldFocusNode4 ??= FocusNode();
|
||||
|
||||
_model.textController5 ??= TextEditingController();
|
||||
_model.textFieldFocusNode5 ??= FocusNode();
|
||||
|
||||
_model.textControllerStatus ??=
|
||||
TextEditingController(text: widget.vawStatus);
|
||||
_model.textFieldFocusNodeStatus ??= FocusNode();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
log('VAW_STATUS: ${statusLinkedHashMap}');
|
||||
context.watch<FFAppState>();
|
||||
bool isLoaded = false;
|
||||
final pending = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Pending',
|
||||
ptText: 'Pendente',
|
||||
);
|
||||
final active = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Ativo',
|
||||
ptText: 'Ativo',
|
||||
);
|
||||
final canceled = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Canceled',
|
||||
ptText: 'Cancelado',
|
||||
);
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Container(
|
||||
width: constraints.maxWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(25.0)),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 150.0,
|
||||
height: 150.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 100),
|
||||
fadeOutDuration: const Duration(milliseconds: 100),
|
||||
imageUrl:
|
||||
'https://freaccess.com.br/freaccess/getImage.php?cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.imageHashMap['key']}&tipo=${widget.imageHashMap['value']}',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: statusLinkedHashMap.expand((linkedHashMap) {
|
||||
return linkedHashMap.entries
|
||||
.map((MapEntry<String, Color> item) {
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: TextFormField(
|
||||
// controller: _model.textControllerStatus,
|
||||
// focusNode: _model.textFieldFocusNodeStatus,
|
||||
autofocus: false,
|
||||
canRequestFocus: false,
|
||||
readOnly: true,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: item.value,
|
||||
),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: item.value,
|
||||
labelText: item.key,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder: InputBorder.none,
|
||||
suffixIcon: Icon(
|
||||
Icons.info,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model.textController1Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList();
|
||||
}).toList(),
|
||||
),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: labelsLinkedHashMap.length,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
String key = labelsLinkedHashMap.keys.elementAt(index);
|
||||
String value = labelsLinkedHashMap[key]!;
|
||||
// return Text('key: $key, value: $value');
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10.0, vertical: 3.0),
|
||||
child: TextFormField(
|
||||
readOnly: true,
|
||||
initialValue: '$value',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
),
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
labelText: key,
|
||||
filled: true,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(context).primaryBackground,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground, // Change border color here
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (widget.buttons.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: widget.buttons,
|
||||
),
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(height: 20.0))
|
||||
.addToEnd(const SizedBox(height: 20.0))
|
||||
.addToStart(const SizedBox(height: 20.0)),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,279 +0,0 @@
|
|||
import 'dart:collection';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class VisitRequestTemplateComponentWidget extends StatefulWidget {
|
||||
const VisitRequestTemplateComponentWidget({
|
||||
Key? key,
|
||||
required this.vteName,
|
||||
required this.vteReason,
|
||||
required this.vteMsg,
|
||||
this.vteDocument,
|
||||
this.cliUUID,
|
||||
this.vteUUID,
|
||||
this.vawName,
|
||||
this.msgUUID,
|
||||
this.vawRef,
|
||||
this.vawUUID,
|
||||
this.vawDestino,
|
||||
required this.vawStatus,
|
||||
this.vawDate,
|
||||
this.changeStatusAction,
|
||||
required this.labelsHashMap,
|
||||
required this.statusHashMap,
|
||||
required this.imageHashMap,
|
||||
this.onTapCardItemAction,
|
||||
});
|
||||
|
||||
final Map<String, String> labelsHashMap;
|
||||
final List<Map<String, Color>?> statusHashMap;
|
||||
final Map<String, String> imageHashMap;
|
||||
final Future Function()? onTapCardItemAction;
|
||||
|
||||
final String? vteName;
|
||||
final String? vteReason;
|
||||
final String? vteMsg;
|
||||
final String? vteDocument;
|
||||
final String? cliUUID;
|
||||
final String? vteUUID;
|
||||
final String? vawName;
|
||||
final String? msgUUID;
|
||||
final String? vawRef;
|
||||
final String? vawUUID;
|
||||
final String? vawDestino;
|
||||
final String? vawStatus;
|
||||
final String? vawDate;
|
||||
|
||||
final Future Function(
|
||||
BuildContext context,
|
||||
String status,
|
||||
String vawREF,
|
||||
String msg,
|
||||
String vteUUID,
|
||||
)? changeStatusAction;
|
||||
|
||||
@override
|
||||
State<VisitRequestTemplateComponentWidget> createState() =>
|
||||
_VisitRequestTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _VisitRequestTemplateComponentWidgetState
|
||||
extends State<VisitRequestTemplateComponentWidget> {
|
||||
late VisitRequestTemplateComponentModel _model;
|
||||
|
||||
LinkedHashMap<String, String> get labelsLinkedHashMap =>
|
||||
LinkedHashMap.from(widget.labelsHashMap ?? {});
|
||||
|
||||
List<LinkedHashMap<String, Color>> get statusLinkedHashMap =>
|
||||
widget.statusHashMap
|
||||
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
||||
.toList();
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => VisitRequestTemplateComponentModel());
|
||||
|
||||
_model.textController1 ??= TextEditingController(text: widget.vteName);
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
||||
_model.textController2 ??= TextEditingController(text: widget.vteReason);
|
||||
_model.textFieldFocusNode2 ??= FocusNode();
|
||||
|
||||
_model.textController3 ??= TextEditingController(text: widget.vteMsg);
|
||||
_model.textFieldFocusNode3 ??= FocusNode();
|
||||
|
||||
_model.textController4 ??= TextEditingController(text: widget.vawDate);
|
||||
_model.textFieldFocusNode4 ??= FocusNode();
|
||||
|
||||
_model.textController5 ??= TextEditingController();
|
||||
_model.textFieldFocusNode5 ??= FocusNode();
|
||||
|
||||
_model.textControllerStatus ??=
|
||||
TextEditingController(text: widget.vawStatus);
|
||||
_model.textFieldFocusNodeStatus ??= FocusNode();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
bool isLoaded = false;
|
||||
log('------------------ VisitRequestTemplateComponentWidget ------------------');
|
||||
log('vteName: ${widget.imageHashMap}');
|
||||
log('Teste: ${statusLinkedHashMap.expand((linkedHashMap) {
|
||||
return [
|
||||
linkedHashMap.entries
|
||||
.map((MapEntry<String, Color> item) => item.key)
|
||||
.first
|
||||
];
|
||||
}).first}');
|
||||
log('-------------------------------------------------------------------------');
|
||||
final pending = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Pending',
|
||||
ptText: 'Pendente',
|
||||
);
|
||||
final active = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Ativo',
|
||||
ptText: 'Ativo',
|
||||
);
|
||||
final canceled = FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Canceled',
|
||||
ptText: 'Cancelado',
|
||||
);
|
||||
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Container(
|
||||
width: constraints.maxWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(25.0)),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 20.0),
|
||||
Container(
|
||||
width: 150.0,
|
||||
height: 150.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 100),
|
||||
fadeOutDuration: const Duration(milliseconds: 100),
|
||||
imageUrl:
|
||||
'https://freaccess.com.br/freaccess/getImage.php?cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.imageHashMap['key']}&tipo=${widget.imageHashMap['value']}',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
Row(
|
||||
children: statusLinkedHashMap.expand((linkedHashMap) {
|
||||
return linkedHashMap.entries
|
||||
.map((MapEntry<String, Color> item) {
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: TextFormField(
|
||||
// controller: _model.textControllerStatus,
|
||||
// focusNode: _model.textFieldFocusNodeStatus,
|
||||
autofocus: false,
|
||||
canRequestFocus: false,
|
||||
readOnly: true,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: item.value,
|
||||
labelText: item.key,
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
),
|
||||
focusedBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
focusedErrorBorder: InputBorder.none,
|
||||
suffixIcon: Icon(
|
||||
Icons.info,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model.textController1Validator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList();
|
||||
}).toList(),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
// ListView.builder(
|
||||
// shrinkWrap: true,
|
||||
// itemCount: labelsLinkedHashMap.length,
|
||||
// physics: const NeverScrollableScrollPhysics(),
|
||||
// itemBuilder: (context, index) {
|
||||
// String key = labelsLinkedHashMap.keys.elementAt(index);
|
||||
// String value = labelsLinkedHashMap[key]!;
|
||||
// return Text('key: $key, value: $value');
|
||||
// },
|
||||
// ),
|
||||
const SizedBox(height: 20.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import 'package:hub/backend/api_requests/api_calls.dart';
|
|||
import 'package:hub/backend/push_notification/pushNotificationService.dart';
|
||||
|
||||
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/details_component/details_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/custom_functions.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
|
@ -358,6 +358,7 @@ Widget liberationHistoryItemCard(
|
|||
'Mensagem:': liberationHistoryItem['NOT_MSGENVIO'],
|
||||
// 'Resposta:': liberationHistoryItem['NOT_MSGRESPOSTA'],
|
||||
}),
|
||||
buttons: [],
|
||||
statusHashMap: [
|
||||
liberationHistoryItem['NOT_STATUS'] == 'L'
|
||||
? Map<String, Color>.from({
|
||||
|
|
|
@ -5,7 +5,6 @@ import 'dart:developer';
|
|||
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
|
@ -16,6 +15,7 @@ import 'package:hub/pages/message_history_page/message_history_page_model.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MessageHistoryPageWidget extends StatefulWidget {
|
||||
|
@ -31,6 +31,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
late MessageHistoryPageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
int currentPage = 0;
|
||||
int totalPage = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -65,13 +67,13 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
return Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
appBar: appBarMessage(context),
|
||||
body: bodyMessage(context, _model),
|
||||
appBar: buildAppBar(context),
|
||||
body: buildBody(context, _model),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
PreferredSizeWidget appBarMessage(BuildContext context) {
|
||||
PreferredSizeWidget buildAppBar(BuildContext context) {
|
||||
return AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
automaticallyImplyLeading: false,
|
||||
|
@ -107,7 +109,7 @@ PreferredSizeWidget appBarMessage(BuildContext context) {
|
|||
);
|
||||
}
|
||||
|
||||
Widget bodyMessage(BuildContext context, MessageHistoryPageModel _model) {
|
||||
Widget buildBody(BuildContext context, MessageHistoryPageModel _model) {
|
||||
return SafeArea(
|
||||
top: true,
|
||||
child: Column(
|
||||
|
@ -157,16 +159,16 @@ Widget bodyMessage(BuildContext context, MessageHistoryPageModel _model) {
|
|||
),
|
||||
Expanded(
|
||||
child: TabBarView(controller: _model.tabBarController, children: [
|
||||
liberationDynamicListView(context, _model, 'P'),
|
||||
liberationDynamicListView(context, _model, 'A'),
|
||||
liberationDynamicListView(context, _model, 'T'),
|
||||
buildListView(context, _model, 'P'),
|
||||
buildListView(context, _model, 'A'),
|
||||
buildListView(context, _model, 'T'),
|
||||
])),
|
||||
].addToStart(const SizedBox(height: 0)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget liberationDynamicListView(
|
||||
Widget buildListView(
|
||||
BuildContext context, MessageHistoryPageModel _model, String DestIndex) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
|
@ -174,19 +176,29 @@ Widget liberationDynamicListView(
|
|||
decoration: const BoxDecoration(),
|
||||
child: FutureBuilder<dynamic>(
|
||||
future: Future(() async {
|
||||
var body = {
|
||||
'devUUID': FFAppState().devUUID.toString(),
|
||||
'userUUID': FFAppState().userUUID.toString(),
|
||||
'cliID': FFAppState().cliUUID.toString(),
|
||||
'atividade': 'getMensagens',
|
||||
'pageSize': '100',
|
||||
'pageNumber': '1',
|
||||
'tipoDestino': DestIndex.toString(),
|
||||
};
|
||||
try {
|
||||
var response = await PhpGroup.getMessagesCall.call(
|
||||
devUUID: FFAppState().devUUID.toString(),
|
||||
userUUID: FFAppState().userUUID.toString(),
|
||||
cliID: FFAppState().cliUUID.toString(),
|
||||
atividade: 'getMensagens',
|
||||
pageSize: '100',
|
||||
pageNumber: '1',
|
||||
devUUID: body['devUUID'],
|
||||
userUUID: body['userUUID'],
|
||||
cliID: body['cliID'],
|
||||
atividade: body['atividade'],
|
||||
pageSize: body['pageSize'],
|
||||
pageNumber: body['pageNumber'],
|
||||
tipoDestino: DestIndex,
|
||||
);
|
||||
return response.jsonBody;
|
||||
} catch (error) {
|
||||
log('Error: ${error.toString()}');
|
||||
} catch (error, stack) {
|
||||
LogUtil.requestAPIFailed('processRequest.php', jsonEncode(body),
|
||||
'Mensagens não Encontradas', error, stack);
|
||||
return {'mensagens': [], 'total_rows': 0};
|
||||
}
|
||||
}),
|
||||
|
@ -226,7 +238,7 @@ Widget liberationDynamicListView(
|
|||
addRepaintBoundaries: true,
|
||||
cacheExtent: 1000.0,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return messageHistoryItem(
|
||||
return buildListItem(
|
||||
context,
|
||||
snapshot.data!['mensagens'][index],
|
||||
);
|
||||
|
@ -237,7 +249,7 @@ Widget liberationDynamicListView(
|
|||
);
|
||||
}
|
||||
|
||||
Widget messageHistoryItem(BuildContext context, dynamic jsonBody) {
|
||||
Widget buildListItem(BuildContext context, dynamic jsonBody) {
|
||||
log(jsonBody.toString());
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
|
@ -329,24 +341,6 @@ Widget messageHistoryItem(BuildContext context, dynamic jsonBody) {
|
|||
].divide(const SizedBox(height: 4)),
|
||||
),
|
||||
),
|
||||
// Row(
|
||||
// children: [
|
||||
// Icon(
|
||||
// Icons.message,
|
||||
// color: FlutterFlowTheme.of(context).customColor6,
|
||||
// size: 15,
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// jsonBody['MSG_TEXTO'].toString(),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ]
|
||||
// .addToStart(const SizedBox(width: 8))
|
||||
// .addToEnd(const SizedBox(width: 8))),
|
||||
].divide(
|
||||
const SizedBox(height: 8),
|
||||
),
|
||||
|
|
|
@ -91,7 +91,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
Share.share(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Este é o meu identificador de acesse: ${FFAppState().userDevUUID}',
|
||||
'Este é o meu identificador de acesso: ${FFAppState().userDevUUID}',
|
||||
enText: 'This is my access identifier: ${FFAppState().userDevUUID}',
|
||||
),
|
||||
);
|
||||
|
|
|
@ -16,7 +16,6 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
|||
import 'package:hub/pages/qr_code_page/qr_code_page_model.dart';
|
||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
// import 'package:barcode_widget/barcode_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -27,30 +26,23 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
|
||||
|
||||
|
||||
|
||||
class QrCodePageWidget extends StatefulWidget {
|
||||
const QrCodePageWidget({super.key});
|
||||
|
||||
|
||||
@override
|
||||
State<QrCodePageWidget> createState() => _QrCodePageWidgetState();
|
||||
}
|
||||
|
||||
|
||||
|
||||
class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late QrCodePageModel _model;
|
||||
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => QrCodePageModel());
|
||||
|
||||
|
@ -91,17 +83,19 @@ void initState() {
|
|||
// animationsMap['barcodeOnActionTriggerAnimation']!.controller.forward();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
@override
|
||||
void dispose() {
|
||||
// Removendo o ouvinte antes de chamar super.dispose para evitar vazamentos de memória
|
||||
if (animationsMap['barcodeOnActionTriggerAnimation'] != null) {
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!.controller.removeStatusListener((status) {});
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!
|
||||
.controller
|
||||
.removeStatusListener((status) {});
|
||||
}
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -116,7 +110,8 @@ void dispose() {
|
|||
Widget buildBody(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
double screenHeight = MediaQuery.of(context).size.height;
|
||||
double smallerDimension = screenWidth < screenHeight ? screenWidth : screenHeight;
|
||||
double smallerDimension =
|
||||
screenWidth < screenHeight ? screenWidth : screenHeight;
|
||||
double dimension = smallerDimension * 0.75;
|
||||
double totalTimeInSeconds = 100.0;
|
||||
return SafeArea(
|
||||
|
@ -132,8 +127,7 @@ void dispose() {
|
|||
enText: 'Use this QR Code for access',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 20.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
@ -147,13 +141,13 @@ void dispose() {
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
|
||||
onTap: () async {
|
||||
safeSetState(() async {
|
||||
_resetAnimationAndToggleAccess();
|
||||
FFAppState().fingerprint ? await _showBiometricsAuth(context) : await _showQrCodeBottomSheet(context);
|
||||
});
|
||||
|
||||
FFAppState().fingerprint
|
||||
? await _showBiometricsAuth(context)
|
||||
: await _showQrCodeBottomSheet(context);
|
||||
},
|
||||
child: buildQrCode(
|
||||
dimension: dimension,
|
||||
|
@ -164,7 +158,7 @@ void dispose() {
|
|||
),
|
||||
),
|
||||
),
|
||||
if(_model.isAccess == false && _model.key == null)
|
||||
if (_model.isAccess == false && _model.key == null)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0, 0),
|
||||
child: BarcodeWidget(
|
||||
|
@ -206,7 +200,9 @@ void dispose() {
|
|||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
FFAppState().fingerprint ? await _showBiometricsAuth(context) : await _showQrCodeBottomSheet(context);
|
||||
FFAppState().fingerprint
|
||||
? await _showBiometricsAuth(context)
|
||||
: await _showQrCodeBottomSheet(context);
|
||||
},
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Gerar QR Code',
|
||||
|
@ -227,8 +223,7 @@ void dispose() {
|
|||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
),
|
||||
elevation: 3.0,
|
||||
|
@ -253,7 +248,8 @@ void dispose() {
|
|||
visible: _model.isAccess == true,
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Certifique-se de que o QRCode está visivel para o leitor',
|
||||
ptText:
|
||||
'Certifique-se de que o QRCode está visivel para o leitor',
|
||||
enText: 'Make sure the QRCode is visible to the reader',
|
||||
// '6z6kvmhl' /* Certifique-se de que o QRCode ... */,
|
||||
),
|
||||
|
@ -291,15 +287,13 @@ void dispose() {
|
|||
// 'wkjkxd2e' /* Trocando QR code em */,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
|
@ -313,7 +307,8 @@ void dispose() {
|
|||
child: StreamBuilder<double>(
|
||||
stream: getProgressValue(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
return CircularProgressIndicator();
|
||||
} else if (snapshot.hasError) {
|
||||
return Text('Error: ${snapshot.error}');
|
||||
|
@ -332,16 +327,23 @@ void dispose() {
|
|||
onAnimationEnd: () {
|
||||
_resetAnimationAndToggleAccess();
|
||||
},
|
||||
progressColor: FlutterFlowTheme.of(context).primary,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
progressColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
center: Text(
|
||||
'${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s',
|
||||
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.headlineSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).headlineSmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily),
|
||||
),
|
||||
),
|
||||
startAngle: 20.0,
|
||||
|
@ -359,25 +361,26 @@ void dispose() {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Future<void> _showBiometricsAuth(BuildContext context) async {
|
||||
FFAppState().checkBiometrics()
|
||||
.then((value) => FFAppState().authenticateBiometric()
|
||||
.then( (value) {
|
||||
FFAppState()
|
||||
.checkBiometrics()
|
||||
.then((value) => FFAppState().authenticateBiometric().then((value) {
|
||||
safeSetState(() {
|
||||
if (animationsMap['barcodeOnActionTriggerAnimation'] != null) {
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!.controller.stop();
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!.controller.reverse();
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!
|
||||
.controller
|
||||
.stop();
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!
|
||||
.controller
|
||||
.reverse();
|
||||
}
|
||||
_model.isAccess = !_model.isAccess;
|
||||
_model.key = FFAppState().fingerprintPass;
|
||||
});
|
||||
} ))
|
||||
}))
|
||||
.onError((error, StackTrace) {
|
||||
_showQrCodeBottomSheet(context);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Future<void> _showQrCodeBottomSheet(BuildContext context) async {
|
||||
|
@ -388,22 +391,23 @@ void dispose() {
|
|||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model
|
||||
.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context)
|
||||
.requestFocus(_model.unfocusNode)
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(context),
|
||||
child:
|
||||
QrCodePassKeyTemplateComponentWidget(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: QrCodePassKeyTemplateComponentWidget(
|
||||
toggleActionStatus: (key) async {
|
||||
log('Key: $key');
|
||||
safeSetState(() {
|
||||
if (animationsMap['barcodeOnActionTriggerAnimation'] != null) {
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!.controller.stop();
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!.controller.reverse();
|
||||
if (animationsMap['barcodeOnActionTriggerAnimation'] !=
|
||||
null) {
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!
|
||||
.controller
|
||||
.stop();
|
||||
animationsMap['barcodeOnActionTriggerAnimation']!
|
||||
.controller
|
||||
.reverse();
|
||||
}
|
||||
_model.isAccess = !_model.isAccess;
|
||||
_model.key = key;
|
||||
|
@ -413,9 +417,7 @@ void dispose() {
|
|||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
|
||||
.catchError((error) => safeSetState((){
|
||||
).catchError((error) => safeSetState(() {
|
||||
log('Error: $error');
|
||||
_resetAnimationAndToggleAccess();
|
||||
}));
|
||||
|
@ -439,7 +441,7 @@ void dispose() {
|
|||
_model.isAccess = !_model.isAccess;
|
||||
_model.key = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
AppBar buildAppBar(BuildContext context) {
|
||||
return AppBar(
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -9,9 +7,8 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:hub/actions/actions.dart';
|
||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/details_component/details_component_action.dart';
|
||||
import 'package:hub/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/custom_functions.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_drop_down.dart';
|
||||
|
@ -163,6 +160,14 @@ class _ScheduleCompleteVisitPageWidgetState
|
|||
}
|
||||
}
|
||||
|
||||
bool? getStatus(dynamic data) {
|
||||
return data == 'A'
|
||||
? true
|
||||
: data == 'F' || data == 'B' || data == 'C' || data == 'I'
|
||||
? null
|
||||
: false;
|
||||
}
|
||||
|
||||
PreferredSizeWidget appBarScheduleCompleteVisit(BuildContext context) {
|
||||
return AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -1734,17 +1739,14 @@ Widget visitHistory(
|
|||
'Fim:': visitaWrapItem['VAW_DTFIM'] ?? '',
|
||||
}),
|
||||
statusHashMap: [
|
||||
visitaWrapItem['VAW_STATUS'] == 'A'
|
||||
getStatus(visitaWrapItem['VAW_STATUS']) == true
|
||||
? Map<String, Color>.from({
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ativo',
|
||||
enText: 'Active',
|
||||
): FlutterFlowTheme.of(context).success,
|
||||
})
|
||||
: visitaWrapItem['VAW_STATUS'] == 'F' ||
|
||||
visitaWrapItem['VAW_STATUS'] == 'B' ||
|
||||
visitaWrapItem['VAW_STATUS'] == 'C' ||
|
||||
visitaWrapItem['VAW_STATUS'] == 'I'
|
||||
: getStatus(visitaWrapItem['VAW_STATUS']) == null
|
||||
? Map<String, Color>.from({
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
|
@ -1768,71 +1770,15 @@ Widget visitHistory(
|
|||
useSafeArea: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return VisitRequestTemplateComponentWidget(
|
||||
vteName: 'Lorem Ipsus',
|
||||
vteReason: 'Lorem Ipsus',
|
||||
vawDate: 'Lorem Ipsus',
|
||||
vawStatus: 'Lorem Ipsus',
|
||||
vteMsg: 'Lorem Ipsus',
|
||||
vteUUID: 'Lorem Ipsus',
|
||||
cliUUID: FFAppState().cliUUID,
|
||||
msgUUID: 'Lorem Ipsus',
|
||||
vawDestino: 'Lorem Ipsus',
|
||||
vawUUID: 'Lorem Ipsus',
|
||||
vawName: 'Lorem Ipsus',
|
||||
vawRef: 'Lorem Ipsus',
|
||||
labelsHashMap: Map<String, String>.from({
|
||||
'Nome:': visitaWrapItem['VTE_NOME'] ?? '',
|
||||
'Inicio:':
|
||||
visitaWrapItem['VAW_DTINICIO'] ?? '',
|
||||
'Fim:': visitaWrapItem['VAW_DTFIM'] ?? '',
|
||||
}),
|
||||
imageHashMap: Map<String, String>.from({
|
||||
'key': visitaWrapItem['VTE_DOCUMENTO'] ?? '',
|
||||
'value': 'E',
|
||||
}),
|
||||
statusHashMap: [
|
||||
visitaWrapItem['VAW_STATUS'] == 'A'
|
||||
? Map<String, Color>.from({
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText: 'Ativo',
|
||||
enText: 'Active',
|
||||
): FlutterFlowTheme.of(context)
|
||||
.success,
|
||||
})
|
||||
: visitaWrapItem['VAW_STATUS'] == 'F' ||
|
||||
visitaWrapItem['VAW_STATUS'] ==
|
||||
'B' ||
|
||||
visitaWrapItem['VAW_STATUS'] ==
|
||||
'C' ||
|
||||
visitaWrapItem['VAW_STATUS'] ==
|
||||
'I'
|
||||
? Map<String, Color>.from({
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText: 'Pendente',
|
||||
enText: 'Pending',
|
||||
): FlutterFlowTheme.of(context)
|
||||
.warning,
|
||||
})
|
||||
: Map<String, Color>.from({
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText: 'Cancelado',
|
||||
enText: 'Canceled',
|
||||
): FlutterFlowTheme.of(context)
|
||||
.error,
|
||||
}),
|
||||
],
|
||||
changeStatusAction: changeStatusAction,
|
||||
// vteDocument: liberationHistoryItem['VTE_DOCUMENTO'],
|
||||
return buildDetails(
|
||||
visitaWrapItem,
|
||||
context,
|
||||
changeStatusAction,
|
||||
);
|
||||
},
|
||||
).then((_) {
|
||||
// PushNotificationManager _pushNotificationService =
|
||||
// PushNotificationManager();
|
||||
|
||||
// _pushNotificationService.onMessageReceived
|
||||
// .listen((received) {
|
||||
// if (received.data['click_action'] ==
|
||||
|
@ -1853,7 +1799,6 @@ Widget visitHistory(
|
|||
// }
|
||||
// });
|
||||
});
|
||||
|
||||
// await showModalBottomSheet(
|
||||
// isScrollControlled: true,
|
||||
// backgroundColor: Colors.transparent,
|
||||
|
|
Loading…
Reference in New Issue