some changes
This commit is contained in:
parent
e524bdad7a
commit
09740150df
|
@ -3,6 +3,7 @@ import 'dart:convert';
|
|||
import 'dart:io';
|
||||
import 'package:f_r_e_hub/app_state.dart';
|
||||
import 'package:f_r_e_hub/backend/api_requests/api_calls.dart';
|
||||
import 'package:f_r_e_hub/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
|
@ -313,10 +314,9 @@ class NotificationHandler {
|
|||
|
||||
break;
|
||||
case '':
|
||||
debugPrint('visit_response');
|
||||
break;
|
||||
case 'access':
|
||||
debugPrint('access');
|
||||
_showAcessNotificationModal(message, context);
|
||||
break;
|
||||
case 'mensagem':
|
||||
debugPrint('mensagem');
|
||||
|
@ -332,6 +332,20 @@ class NotificationHandler {
|
|||
void _showAcessNotificationModal(
|
||||
Map<String, dynamic> message, BuildContext context) {
|
||||
debugPrint('Showing access notification dialog');
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: AccessNotificationModalTemplateComponentWidget(
|
||||
datetime: message['ACE_DATAHORA'].toString(),
|
||||
drive: message['ACI_DESCRICAO'].toString(),
|
||||
id: message['PES_ID'].toString(),
|
||||
name: message['PES_NOME'].toString(),
|
||||
type: message['PES_TIPO'].toString(),
|
||||
));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _showVisitRequestDialog(
|
||||
|
|
|
@ -131,11 +131,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
path: '/peopleOnThePropertyPage',
|
||||
builder: (context, params) => const PeopleOnThePropertyPageWidget(),
|
||||
),
|
||||
// FFRoute(
|
||||
// name: 'acessHistoryPage',
|
||||
// path: '/acessHistoryPage',
|
||||
// builder: (context, params) => const AcessHistoryPageWidget(),
|
||||
// ),
|
||||
FFRoute(
|
||||
name: 'acessHistoryPage',
|
||||
path: '/acessHistoryPage',
|
||||
builder: (context, params) => const AcessHistoryPageWidget(),
|
||||
),
|
||||
// FFRoute(
|
||||
// name: 'liberationHistory',
|
||||
// path: '/liberationHistory',
|
||||
|
|
Loading…
Reference in New Issue