diff --git a/assets/images/dark/login.svg b/assets/images/dark/login.svg
new file mode 100644
index 00000000..6da3ef72
--- /dev/null
+++ b/assets/images/dark/login.svg
@@ -0,0 +1,29 @@
+
diff --git a/assets/images/dark/login.svg:Zone.Identifier b/assets/images/dark/login.svg:Zone.Identifier
new file mode 100644
index 00000000..1bf0b28e
--- /dev/null
+++ b/assets/images/dark/login.svg:Zone.Identifier
@@ -0,0 +1,3 @@
+[ZoneTransfer]
+ZoneId=3
+HostUrl=https://github.com/
diff --git a/assets/images/dark/welcome.svg b/assets/images/dark/welcome.svg
new file mode 100644
index 00000000..c9043f96
--- /dev/null
+++ b/assets/images/dark/welcome.svg
@@ -0,0 +1,30 @@
+
diff --git a/assets/images/dark/welcome.svg:Zone.Identifier b/assets/images/dark/welcome.svg:Zone.Identifier
new file mode 100644
index 00000000..1bf0b28e
--- /dev/null
+++ b/assets/images/dark/welcome.svg:Zone.Identifier
@@ -0,0 +1,3 @@
+[ZoneTransfer]
+ZoneId=3
+HostUrl=https://github.com/
diff --git a/assets/images/light/login.svg b/assets/images/light/login.svg
new file mode 100644
index 00000000..f6890b23
--- /dev/null
+++ b/assets/images/light/login.svg
@@ -0,0 +1,22 @@
+
diff --git a/assets/images/light/login.svg:Zone.Identifier b/assets/images/light/login.svg:Zone.Identifier
new file mode 100644
index 00000000..1bf0b28e
--- /dev/null
+++ b/assets/images/light/login.svg:Zone.Identifier
@@ -0,0 +1,3 @@
+[ZoneTransfer]
+ZoneId=3
+HostUrl=https://github.com/
diff --git a/assets/images/light/welcome.svg b/assets/images/light/welcome.svg
new file mode 100644
index 00000000..8983fac0
--- /dev/null
+++ b/assets/images/light/welcome.svg
@@ -0,0 +1,30 @@
+
diff --git a/assets/images/light/welcome.svg:Zone.Identifier b/assets/images/light/welcome.svg:Zone.Identifier
new file mode 100644
index 00000000..1bf0b28e
--- /dev/null
+++ b/assets/images/light/welcome.svg:Zone.Identifier
@@ -0,0 +1,3 @@
+[ZoneTransfer]
+ZoneId=3
+HostUrl=https://github.com/
diff --git a/lib/actions/actions.dart b/lib/actions/actions.dart
index d25a5939..5d80d184 100644
--- a/lib/actions/actions.dart
+++ b/lib/actions/actions.dart
@@ -1,20 +1,33 @@
-import 'dart:convert';
-
-import 'package:f_r_e_hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
-import 'package:f_r_e_hub/custom_code/actions/get_dev_u_u_i_d.dart';
-import 'package:f_r_e_hub/pages/home_page/home_page_widget.dart';
-import 'package:flutter/material.dart';
-import 'package:qr_flutter/qr_flutter.dart';
-import 'package:sqflite/utils/utils.dart';
import 'dart:developer';
-import '/actions/actions.dart' as action_blocks;
-import '/backend/api_requests/api_calls.dart';
-import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
-import '/custom_code/actions/index.dart' as actions;
-import '/flutter_flow/flutter_flow_theme.dart';
-import '/flutter_flow/flutter_flow_util.dart';
-import '/flutter_flow/random_data_util.dart' as random_data;
+// import 'package:hub/components/organisms/bottom_arrow_linked_locals/bottom_arrow_linked_locals_component_widget.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
+import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
+import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
+import 'package:hub/custom_code/actions/get_dev_u_u_i_d.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
+
+import 'package:flutter/material.dart';
+import 'package:hub/flutter_flow/random_data_util.dart';
+import 'package:hub/pages/home_page/home_page_model.dart';
+import 'package:qr_flutter/qr_flutter.dart';
+
+
+
+
+import 'package:url_launcher/url_launcher.dart';
+
+Future openTermsOfUse(BuildContext context) async {
+ log('openTermsOfUse');
+ final Uri url = Uri.parse('https://freaccess.com.br/pp/');
+ if (!await launchUrl(url)) {
+ throw Exception('Could not launch $url');
+ }
+}
Future repeatVisitScheduleAction(
BuildContext context, {
@@ -107,14 +120,14 @@ Future singInLoginAction(
}),
]);
if ((FFAppState().email != '') && (FFAppState().passwd != '')) {
- devUUID = await actions.getDevUUID();
+ devUUID = await getDevUUID();
FFAppState().devUUID = devUUID!;
loginCall = await PhpGroup.loginCall.call(
email: FFAppState().email,
password: FFAppState().passwd,
uuid: FFAppState().devUUID,
type: FFAppState().device,
- description: random_data.randomString(
+ description: randomString(
10,
10,
true,
@@ -148,7 +161,7 @@ Future singInLoginAction(
)!;
FFAppState().serialNumber = await getSerialNumber() ?? '';
FFAppState().isLogged = true;
- await action_blocks.toggleHomePage(context);
+ await toggleHomePage(context);
return;
} else {
await showModalBottomSheet(
@@ -199,14 +212,14 @@ Future signUpRegisterAction(
name: name,
password: passwd,
email: email,
- token: random_data.randomString(
+ token: randomString(
36,
36,
false,
false,
true,
),
- uuid: random_data.randomString(
+ uuid: randomString(
36,
36,
false,
@@ -214,7 +227,7 @@ Future signUpRegisterAction(
true,
),
tipo: device,
- descricao: random_data.randomString(
+ descricao: randomString(
36,
36,
true,
@@ -234,8 +247,8 @@ Future signUpRegisterAction(
context: context,
builder: (alertDialogContext) {
return AlertDialog(
- title: const Text('ERROR2'),
- content: const Text('ERROR2'),
+ title: const Text('Error'),
+ content: Text('${registerCall?.jsonBody}'),
actions: [
TextButton(
onPressed: () => Navigator.pop(alertDialogContext),
@@ -251,12 +264,21 @@ Future signUpRegisterAction(
context: context,
builder: (alertDialogContext) {
return AlertDialog(
- title: const Text('ERROR1'),
- content: const Text('ERROR1'),
+ title: Text(FFLocalizations.of(context).getVariableText(
+ enText: 'Error',
+ ptText: 'Erro',
+ )),
+ content: Text(FFLocalizations.of(context).getVariableText(
+ enText: 'Please fill in all fields',
+ ptText: 'Por favor, preencha todos os campos',
+ )),
actions: [
TextButton(
onPressed: () => Navigator.pop(alertDialogContext),
- child: const Text('ERROR1 '),
+ child: Text(FFLocalizations.of(context).getVariableText(
+ ptText: 'Fechar',
+ enText: 'Close',
+ )),
),
],
);
@@ -311,6 +333,7 @@ Future toggleSignInPage(BuildContext context) async {
}
Future toggleSignUpPage(BuildContext context) async {
+
context.pushNamed(
'signUpPage',
extra: {
@@ -651,4 +674,140 @@ Widget buildQrCode(
// String escapeMECARD(String content) {
// // Implementação para escapar caracteres.
// return content.replaceAll(':', '\\:'); // Exemplo simplificado.
- // }
\ No newline at end of file
+ // }
+
+ /// menu
+
+ Future scheduleVisitOptAction(BuildContext context) async {
+ await showAdaptiveDialog(
+ context: context,
+ builder: (context) {
+ return Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: OptionSelectionModalWidget(
+ routesListStr: [
+ 'scheduleCompleteVisitPage',
+ 'scheduleProvisionalVisitPage',
+ 'fastPassPage',
+ ],
+ iconsListIcon: [
+ Icons.date_range_rounded,
+ Icons.date_range_rounded,
+ Icons.date_range_rounded,
+ ],
+ nameListStr: [
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Visita\nCompleta',
+ enText: 'Complete\nSchedule',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Visita\nProvisória',
+ enText: 'Provisional\nSchedule',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Visita\nRápida',
+ enText: 'Fast\nSchedule',
+ ),
+ ],
+ ),
+ );
+ },
+ );
+ }
+
+ Future registerVisitorOptAction(BuildContext context) async {
+ context.pushNamed(
+ 'registerVisitorPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+ }
+
+ Future peopleOnThePropertyAction(BuildContext context) async {
+ context.pushNamed(
+ 'peopleOnThePropertyPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+ }
+
+ Future preferencesSettings(BuildContext context) async {
+ context.pushNamed(
+ 'preferencesSettings',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+ }
+
+ Future liberationHistoryOptAction(BuildContext context) async {
+ await showAdaptiveDialog(
+ // isScrollControlled: true,
+ // backgroundColor: Colors.transparent,
+ // enableDrag: false,
+ context: context,
+ builder: (context) {
+ return Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: OptionSelectionModalWidget(
+ routesListStr: [
+ 'liberationHistory',
+ 'acessHistoryPage',
+ 'scheduleCompleteVisitPage',
+ // 'messageHistoryPage',
+ ],
+ iconsListIcon: [
+ Icons.history_rounded,
+ Icons.history_rounded,
+ Icons.history_rounded,
+ // Icons.history_rounded,
+ ],
+ nameListStr: [
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Histórico\nde Liberação',
+ enText: 'Liberation\nHistory',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Histórico\nde Acesso',
+ enText: 'Access\nHistory',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Histórico\nde Visita',
+ enText: 'Visit\nHistory',
+ ),
+ // FFLocalizations.of(context).getVariableText(
+ // ptText: 'Histórico\nde Mensagens',
+ // enText: 'Message\nHistory',
+ // ),
+ ],
+ ),
+ );
+ },
+ );
+ }
+
+ Future accessQRCodeOptAction(BuildContext context) async {
+ context.pushNamed(
+ 'qrCodePage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+ }
\ No newline at end of file
diff --git a/lib/app_state.dart b/lib/app_state.dart
index 0faaaeca..917fb812 100644
--- a/lib/app_state.dart
+++ b/lib/app_state.dart
@@ -1,11 +1,9 @@
-import 'dart:ffi';
+// import 'dart:ffi';
-import 'package:f_r_e_hub/flutter_flow/permissions_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:csv/csv.dart';
import 'package:local_auth/local_auth.dart';
-import 'package:permission_handler/permission_handler.dart';
import 'package:synchronized/synchronized.dart';
class FFAppState extends ChangeNotifier {
@@ -488,4 +486,4 @@ extension FlutterSecureStorageExtensions on FlutterSecureStorage {
Future setStringList(String key, List value) async =>
await writeSync(
key: key, value: const ListToCsvConverter().convert([value]));
-}
+}
\ No newline at end of file
diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart
index 15850cd4..2a8838ec 100644
--- a/lib/backend/api_requests/api_calls.dart
+++ b/lib/backend/api_requests/api_calls.dart
@@ -11,6 +11,7 @@ export 'api_manager.dart' show ApiCallResponse;
const _kPrivateApiFunctionName = 'ffPrivateApiCall';
+
/// Start PHP Group Code
class PhpGroup {
@@ -2432,4 +2433,4 @@ String _serializeJson(dynamic jsonVar, [bool isList = false]) {
}
return isList ? '[]' : '{}';
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/api_requests/api_manager.dart b/lib/backend/api_requests/api_manager.dart
index 1bb57424..53340d4f 100644
--- a/lib/backend/api_requests/api_manager.dart
+++ b/lib/backend/api_requests/api_manager.dart
@@ -15,6 +15,9 @@ import '/flutter_flow/uploaded_file.dart';
import 'get_streamed_response.dart';
+
+
+
enum ApiCallType {
GET,
POST,
@@ -512,4 +515,4 @@ class ApiManager {
return result;
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/api_requests/get_streamed_response.dart b/lib/backend/api_requests/get_streamed_response.dart
index 1a53aab0..303a19e5 100644
--- a/lib/backend/api_requests/get_streamed_response.dart
+++ b/lib/backend/api_requests/get_streamed_response.dart
@@ -1,4 +1,4 @@
import 'package:http/http.dart';
Future getStreamedResponse(Request request) =>
- Client().send(request);
+ Client().send(request);
\ No newline at end of file
diff --git a/lib/backend/push_notification/pushNotificationService.dart b/lib/backend/push_notification/pushNotificationService.dart
index 8ec899a1..883a9338 100644
--- a/lib/backend/push_notification/pushNotificationService.dart
+++ b/lib/backend/push_notification/pushNotificationService.dart
@@ -4,20 +4,24 @@ import 'dart:developer';
import 'dart:io';
import 'dart:math' as math;
-import 'package:f_r_e_hub/actions/actions.dart';
-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:f_r_e_hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
-import 'package:f_r_e_hub/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart';
-import 'package:f_r_e_hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
-import 'package:f_r_e_hub/flutter_flow/flutter_flow_util.dart';
+
+
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
+import 'package:hub/actions/actions.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/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:rxdart/rxdart.dart';
+//
+
+
class PushNotificationService {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance;
final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin =
@@ -108,17 +112,17 @@ class PushNotificationService {
await Future.delayed(Duration(milliseconds: 100));
}
- const initializationSettingsAndroid = AndroidInitializationSettings('mipmap/ic_fre_black');
- const initializationSettingsIOS = DarwinInitializationSettings(
+ var initializationSettingsAndroid =
+ AndroidInitializationSettings('mipmap/ic_fre_black');
+ var initializationSettingsIOS = DarwinInitializationSettings(
requestAlertPermission: true,
requestBadgePermission: true,
requestSoundPermission: true,
);
- const initializationSettings = InitializationSettings(
+ var initializationSettings = InitializationSettings(
android: initializationSettingsAndroid,
iOS: initializationSettingsIOS,
);
-
_flutterLocalNotificationsPlugin.initialize(
initializationSettings,
onDidReceiveNotificationResponse: (NotificationResponse response) async {
@@ -130,7 +134,7 @@ class PushNotificationService {
log('Notification payload: $message');
var data = _notificationDetails; // Assuming getOnMessage() now returns the latest RemoteMessage
log('Extra: ${data.value}');
- _handleNotificationClick(message, extra: data.value ?? {'extra': 'extra'});
+ _handleNotificationClick(message, extra: data.value);
} catch (e) {
log('Error decoding notification payload: $e');
}
@@ -187,17 +191,7 @@ class PushNotificationService {
_onMessage.add(message);
log('Extra: ${message.notification?.body}');
- Map extra = {};
- log('Message: ${message.data}');
-
- if (message.data['click_action'] == 'mensagem') {
- extra['body'] = message.notification?.body;
- }
-
- log('New Extra: $extra');
-
- NotificationHandler().handleMessage(message.data, context, extra: extra);
- });
+ NotificationHandler().handleMessage(message.data, context); });
}
void configureTokenRefresh() {
@@ -273,11 +267,8 @@ class PushNotificationService {
}
void _showNotification(RemoteMessage message) async {
- Map messageParsed = message.toMap();
- Map data = messageParsed['data'];
- Map notification = messageParsed['notification'];
-
- String channelId = _getChannelIdBasedOnClickAction(data['click_action']);
+ String channelId =
+ _getChannelIdBasedOnClickAction(message.data['click_action']);
var androidDetails = AndroidNotificationDetails(
channelId,
@@ -286,33 +277,19 @@ class PushNotificationService {
importance: Importance.max,
priority: Priority.high,
);
- var iOSDetails = const DarwinNotificationDetails(
- categoryIdentifier: 'plainCategory',
- sound: 'slow_spring_board.aiff',
- presentList: true,
- interruptionLevel: InterruptionLevel.critical,
- );
-
- var generalNotificationDetails = NotificationDetails(android: androidDetails, iOS: iOSDetails);
+ var iOSDetails = DarwinNotificationDetails();
+ var generalNotificationDetails =
+ NotificationDetails(android: androidDetails, iOS: iOSDetails);
log('Showing notification: ${message.messageId.hashCode}');
- log('Message Title: ${notification['title'].toString()}');
- log('Message Body: ${notification['body'].toString()}');
- log('Message Payload: ${data.toString()}');
-
await _flutterLocalNotificationsPlugin.show(
- DateTime.now().microsecond,
- notification['title'].toString(),
- notification['body'].toString(),
+ // DateTime.now().millisecondsSinceEpoch % (1 << 31),
+ math.Random().nextInt(1 << 30),
+ message.notification?.title,
+ message.notification?.body,
generalNotificationDetails,
- payload: data.toString(),
- ).catchError((err, stack) {
- log('Error: $err');
- log('Stack: $stack');
- });
-
-
-
+ payload: message.data.toString(),
+ );
}
_handleNotificationClick(Map payload, {Map extra = const {}}) {
@@ -347,15 +324,15 @@ class NotificationHandler {
switch (message['click_action']) {
case 'visit_request':
_showVisitRequestDialog(message, context);
+
break;
- case 'cancel_request':
- _showVisitRequestResolvedDialog(message, context);
+ case '':
break;
case 'access':
_showAcessNotificationModal(message, context);
break;
case 'mensagem':
- _showMessageNotificationDialog(message, context, extra);
+ _showMessageNotificationDialog(message, context, extra);
break;
case 'enroll_cond':
log('enroll_cond');
@@ -382,35 +359,28 @@ class NotificationHandler {
void _showAcessNotificationModal(
Map message, BuildContext context) {
log('Showing access notification dialog');
- log('Message: ${message}');
log('USR_TIPO: ${message['USR_TIPO']}');
log('USR_ID: ${message['USR_ID']}');
log('USR_DOCUMENTO: ${message['USR_DOCUMENTO']}');
showDialog(
context: context,
builder: (BuildContext context) {
- String id = _getIdBasedOnUserType(message);
-
- return GestureDetector(
- onTap: () {
- Navigator.pop(context);
- },
- child: Dialog(
- backgroundColor: Colors.transparent,
- child: AccessNotificationModalTemplateComponentWidget(
- datetime: message['ACE_DATAHORA'].toString(),
- drive: message['SET_DESCRICAO'].toString(),
- id: message['USR_TIPO'].toString() == 'O'
- ? message['USR_ID'].toString() == ''
- ? '0'
- : message['USR_ID'].toString()
- : message['USR_DOCUMENTO'].toString() == ''
- ? '0'
- : message['USR_DOCUMENTO'].toString(),
- name: message['PES_NOME'].toString(),
- type: message['USR_TIPO'],
- )),
- );
+ _getIdBasedOnUserType(message);
+ return Dialog(
+ backgroundColor: Colors.transparent,
+ child: AccessNotificationModalTemplateComponentWidget(
+ datetime: message['ACE_DATAHORA'].toString(),
+ drive: message['ACI_DESCRICAO'].toString(),
+ id: message['USR_TIPO'].toString() == 'O'
+ ? message['USR_ID'].toString() == ''
+ ? '0'
+ : message['USR_ID'].toString()
+ : message['USR_DOCUMENTO'].toString() == ''
+ ? '0'
+ : message['USR_DOCUMENTO'].toString(),
+ name: message['PES_NOME'].toString(),
+ type: message['USR_TIPO'],
+ ));
},
);
}
@@ -419,31 +389,17 @@ class NotificationHandler {
Map message, BuildContext context, Map extra) {
log('Showing message notification dialog');
log('Notification "message": $message');
- log('Extra: $extra');
- Map local = {};
-
- try {
- local = jsonDecode(message['local']);
- } catch (err) {
- local = message['local'];
- }
-
showDialog(
useSafeArea: true,
context: context,
builder: (BuildContext context) {
- return GestureDetector(
- onTap: () {
- Navigator.pop(context);
- },
- child: Dialog(
- backgroundColor: Colors.transparent,
- child: MessageNotificationModalTemplateComponentWidget(
- id: local['CLI_ID'].toString(),
- from: message['remetente'].toString(),
- to: message['destinatario'].toString() == 'O' ? 'Morador' : 'Visitante',
- message: extra['body'].toString().isEmpty ? 'Unknown' : extra['body'].toString(),
- ),
+ return Dialog(
+ backgroundColor: Colors.transparent,
+ child: MessageNotificationModalTemplateComponentWidget(
+ id: message['local']['CLI_ID'].toString(),
+ from: message['remetente'].toString(),
+ to: message['destinatario'].toString() == 'O' ? 'Morador' : 'Visitante',
+ message: extra['body'].toString().isEmpty ? 'Unknown' : extra['body'].toString(),
),
);
},
@@ -457,7 +413,7 @@ class NotificationHandler {
showDialog(
context: context,
builder: (BuildContext context) {
- String id = _getIdBasedOnUserType(message);
+ _getIdBasedOnUserType(message);
return Dialog(
backgroundColor: Colors.transparent,
child: VisitRequestTemplateComponentWidget(
@@ -465,8 +421,8 @@ class NotificationHandler {
vteReason: message['motivo'] ?? 'Unknown',
vteMsg: message['mensagem'] ?? 'Unknown',
vteDocument: message['documento'] ?? '',
- vteUUID: message['idVisitante'].toString() ?? '0',
- vawRef: message['referencia'].toString() ?? '0',
+ vteUUID: message['idVisitante'].toString(),
+ vawRef: message['referencia'].toString(),
vawStatus: 'S',
changeStatusAction: changeStatusAction,
),
@@ -474,35 +430,6 @@ class NotificationHandler {
},
);
}
-
- void _showVisitRequestResolvedDialog(
- Map message, BuildContext context) {
- log('Showing visit request notification dialog');
-
- showDialog(
- context: context,
- builder: (BuildContext context) {
-
- return GestureDetector(
- onTap: () {
- Navigator.pop(context);
- },
- child: Dialog(
- backgroundColor: Colors.transparent,
- child: VisitRequestTemplateComponentWidget(
- vteName: message['nomevisita'].toString(),
- vteReason: message['motivo'].toString(),
- vteMsg: message['resposta'].toString(),
- vteDocument: message['documento'].toString(),
- vteUUID: message['codvisita'].toString(),
- vawRef: message['referencia'].toString(),
- vawStatus: message['status'].toString(),
- ),
- ),
- );
- },
- );
- }
}
class PushNotificationManager {
@@ -523,4 +450,4 @@ class PushNotificationManager {
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/schema/enums/enums.dart b/lib/backend/schema/enums/enums.dart
index cfef83fe..64351084 100644
--- a/lib/backend/schema/enums/enums.dart
+++ b/lib/backend/schema/enums/enums.dart
@@ -5,6 +5,17 @@ enum AppHeaderComponent {
home,
}
+enum MenuView {
+ list_grid,
+ list,
+ grid,
+}
+
+enum MenuItem {
+ button,
+ card
+}
+
extension FFEnumExtensions on T {
String serialize() => name;
}
@@ -21,4 +32,4 @@ T? deserializeEnum(String? value) {
default:
return null;
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/schema/structs/device_struct.dart b/lib/backend/schema/structs/device_struct.dart
index bf1d6bf9..174afa98 100644
--- a/lib/backend/schema/structs/device_struct.dart
+++ b/lib/backend/schema/structs/device_struct.dart
@@ -1,9 +1,10 @@
// ignore_for_file: unnecessary_getters_setters
-import '/backend/schema/util/schema_util.dart';
+
+import 'package:hub/flutter_flow/nav/nav.dart';
import 'index.dart';
-import '/flutter_flow/flutter_flow_util.dart';
+
class DeviceStruct extends BaseStruct {
DeviceStruct({
@@ -110,4 +111,4 @@ DeviceStruct createDeviceStruct({
devUUID: devUUID,
version: version,
description: description,
- );
+ );
\ No newline at end of file
diff --git a/lib/backend/schema/util/schema_util.dart b/lib/backend/schema/util/schema_util.dart
index f1ad8a3f..80a9f7a4 100644
--- a/lib/backend/schema/util/schema_util.dart
+++ b/lib/backend/schema/util/schema_util.dart
@@ -2,9 +2,11 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:from_css_color/from_css_color.dart';
+import 'package:hub/backend/schema/enums/enums.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/nav/serialization_util.dart';
+
-import '/backend/schema/enums/enums.dart';
-import '/flutter_flow/flutter_flow_util.dart';
export 'package:collection/collection.dart' show ListEquality;
export 'package:flutter/material.dart' show Color, Colors;
@@ -77,4 +79,4 @@ List? getColorsList(dynamic value) =>
value is! List ? null : value.map(getSchemaColor).withoutNulls;
List? getDataList(dynamic value) =>
- value is! List ? null : value.map((e) => castToType(e)!).toList();
+ value is! List ? null : value.map((e) => castToType(e)!).toList();
\ No newline at end of file
diff --git a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
new file mode 100644
index 00000000..b0ee89d4
--- /dev/null
+++ b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
@@ -0,0 +1,145 @@
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+
+
+
+
+class MenuButtonWidget extends MenuEntry {
+ const MenuButtonWidget({
+ Key? key,
+ this.action,
+ this.title,
+ this.icon,
+ }) : super(key: key);
+
+ final Function()? action;
+ final String? title;
+ final IconData? icon;
+
+ @override
+ _MenuButtonWidgetState createState() => _MenuButtonWidgetState();
+}
+
+class _MenuButtonWidgetState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ await widget.action?.call();
+ },
+ child: Container(
+ width: 100.0,
+ height: 100.0,
+ decoration: BoxDecoration(
+ color:
+ FlutterFlowTheme.of(context).primaryBackground,
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 4.0,
+ color:
+ FlutterFlowTheme.of(context).customColor5,
+ offset: const Offset(
+ 0.0,
+ 2.0,
+ ),
+ )
+ ],
+ borderRadius: BorderRadius.circular(24.0),
+ shape: BoxShape.rectangle,
+ border: Border.all(
+ color: FlutterFlowTheme.of(context).alternate,
+ width: 0.5,
+ ),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(4.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Align(
+ alignment:
+ const AlignmentDirectional(0.0, 0.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Align(
+ alignment: const AlignmentDirectional(
+ -1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(8.0, 0.0, 0.0, 0.0),
+ child: Container(
+ width: 30.0,
+ height: 30.0,
+ decoration: BoxDecoration(
+ color:
+ FlutterFlowTheme.of(context)
+ .primaryBackground,
+ shape: BoxShape.circle,
+ ),
+ alignment:
+ const AlignmentDirectional(
+ 0.0, 0.0),
+ child: Icon(
+ widget.icon,
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ size: 24.0,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(0.0, 0.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(
+ 0.0, 0.0),
+ child: Text(
+ widget.title ?? '',
+ style: FlutterFlowTheme.of(context)
+ .titleLarge
+ .override(
+ fontFamily: 'Nunito',
+ color:
+ FlutterFlowTheme.of(context)
+ .primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts:
+ GoogleFonts.asMap()
+ .containsKey('Nunito'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ].divide(const SizedBox(height: 0.0)),
+ ),
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart b/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart
new file mode 100644
index 00000000..f2173bfd
--- /dev/null
+++ b/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart
@@ -0,0 +1,199 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/app_state.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/internationalization.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
+import 'package:hub/pages/preferences_settings_page/preferences_settings_model.dart';
+import 'package:provider/provider.dart';
+
+
+class PreferencesPageWidget extends StatelessWidget {
+ const PreferencesPageWidget({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return ChangeNotifierProvider(
+ create: (_) => PreferencesPageModel(),
+ child: Consumer(
+ builder: (context, model, child) => GestureDetector(
+ onTap: () => model.unfocusNode.canRequestFocus
+ ? FocusScope.of(context).requestFocus(model.unfocusNode)
+ : FocusScope.of(context).unfocus(),
+ child: Scaffold(
+ backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
+ appBar: AppBar(
+ backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
+ automaticallyImplyLeading: false,
+ forceMaterialTransparency: true,
+ leading: FlutterFlowIconButton(
+ borderColor: Colors.transparent,
+ borderRadius: 30.0,
+ borderWidth: 1.0,
+ buttonSize: 60.0,
+ icon: Icon(
+ Icons.keyboard_arrow_left,
+ color: FlutterFlowTheme.of(context).primaryText,
+ size: 30.0,
+ ),
+ onPressed: () async {
+ context.pop();
+ },
+ ),
+ title: Text(
+ FFLocalizations.of(context).getVariableText(
+ enText: 'Preferences',
+ ptText: 'Preferências',
+ ),
+ style: FlutterFlowTheme.of(context).headlineMedium.override(
+ fontFamily: 'Nunito',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 17.0,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
+ ),
+ ),
+ centerTitle: true,
+ elevation: 0.0,
+ ),
+ body: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Container(),
+ Expanded(
+ flex: 2,
+ child: ListView.builder(
+ // gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
+ // crossAxisCount: 3,
+ // crossAxisSpacing: 12.0,
+ // mainAxisSpacing: 12.0,
+ // childAspectRatio: 1.0,
+ // mainAxisExtent: 100.0,
+ // ),
+ itemCount: 6, // Assuming 4 items for simplicity
+ padding: const EdgeInsets.symmetric(horizontal: 20.0),
+ physics: const AlwaysScrollableScrollPhysics(),
+ itemBuilder: (BuildContext context, int index) {
+ return _buildIconButton(context, index, model);
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildIconButton(BuildContext context, int index, PreferencesPageModel model) {
+ IconData icon;
+ Function() onPressed =() => {};
+ bool isEnabled;
+ String content;
+
+ switch (index) {
+ case 0:
+ icon = Icons.fingerprint;
+ onPressed = () => model.toggleFingerprint(context); // Disable if fingerprint is false
+ isEnabled = FFAppState().fingerprint;
+ content = FFLocalizations.of(context).getVariableText(
+ ptText: 'Ative a autenticação por impressão digital para login seguro.',
+ enText: 'Enable fingerprint authentication for secure login.',
+ );
+ break;
+ case 1:
+ icon = Icons.person;
+ onPressed = () => model.enablePerson(context);
+ isEnabled = FFAppState().person;
+ content = FFLocalizations.of(context).getVariableText(
+ ptText: 'Exibir código de identificação remota',
+ enText: 'Display remote identification code',
+ );
+ break;
+ case 2:
+ icon = Icons.notifications;
+ onPressed = model.toggleNotify;
+ isEnabled = FFAppState().notify;
+ content = FFLocalizations.of(context).getVariableText(
+ ptText: 'Ative para receber sua notificação de acesso',
+ enText: 'Enable to receive your access notification',
+ );
+ break;
+ case 3:
+ icon = Icons.lock_clock_sharp;
+ // onLongPress = model.togglePass(context, model);
+ isEnabled = FFAppState().pass;
+ content = FFLocalizations.of(context).getVariableText(
+ ptText: 'Ative para inserir uma credencial de acesso para o QRCode',
+ enText: 'Enable to enter an access credential for the QRCode',
+ );
+ break;
+ case 4:
+ icon = Icons.landscape;
+ onPressed = model.localLogout;
+ isEnabled = false;
+ content = FFLocalizations.of(context).getVariableText(
+ ptText: 'Ative para se desvincular do local selecionado',
+ enText: 'Enable to unlink from the selected location',
+ );
+ break;
+ case 5:
+ icon = Icons.delete;
+ onPressed = () => model.deleteAccount(context);
+ isEnabled = false;
+ content = FFLocalizations.of(context).getVariableText(
+ ptText: 'Delete sua conta e todos os dados associados permanentemente.',
+ enText: 'Delete your account and all associated data permanently.',
+ );
+ break;
+ default:
+ throw Exception('Invalid index: $index');
+ }
+
+ return Container(
+ height: 100,
+ child: GestureDetector(
+ onTap: index != 3 ? onPressed : () {model.togglePass(context);},
+ child: Row(
+ children: [
+ CircleAvatar(
+ backgroundColor: isEnabled ? FlutterFlowTheme.of(context).primary : FlutterFlowTheme.of(context).alternate,
+ child: Icon(
+ icon,
+ color: isEnabled ? FlutterFlowTheme.of(context).primaryBackground : FlutterFlowTheme.of(context).primary,
+ // icon: Icon(icon, color: isEnabled ? FlutterFlowTheme.of(context).primaryBackground : FlutterFlowTheme.of(context).primary, size: 40.0),
+ // onPressed: index != 3 ? onPressed : () {model.togglePass(context);},
+ // borderRadius: 20.0,
+ // borderWidth: 1.0,
+ // buttonSize: 40.0,
+ // fillColor: isEnabled ? FlutterFlowTheme.of(context).primary : FlutterFlowTheme.of(context).alternate,
+ // disabledColor: FlutterFlowTheme.of(context).alternate,
+ // disabledIconColor: FlutterFlowTheme.of(context).primary,
+ ),
+ ),
+ SizedBox(width: 8.0),
+ Expanded(
+ child: Text(
+ content,
+ style: FlutterFlowTheme.of(context).bodySmall.override(
+ fontFamily: 'Nunito',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.normal,
+ fontStyle: FontStyle.normal,
+ ),
+ overflow: TextOverflow.clip,
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/components/atomic_components/text_field_component/text_field_component_model.dart b/lib/components/atomic_components/text_field_component/text_field_component_model.dart
index 30f54431..a74572ce 100644
--- a/lib/components/atomic_components/text_field_component/text_field_component_model.dart
+++ b/lib/components/atomic_components/text_field_component/text_field_component_model.dart
@@ -2,6 +2,7 @@ import '/flutter_flow/flutter_flow_util.dart';
import 'text_field_component_widget.dart' show TextFieldComponentWidget;
import 'package:flutter/material.dart';
+
class TextFieldComponentModel
extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
@@ -19,4 +20,4 @@ class TextFieldComponentModel
textFieldFocusNode?.dispose();
textController?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/atomic_components/text_field_component/text_field_component_widget.dart b/lib/components/atomic_components/text_field_component/text_field_component_widget.dart
index e9ab116f..90a63614 100644
--- a/lib/components/atomic_components/text_field_component/text_field_component_widget.dart
+++ b/lib/components/atomic_components/text_field_component/text_field_component_widget.dart
@@ -5,6 +5,9 @@ import 'package:google_fonts/google_fonts.dart';
import 'text_field_component_model.dart';
export 'text_field_component_model.dart';
+////
+
+
class TextFieldComponentWidget extends StatefulWidget {
const TextFieldComponentWidget({
super.key,
@@ -114,4 +117,4 @@ class _TextFieldComponentWidgetState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/menu_item/menu_item.dart b/lib/components/molecular_components/menu_item/menu_item.dart
new file mode 100644
index 00000000..1d2926b5
--- /dev/null
+++ b/lib/components/molecular_components/menu_item/menu_item.dart
@@ -0,0 +1,12 @@
+
+
+import 'package:flutter/material.dart';
+
+abstract class MenuEntry extends StatefulWidget {
+ const MenuEntry({
+ Key? key,
+ }) : super(key: key);
+
+
+
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart b/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart
index 51674c2a..0963fec9 100644
--- a/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart
+++ b/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart
@@ -3,6 +3,7 @@ import '/flutter_flow/form_field_controller.dart';
import 'opt_modal_widget.dart' show OptModalWidget;
import 'package:flutter/material.dart';
+
class OptModalModel extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
@@ -28,4 +29,4 @@ class OptModalModel extends FlutterFlowModel {
textFieldFocusNode?.dispose();
textController?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
index 551004ef..6b2df897 100644
--- a/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
+++ b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
@@ -1,8 +1,12 @@
-import 'package:f_r_e_hub/components/molecular_components/opt_modal/opt_modal_model.dart';
-import 'package:f_r_e_hub/flutter_flow/flutter_flow_theme.dart';
-import 'package:f_r_e_hub/flutter_flow/flutter_flow_util.dart';
+
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.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';
+
class OptModalWidget extends StatefulWidget {
final String defaultPersonType;
@@ -61,9 +65,9 @@ class _OptModalWidgetState extends State {
Map filterResult = {
'personType': '',
'accessType': '',
- 'search': _model.textController.text == ''
+ 'search': _model.textController?.text == ''
? '.*'
- : _model.textController.text.toLowerCase(),
+ : _model.textController!.text.toLowerCase(),
};
if (selected['personType']!.isEmpty) {
@@ -327,4 +331,4 @@ class _OptModalWidgetState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/opt_modal/opt_modal_model.dart b/lib/components/molecular_components/opt_modal/opt_modal_model.dart
index 51674c2a..66133fb1 100644
--- a/lib/components/molecular_components/opt_modal/opt_modal_model.dart
+++ b/lib/components/molecular_components/opt_modal/opt_modal_model.dart
@@ -3,6 +3,8 @@ import '/flutter_flow/form_field_controller.dart';
import 'opt_modal_widget.dart' show OptModalWidget;
import 'package:flutter/material.dart';
+
+
class OptModalModel extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
@@ -28,4 +30,4 @@ class OptModalModel extends FlutterFlowModel {
textFieldFocusNode?.dispose();
textController?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/opt_modal/opt_modal_widget.dart b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart
index 551004ef..b2394f52 100644
--- a/lib/components/molecular_components/opt_modal/opt_modal_widget.dart
+++ b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart
@@ -1,8 +1,10 @@
-import 'package:f_r_e_hub/components/molecular_components/opt_modal/opt_modal_model.dart';
-import 'package:f_r_e_hub/flutter_flow/flutter_flow_theme.dart';
-import 'package:f_r_e_hub/flutter_flow/flutter_flow_util.dart';
+
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/internationalization.dart';
class OptModalWidget extends StatefulWidget {
final String defaultPersonType;
@@ -61,9 +63,9 @@ class _OptModalWidgetState extends State {
Map filterResult = {
'personType': '',
'accessType': '',
- 'search': _model.textController.text == ''
+ 'search': _model.textController?.text == ''
? '.*'
- : _model.textController.text.toLowerCase(),
+ : _model.textController!.text.toLowerCase(),
};
if (selected['personType']!.isEmpty) {
@@ -327,4 +329,4 @@ class _OptModalWidgetState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart b/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart
index d9448232..38613124 100644
--- a/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart
+++ b/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart
@@ -1,5 +1,7 @@
-import '/flutter_flow/flutter_flow_util.dart';
-import 'option_selection_modal_widget.dart' show OptionSelectionModalWidget;
+import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class OptionSelectionModalModel
@@ -9,4 +11,4 @@ class OptionSelectionModalModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart b/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
index ef4993fe..83093a34 100644
--- a/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
+++ b/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
@@ -1,14 +1,14 @@
-// import 'package:f_r_e_hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
+// import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
+import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_animations.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
-import '/flutter_flow/flutter_flow_animations.dart';
-import '/flutter_flow/flutter_flow_theme.dart';
-import '/flutter_flow/flutter_flow_util.dart';
-import 'option_selection_modal_model.dart';
-export 'option_selection_modal_model.dart';
class OptionSelectionModalWidget extends StatefulWidget {
const OptionSelectionModalWidget({
@@ -217,4 +217,4 @@ class _OptionSelectionModalWidgetState extends State
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/throw_exception/throw_exception_model.dart b/lib/components/molecular_components/throw_exception/throw_exception_model.dart
index 31b6cee7..69ec5ec4 100644
--- a/lib/components/molecular_components/throw_exception/throw_exception_model.dart
+++ b/lib/components/molecular_components/throw_exception/throw_exception_model.dart
@@ -2,10 +2,12 @@ import '/flutter_flow/flutter_flow_util.dart';
import 'throw_exception_widget.dart' show ThrowExceptionWidget;
import 'package:flutter/material.dart';
+
+
class ThrowExceptionModel extends FlutterFlowModel {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart
index a4c60fa7..95333ddd 100644
--- a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart
+++ b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart
@@ -7,6 +7,8 @@ import 'package:google_fonts/google_fonts.dart';
import 'throw_exception_model.dart';
export 'throw_exception_model.dart';
+///
+
class ThrowExceptionWidget extends StatefulWidget {
const ThrowExceptionWidget({
super.key,
@@ -160,4 +162,4 @@ class _ThrowExceptionWidgetState extends State
],
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart
index f89f479d..6827c26d 100644
--- a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart
+++ b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart
@@ -1,6 +1,7 @@
-import '/flutter_flow/flutter_flow_util.dart';
-import 'visitor_not_found_component_widget.dart'
- show VisitorNotFoundComponentWidget;
+import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class VisitorNotFoundComponentModel
@@ -10,4 +11,4 @@ class VisitorNotFoundComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
index 115a6304..421d595f 100644
--- a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
+++ b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
@@ -1,12 +1,15 @@
-import '/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
-import '/flutter_flow/flutter_flow_icon_button.dart';
-import '/flutter_flow/flutter_flow_theme.dart';
-import '/flutter_flow/flutter_flow_util.dart';
-import '/flutter_flow/flutter_flow_widgets.dart';
+
+import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart';
+import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+
+
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
-import 'visitor_not_found_component_model.dart';
-export 'visitor_not_found_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
+
class VisitorNotFoundComponentWidget extends StatefulWidget {
const VisitorNotFoundComponentWidget({super.key});
@@ -174,4 +177,4 @@ class _VisitorNotFoundComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
index a63f3b06..ebbcaea4 100644
--- a/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
+++ b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
@@ -1,6 +1,7 @@
-import '/flutter_flow/flutter_flow_util.dart';
-import 'arrow_linked_locals_component_widget.dart'
- show ArrowLinkedLocalsComponentWidget;
+import 'package:hub/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart';
+
+import '../../../flutter_flow/flutter_flow_model.dart';
+
import 'package:flutter/material.dart';
class ArrowLinkedLocalsComponentModel
@@ -10,4 +11,4 @@ class ArrowLinkedLocalsComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
index 0738f46c..d0a00a4f 100644
--- a/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
+++ b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
@@ -1,7 +1,7 @@
-import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
-import 'arrow_linked_locals_component_model.dart';
-export 'arrow_linked_locals_component_model.dart';
+import 'package:hub/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
class ArrowLinkedLocalsComponentWidget extends StatefulWidget {
const ArrowLinkedLocalsComponentWidget({super.key});
@@ -38,4 +38,4 @@ class _ArrowLinkedLocalsComponentWidgetState
Widget build(BuildContext context) {
return Container();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart
index f0b590e3..3ff8aba1 100644
--- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart
+++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart
@@ -1,6 +1,7 @@
-import '/flutter_flow/flutter_flow_util.dart';
-import 'bottom_arrow_linked_locals_component_widget.dart'
- show BottomArrowLinkedLocalsComponentWidget;
+import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class BottomArrowLinkedLocalsComponentModel
@@ -10,4 +11,4 @@ class BottomArrowLinkedLocalsComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
index 40c14a58..267634c5 100644
--- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
+++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
@@ -1,14 +1,19 @@
import 'dart:developer';
-import '/backend/api_requests/api_calls.dart';
-import '/flutter_flow/flutter_flow_theme.dart';
-import '/flutter_flow/flutter_flow_util.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/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:provider/provider.dart';
-import 'bottom_arrow_linked_locals_component_model.dart';
-export 'bottom_arrow_linked_locals_component_model.dart';
+
class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget {
const BottomArrowLinkedLocalsComponentWidget({super.key});
@@ -194,10 +199,10 @@ class _BottomArrowLinkedLocalsComponentWidgetState
topRight: Radius.circular(25.0),
),
child: Image.network(
- 'https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
+ "https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
localItem,
r'''$.CLI_ID''',
- ).toString()}.png',
+ ).toString()}.png",
width: double.infinity,
height: double.infinity,
fit: BoxFit.fill,
@@ -253,4 +258,4 @@ class _BottomArrowLinkedLocalsComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_model.dart b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart
index 25442482..12c50d2f 100644
--- a/lib/components/organism_components/local_profile_component/local_profile_component_model.dart
+++ b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart
@@ -2,6 +2,8 @@ import '/flutter_flow/flutter_flow_util.dart';
import 'local_profile_component_widget.dart' show LocalProfileComponentWidget;
import 'package:flutter/material.dart';
+///
+
class LocalProfileComponentModel
extends FlutterFlowModel {
@override
@@ -9,4 +11,4 @@ class LocalProfileComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart
index d8b1aff4..ab338b78 100644
--- a/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart
+++ b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart
@@ -1,16 +1,16 @@
-import 'package:f_r_e_hub/actions/actions.dart';
import '/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/custom_functions.dart' as functions;
-import '/flutter_flow/random_data_util.dart' as random_data;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'local_profile_component_model.dart';
export 'local_profile_component_model.dart';
+////
+
class LocalProfileComponentWidget extends StatefulWidget {
const LocalProfileComponentWidget({
required bool localStatus,
@@ -148,4 +148,4 @@ class _LocalProfileComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_component/menu_component_model.dart b/lib/components/organism_components/menu_component/menu_component_model.dart
index b6aa80df..b2842e56 100644
--- a/lib/components/organism_components/menu_component/menu_component_model.dart
+++ b/lib/components/organism_components/menu_component/menu_component_model.dart
@@ -1,12 +1,14 @@
import 'package:flutter/material.dart';
-import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
+import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
import '/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
-import '/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'menu_component_widget.dart' show MenuComponentWidget;
+
+
class MenuComponentModel extends FlutterFlowModel {
/// Local state fields for this component.
@@ -128,13 +130,13 @@ class MenuComponentModel extends FlutterFlowModel {
'liberationHistory',
'acessHistoryPage',
'scheduleCompleteVisitPage',
- // 'messageHistoryPage',
+ 'messageHistoryPage'
],
iconsListIcon: [
Icons.history_rounded,
Icons.history_rounded,
Icons.history_rounded,
- // Icons.history_rounded,
+ Icons.history_rounded,
],
nameListStr: [
FFLocalizations.of(context).getVariableText(
@@ -149,10 +151,10 @@ class MenuComponentModel extends FlutterFlowModel {
ptText: 'Histórico\nde Visita',
enText: 'Visit\nHistory',
),
- // FFLocalizations.of(context).getVariableText(
- // ptText: 'Histórico\nde Mensagens',
- // enText: 'Message\nHistory',
- // ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Histórico\nde Mensagens',
+ enText: 'Message\nHistory',
+ ),
],
),
);
@@ -172,4 +174,19 @@ class MenuComponentModel extends FlutterFlowModel {
},
);
}
-}
+
+ Future messageHistoryAction(BuildContext context) async {
+ context.pushNamed(
+ 'messageHistoryPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_component/menu_component_widget.dart b/lib/components/organism_components/menu_component/menu_component_widget.dart
index 20fca7e9..6803c748 100644
--- a/lib/components/organism_components/menu_component/menu_component_widget.dart
+++ b/lib/components/organism_components/menu_component/menu_component_widget.dart
@@ -1,3 +1,9 @@
+import 'dart:developer';
+
+import 'package:hub/backend/schema/enums/enums.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
+
import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
import '/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
@@ -5,8 +11,19 @@ import 'package:flutter/material.dart';
import 'menu_component_model.dart';
export 'menu_component_model.dart';
+
class MenuComponentWidget extends StatefulWidget {
- const MenuComponentWidget({super.key});
+ const MenuComponentWidget({
+ Key? key,
+ required this.style,
+ required this.item,
+ required this.expandable,
+ required this.options,
+ });
+ final MenuView style;
+ final MenuItem item;
+ final bool expandable;
+ final List options;
@override
State createState() => _MenuComponentWidgetState();
@@ -36,16 +53,111 @@ class _MenuComponentWidgetState extends State {
@override
Widget build(BuildContext context) {
+ log('MenuComponentWidget: ${widget.options.toList().toString()}');
return Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
child: Builder(
builder: (context) {
- if (_model.isGrid == true) {
+ if (widget.style == MenuView.list_grid && widget.expandable == true && widget.item == MenuItem.button) {
+ if (_model.isGrid == true) {
+ return wrapWithModel(
+ model: _model.menuListViewComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: MenuListViewComponentWidget(
+ options: widget.options,
+ expandable: widget.expandable,
+ item: widget.item,
+
+
+ changeMenuStyle: () async {
+ await _model.changeMenuStyle(context);
+ setState(() {});
+ },
+ registerVisitorOptAction: () async {
+ await _model.registerVisitorOptAction(context);
+ setState(() {});
+ },
+ scheduleVisitOptAction: () async {
+ await _model.scheduleVisitOptAction(context);
+ setState(() {});
+ },
+ peopleOnThePropertyOptAction: () async {
+ await _model.peopleOnThePropertyAction(context);
+ setState(() {});
+ },
+ preferencesSettings: () async {
+ await _model.preferencesSettings(context);
+ setState(() {});
+ },
+ liberationHistoryOptAction: () async {
+ await _model.liberationHistoryOptAction(context);
+ setState(() {});
+ },
+ accessQRCodeOptAction: () async {
+ await _model.accessQRCodeOptAction(context);
+ setState(() {});
+ },
+ messageHistoryAction: () async {
+ await _model.messageHistoryAction(context);
+ setState(() {});
+ },
+
+ ),
+ );
+ } else {
+ return wrapWithModel(
+ model: _model.menuStaggeredViewComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: MenuStaggeredViewComponentWidget(
+ changeMenuStyleAction: () async {
+ await _model.changeMenuStyle(context);
+ setState(() {});
+ },
+ registerVisitorOptAction: () async {
+ await _model.registerVisitorOptAction(context);
+ setState(() {});
+ },
+ scheduleVisitOptAction: () async {
+ await _model.scheduleVisitOptAction(context);
+ setState(() {});
+ },
+ peopleOnThePropertyOptAction: () async {
+ await _model.peopleOnThePropertyAction(context);
+ setState(() {});
+ },
+ preferencesSettings: () async {
+ await _model.preferencesSettings(context);
+ setState(() {});
+ },
+ liberationHistoryOptAction: () async {
+ await _model.liberationHistoryOptAction(context);
+ setState(() {});
+ },
+ accessQRCodeOptAction: () async {
+ await _model.accessQRCodeOptAction(context);
+ setState(() {});
+ },
+ ),
+ );
+ }
+ }
+ if (widget.style == MenuView.list && widget.expandable == false && widget.item == MenuItem.card){
return wrapWithModel(
model: _model.menuListViewComponentModel,
updateCallback: () => setState(() {}),
updateOnChange: true,
child: MenuListViewComponentWidget(
+ expandable: widget.expandable,
+ item: widget.item,
+ options: widget.options,
+ messageHistoryAction: () async {
+ await _model.messageHistoryAction(context);
+ setState(() {});
+ },
+
+
changeMenuStyle: () async {
await _model.changeMenuStyle(context);
setState(() {});
@@ -74,46 +186,13 @@ class _MenuComponentWidgetState extends State {
await _model.accessQRCodeOptAction(context);
setState(() {});
},
- ),
- );
- } else {
- return wrapWithModel(
- model: _model.menuStaggeredViewComponentModel,
- updateCallback: () => setState(() {}),
- updateOnChange: true,
- child: MenuStaggeredViewComponentWidget(
- changeMenuStyleAction: () async {
- await _model.changeMenuStyle(context);
- setState(() {});
- },
- registerVisitorOptAction: () async {
- await _model.registerVisitorOptAction(context);
- setState(() {});
- },
- scheduleVisitOptAction: () async {
- await _model.scheduleVisitOptAction(context);
- setState(() {});
- },
- peopleOnThePropertyOptAction: () async {
- await _model.peopleOnThePropertyAction(context);
- setState(() {});
- },
- preferencesSettings: () async {
- await _model.preferencesSettings(context);
- setState(() {});
- },
- liberationHistoryOptAction: () async {
- await _model.liberationHistoryOptAction(context);
- setState(() {});
- },
- accessQRCodeOptAction: () async {
- await _model.accessQRCodeOptAction(context);
- setState(() {});
- },
+
+
),
);
}
- },
+ return const SizedBox();
+ },
),
);
}
@@ -132,4 +211,4 @@ class _MenuComponentWidgetState extends State {
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart
index 7ce9985b..027278ab 100644
--- a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart
+++ b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart
@@ -2,6 +2,8 @@ import '/flutter_flow/flutter_flow_util.dart';
import 'menu_list_view_component_widget.dart' show MenuListViewComponentWidget;
import 'package:flutter/material.dart';
+
+
class MenuListViewComponentModel
extends FlutterFlowModel {
@override
@@ -9,4 +11,4 @@ class MenuListViewComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
index 06154b38..d9418237 100644
--- a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
+++ b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
-import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
-import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/backend/schema/enums/enums.dart';
+import 'package:hub/components/atomic_components/menu_button_item/menu_button_item_widget.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
@@ -9,6 +10,9 @@ import 'menu_list_view_component_model.dart';
export 'menu_list_view_component_model.dart';
+///
+
+
class MenuListViewComponentWidget extends StatefulWidget {
const MenuListViewComponentWidget({
super.key,
@@ -19,8 +23,16 @@ class MenuListViewComponentWidget extends StatefulWidget {
required this.preferencesSettings,
required this.liberationHistoryOptAction,
required this.accessQRCodeOptAction,
+ required this.expandable,
+ required this.item,
+ required this.options,
+ required this.messageHistoryAction,
});
+ final bool expandable;
+ final MenuItem item;
+
+ final List options;
final Future Function()? changeMenuStyle;
final Future Function()? registerVisitorOptAction;
final Future Function()? scheduleVisitOptAction;
@@ -28,6 +40,7 @@ class MenuListViewComponentWidget extends StatefulWidget {
final Future Function()? preferencesSettings;
final Future Function()? liberationHistoryOptAction;
final Future Function()? accessQRCodeOptAction;
+ final Future Function()? messageHistoryAction;
@override
State createState() =>
@@ -69,959 +82,94 @@ class _MenuListViewComponentWidgetState
verticalDirection: VerticalDirection.down,
clipBehavior: Clip.none,
children: [
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 5.0, 0.0),
- child: Container(
- width: double.infinity,
- height: 125.0,
- decoration: const BoxDecoration(),
- child: ListView(
- padding: const EdgeInsets.fromLTRB(
- 10.0,
- 0,
- 10.0,
- 0,
- ),
- scrollDirection: Axis.horizontal,
- children: [
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 10.0, 0.0, 20.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.scheduleVisitOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kvector1,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'utgue9a5' /* Agendar
-Visita */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 10.0, 0.0, 20.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.registerVisitorOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kvector,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- '82b5f8yz' /* Cadastrar
-Visitante */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 10.0, 0.0, 20.0),
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.khome,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 't4ie13ut' /* Vincular
-Condomínio */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 10.0, 0.0, 20.0),
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kpets,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'n3n76pha' /* Cadastrar
-Pet */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 10.0, 0.0, 20.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.accessQRCodeOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
-
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kvector2,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'l6b9o7yn' /* QR Code
-de Acesso */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 10.0, 0.0, 20.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.peopleOnThePropertyOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- Icons.people,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'rxnrtdau' /* Pessoas na
-Propriedade */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 10.0, 0.0, 20.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.liberationHistoryOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- Icons.history_sharp,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getVariableText(
- ptText: 'Consultar\nConsultar',
- enText: 'Consult\nHistories',
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.preferencesSettings?.call();
- },
- child: Container(
- width: 100.0,
- height: double.infinity,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Icon(
- Icons.settings,
- color: FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getVariableText(
- enText: 'Preferences\nSystem',
- ptText: 'Preferências\ndo Sistema',
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- ),
-
- ].divide(const SizedBox(width: 15.0)),
- ),
- ),
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Text(
- FFLocalizations.of(context).getVariableText(
- enText: 'Expand',
- ptText: 'Expandir',
- ),
- style: FlutterFlowTheme.of(context).title1.override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context).primaryText,
- fontSize: 12.0,
- fontWeight: FontWeight.w600,
- fontStyle: FontStyle.normal,
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: FlutterFlowIconButton(
- borderColor: Colors.transparent,
- borderRadius: 20.0,
- borderWidth: 0.0,
- buttonSize: 50.0,
- fillColor: const Color(0x00FFFFFF),
- icon: Icon(
- Icons.keyboard_arrow_down_outlined,
- color: FlutterFlowTheme.of(context).primary,
- ),
- onPressed: () async {
- await widget.changeMenuStyle?.call();
- },
- ),
- ),
- ],
- ),
+ buildMenuItem(context),
+ if (widget.expandable)
+ buildExpandableButton(context),
],
);
}
+
+ Widget buildMenuItem(BuildContext context) {
+ switch(widget.item) {
+ case MenuItem.button:
+ return SizedBox(
+ height: 100,
+ width: double.infinity,
+ child: ListView.builder(
+ addAutomaticKeepAlives: true,
+ padding: EdgeInsets.zero,
+ shrinkWrap: true,
+ physics: const AlwaysScrollableScrollPhysics(),
+ scrollDirection: Axis.horizontal,
+
+ itemCount: widget.options.length,
+ itemBuilder: (context, index) {
+ return SizedBox(
+ height: 115,
+ width: 115,
+ child: widget.options[index]);
+ },
+ ),
+ );
+ case MenuItem.card:
+ return ListView.builder(
+ addAutomaticKeepAlives: true,
+ padding: EdgeInsets.zero,
+ shrinkWrap: true,
+ physics: const AlwaysScrollableScrollPhysics(),
+ itemCount: widget.options.length,
+ itemBuilder: (context, index) {
+ return MenuButtonWidget(
+ action: widget.registerVisitorOptAction,
+ title: FFLocalizations.of(context).getVariableText(
+ enText: 'Register Visitor',
+ ptText: 'Registrar Visitante',
+ ),
+ icon: Icons.person_add_alt_1_outlined,
+ );
+ },
+ );
+ }
}
+
+ Row buildExpandableButton(BuildContext context) {
+ return Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Text(
+ FFLocalizations.of(context).getVariableText(
+ enText: 'Expand',
+ ptText: 'Expandir',
+ ),
+ style: FlutterFlowTheme.of(context).title1.override(
+ fontFamily: 'Nunito',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 12.0,
+ fontWeight: FontWeight.w600,
+ fontStyle: FontStyle.normal,
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: FlutterFlowIconButton(
+ borderColor: Colors.transparent,
+ borderRadius: 20.0,
+ borderWidth: 0.0,
+ buttonSize: 50.0,
+ fillColor: const Color(0x00FFFFFF),
+ icon: Icon(
+ Icons.keyboard_arrow_down_outlined,
+ color: FlutterFlowTheme.of(context).primary,
+ ),
+ onPressed: () async {
+ await widget.changeMenuStyle?.call();
+ },
+ ),
+ ),
+ ],
+ );
+ }
+}
+
diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart
index 8aebfc69..4ee29584 100644
--- a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart
+++ b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart
@@ -1,8 +1,10 @@
+import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
+
import '/flutter_flow/flutter_flow_util.dart';
-import 'menu_staggered_view_component_widget.dart'
- show MenuStaggeredViewComponentWidget;
+
import 'package:flutter/material.dart';
+
class MenuStaggeredViewComponentModel
extends FlutterFlowModel {
@override
@@ -10,4 +12,4 @@ class MenuStaggeredViewComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
index 8e5441a3..35a411d6 100644
--- a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
+++ b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
@@ -3,13 +3,14 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
+import 'package:hub/flutter_flow/custom_icons.dart';
+import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.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 '/flutter_flow/flutter_flow_icon_button.dart';
-import '/flutter_flow/flutter_flow_theme.dart';
-import '/flutter_flow/flutter_flow_util.dart';
-import 'menu_staggered_view_component_model.dart';
-
-export 'menu_staggered_view_component_model.dart';
class MenuStaggeredViewComponentWidget extends StatefulWidget {
const MenuStaggeredViewComponentWidget({
@@ -1079,4 +1080,4 @@ Propriedade */
],
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/message_well_component/message_well_component_model.dart b/lib/components/organism_components/message_well_component/message_well_component_model.dart
index 89ce0d76..e6b577de 100644
--- a/lib/components/organism_components/message_well_component/message_well_component_model.dart
+++ b/lib/components/organism_components/message_well_component/message_well_component_model.dart
@@ -1,10 +1,16 @@
-import 'package:f_r_e_hub/backend/api_requests/api_manager.dart';
-import 'package:f_r_e_hub/flutter_flow/request_manager.dart';
+
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/flutter_flow/request_manager.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'message_well_component_widget.dart' show MessageWellComponentWidget;
import 'package:flutter/material.dart';
+///
+
+import 'package:flutter/material.dart';
+
+
class MessageWellComponentModel
extends FlutterFlowModel {
final unfocusNode = FocusNode();
@@ -43,4 +49,4 @@ class MessageWellComponentModel
clearGetLiberationsCache();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/message_well_component/message_well_component_widget.dart b/lib/components/organism_components/message_well_component/message_well_component_widget.dart
index 1a82d88f..29432952 100644
--- a/lib/components/organism_components/message_well_component/message_well_component_widget.dart
+++ b/lib/components/organism_components/message_well_component/message_well_component_widget.dart
@@ -2,16 +2,19 @@ import 'dart:async';
import 'dart:collection';
import 'dart:developer';
-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/flutter_flow/flutter_flow_theme.dart';
-import 'package:f_r_e_hub/flutter_flow/flutter_flow_util.dart';
+
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart';
+//
+
+
final dropdown = BehaviorSubject>.seeded(
LinkedHashMap.from({
'All': 'A',
@@ -340,4 +343,4 @@ class MessageWellNotifier extends StateNotifier {
final messageWellProvider =
StateNotifierProvider((ref) {
return MessageWellNotifier();
-});
+});
\ No newline at end of file
diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart
index d30b8442..39705ca6 100644
--- a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart
+++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart
@@ -1,7 +1,9 @@
-import '/backend/api_requests/api_calls.dart';
-import '/flutter_flow/flutter_flow_util.dart';
-import 'schedule_visit_detail_widget.dart' show ScheduleVisitDetailWidget;
+import 'package:hub/backend/api_requests/api_manager.dart';
+
+
import 'package:flutter/material.dart';
+import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
class ScheduleVisitDetailModel
extends FlutterFlowModel {
@@ -57,4 +59,4 @@ class ScheduleVisitDetailModel
textFieldFocusNode6?.dispose();
textController6?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
index 9641ca52..935379ad 100644
--- a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
+++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
@@ -1,16 +1,20 @@
-import '/backend/api_requests/api_calls.dart';
-import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
-import '/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
-import '/flutter_flow/flutter_flow_icon_button.dart';
-import '/flutter_flow/flutter_flow_theme.dart';
-import '/flutter_flow/flutter_flow_util.dart';
-import '/flutter_flow/custom_functions.dart' as functions;
+import 'package:hub/app_state.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+
+import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
+
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/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart';
+import 'package:hub/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_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_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:provider/provider.dart';
-import 'schedule_visit_detail_model.dart';
-export 'schedule_visit_detail_model.dart';
+
class ScheduleVisitDetailWidget extends StatefulWidget {
const ScheduleVisitDetailWidget({
@@ -68,11 +72,11 @@ class _ScheduleVisitDetailWidgetState extends State {
_model.textFieldFocusNode3 ??= FocusNode();
_model.textController4 ??= TextEditingController(
- text: functions.extractDescToStr(widget.visitResonStr!));
+ text: extractDescToStr(widget.visitResonStr!));
_model.textFieldFocusNode4 ??= FocusNode();
_model.textController5 ??= TextEditingController(
- text: functions.extractDescToStr(widget.visitLevelStr!));
+ text: extractDescToStr(widget.visitLevelStr!));
_model.textFieldFocusNode5 ??= FocusNode();
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
@@ -225,10 +229,10 @@ class _ScheduleVisitDetailWidgetState extends State {
const Duration(milliseconds: 500),
imageUrl:
valueOrDefault(
- 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
+ "https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
visitorsDataItem,
r'''$.VTE_DOCUMENTO''',
- ).toString()}&tipo=E',
+ ).toString()}&tipo=E",
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
width: 100.0,
@@ -931,8 +935,8 @@ class _ScheduleVisitDetailWidgetState extends State {
dtFim: widget.visitEndDate,
unica: widget.visitTempStr,
idMotivo:
- functions.extractIdToStr(widget.visitResonStr!),
- idNAC: functions.extractIdToStr(widget.visitLevelStr!),
+ extractIdToStr(widget.visitResonStr!),
+ idNAC: extractIdToStr(widget.visitLevelStr!),
obs: widget.visitObsStr,
cliID: FFAppState().cliUUID,
);
@@ -977,4 +981,4 @@ class _ScheduleVisitDetailWidgetState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart
index e4db1d96..54f840ca 100644
--- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart
+++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart
@@ -1,6 +1,7 @@
-import '/flutter_flow/flutter_flow_util.dart';
-import 'up_arrow_linked_locals_component_widget.dart'
- show UpArrowLinkedLocalsComponentWidget;
+import 'package:hub/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class UpArrowLinkedLocalsComponentModel
@@ -10,4 +11,4 @@ class UpArrowLinkedLocalsComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart
index fea22bdb..968b22f9 100644
--- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart
+++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart
@@ -1,12 +1,16 @@
-import '/backend/api_requests/api_calls.dart';
-import '/flutter_flow/flutter_flow_theme.dart';
-import '/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+
+import 'package:hub/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+
+
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-import 'up_arrow_linked_locals_component_model.dart';
-export 'up_arrow_linked_locals_component_model.dart';
+
class UpArrowLinkedLocalsComponentWidget extends StatefulWidget {
const UpArrowLinkedLocalsComponentWidget({super.key});
@@ -240,4 +244,4 @@ class _UpArrowLinkedLocalsComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart
index b0f33c80..f9ee4e21 100644
--- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart
+++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart
@@ -4,6 +4,7 @@ import 'access_notification_modal_template_component_widget.dart'
show AccessNotificationModalTemplateComponentWidget;
import 'package:flutter/material.dart';
+
class AccessNotificationModalTemplateComponentModel
extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart
index 789b1b44..a8d77589 100644
--- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart
+++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart
@@ -7,6 +7,9 @@ import 'package:provider/provider.dart';
import 'access_notification_modal_template_component_model.dart';
export 'access_notification_modal_template_component_model.dart';
+
+
+
class AccessNotificationModalTemplateComponentWidget extends StatefulWidget {
const AccessNotificationModalTemplateComponentWidget({
super.key,
@@ -380,4 +383,4 @@ class _AccessNotificationModalTemplateComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart
index 3f35acf9..032a1f68 100644
--- a/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart
+++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart
@@ -3,6 +3,7 @@ import 'card_item_template_component_widget.dart'
show CardItemTemplateComponentWidget;
import 'package:flutter/material.dart';
+
class CardItemTemplateComponentModel
extends FlutterFlowModel {
@override
@@ -10,4 +11,4 @@ class CardItemTemplateComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart
index 41c28eee..a1e4cfc6 100644
--- a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart
+++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart
@@ -10,6 +10,10 @@ import 'package:provider/provider.dart';
import 'card_item_template_component_model.dart';
export 'card_item_template_component_model.dart';
+///
+
+
+
class CardItemTemplateComponentWidget extends StatefulWidget {
const CardItemTemplateComponentWidget({
super.key,
@@ -20,8 +24,8 @@ class CardItemTemplateComponentWidget extends StatefulWidget {
});
final Map? labelsHashMap;
- final Map? statusHashMap;
- final Map imageHashMap; //document/vteID and type
+ final List