Merge branch 'main' into fix/fd-787
This commit is contained in:
commit
1828375d71
|
@ -18,8 +18,6 @@ Future<void> onMessageReceived(
|
||||||
Map<String, dynamic> payload, String? extra, String? handleClick) async {
|
Map<String, dynamic> payload, String? extra, String? handleClick) async {
|
||||||
final localId = jsonDecode(payload['local']!)['CLI_ID'];
|
final localId = jsonDecode(payload['local']!)['CLI_ID'];
|
||||||
|
|
||||||
log('payload: $payload');
|
|
||||||
log('extra: $extra');
|
|
||||||
switch (handleClick) {
|
switch (handleClick) {
|
||||||
case 'visit_request':
|
case 'visit_request':
|
||||||
showDialog(
|
showDialog(
|
||||||
|
@ -49,7 +47,6 @@ Future<void> onMessageReceived(
|
||||||
'Are you sure you want to approve this visit?',
|
'Are you sure you want to approve this visit?',
|
||||||
),
|
),
|
||||||
() async {
|
() async {
|
||||||
log("payload: $payload");
|
|
||||||
await answersRequest(
|
await answersRequest(
|
||||||
context: context,
|
context: context,
|
||||||
ref: payload['referencia'].toString(),
|
ref: payload['referencia'].toString(),
|
||||||
|
|
|
@ -54,9 +54,7 @@ Future<void> foregroundHandleMessage(RemoteMessage message) async {
|
||||||
payload: Map<String, String>.from(message.data));
|
payload: Map<String, String>.from(message.data));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _backgroundHandleMessage(RemoteMessage message) async {
|
Future<void> _backgroundHandleMessage(RemoteMessage message) async {}
|
||||||
log('Handling a background message: ${message.messageId}');
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
await initializeApp();
|
await initializeApp();
|
||||||
|
@ -92,7 +90,6 @@ class _AppState extends State<App> {
|
||||||
|
|
||||||
FirebaseMessaging.onMessage.listen(foregroundHandleMessage);
|
FirebaseMessaging.onMessage.listen(foregroundHandleMessage);
|
||||||
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
|
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
|
||||||
log(message.toMap().toString());
|
|
||||||
onMessageReceived(message.data, message.notification!.body,
|
onMessageReceived(message.data, message.notification!.body,
|
||||||
message.data['click_action']);
|
message.data['click_action']);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue