Merge pull request #34 from FRE-Informatica/fix/nav
This commit is contained in:
commit
1d90a6e3b8
|
@ -9,7 +9,6 @@ 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:hub/flutter_flow/random_data_util.dart';
|
||||
import 'package:hub/index.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
@ -35,48 +34,17 @@ Future repeatVisitScheduleAction(
|
|||
bool? visitTempBol,
|
||||
String? visitObsStr,
|
||||
}) async {
|
||||
context.pushNamed(
|
||||
'scheduleCompleteVisitPage',
|
||||
queryParameters: {
|
||||
'visitStartDateStr': serializeParam(
|
||||
visitStartDateStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitEndDateStr': serializeParam(
|
||||
visitEndDateStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitReasonStr': serializeParam(
|
||||
visitReasonStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitLevelStr': serializeParam(
|
||||
visitLevelStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitTempBol': serializeParam(
|
||||
visitTempBol,
|
||||
ParamType.bool,
|
||||
),
|
||||
'visitObsStr': serializeParam(
|
||||
visitObsStr,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitorStrList': serializeParam(
|
||||
visitorStrList,
|
||||
ParamType.String,
|
||||
),
|
||||
'visitorJsonList': serializeParam(
|
||||
visitorJsonList,
|
||||
ParamType.JSON,
|
||||
isList: true,
|
||||
),
|
||||
}.withoutNulls,
|
||||
context.go(
|
||||
'/scheduleCompleteVisitPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
),
|
||||
'visitStartDateStr': visitStartDateStr,
|
||||
'visitEndDateStr': visitEndDateStr,
|
||||
'visitReasonStr': visitReasonStr,
|
||||
'visitLevelStr': visitLevelStr,
|
||||
'visitTempBol': visitTempBol,
|
||||
'visitObsStr': visitObsStr,
|
||||
'visitorStrList': visitorStrList,
|
||||
'visitorJsonList': visitorJsonList,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -153,7 +121,8 @@ Future singInLoginAction(
|
|||
AppState().serialNumber = await getSerialNumber() ?? '';
|
||||
AppState().isLogged = true;
|
||||
|
||||
AppState().haveLocal = await checkLocals(context: context, model: model);
|
||||
AppState().haveLocal =
|
||||
await checkLocals(context: context, model: model);
|
||||
toggleApp(context, AppState().haveLocal!);
|
||||
} else {
|
||||
if (PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')) == null) {
|
||||
|
@ -261,8 +230,8 @@ Future forgotPasswdAction(
|
|||
}
|
||||
|
||||
Future toggleSignInPage(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'signInPage',
|
||||
context.go(
|
||||
'/signInPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -273,8 +242,8 @@ Future toggleSignInPage(BuildContext context) async {
|
|||
}
|
||||
|
||||
Future toggleSignUpPage(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'signUpPage',
|
||||
context.go(
|
||||
'/signUpPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -286,10 +255,10 @@ Future toggleSignUpPage(BuildContext context) async {
|
|||
|
||||
Future toggleApp(BuildContext context, bool haveLocal) async {
|
||||
if (haveLocal == true) {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => const HomePageWidget()));
|
||||
context.go('/homePage');
|
||||
} else if (haveLocal == false) {
|
||||
context.pushNamed(
|
||||
'receptionPage',
|
||||
context.go(
|
||||
'/receptionPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -421,7 +390,8 @@ Future changeStatusAction(
|
|||
String accessKey,
|
||||
String email,
|
||||
) async {
|
||||
Navigator.pop(context, true);
|
||||
// Navigator.pop(context, true);
|
||||
context.pop(true);
|
||||
|
||||
bool? blockVisitRequest;
|
||||
blockVisitRequest = await visitCancelAction(
|
||||
|
@ -628,8 +598,8 @@ Future scheduleVisitOptAction(BuildContext context) async {
|
|||
}
|
||||
|
||||
Future registerVisitorOptAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'registerVisitorPage',
|
||||
context.go(
|
||||
'/registerVisitorPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -641,8 +611,8 @@ Future registerVisitorOptAction(BuildContext context) async {
|
|||
}
|
||||
|
||||
Future peopleOnThePropertyAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'peopleOnThePropertyPage',
|
||||
context.go(
|
||||
'/peopleOnThePropertyPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -653,8 +623,8 @@ Future peopleOnThePropertyAction(BuildContext context) async {
|
|||
}
|
||||
|
||||
Future preferencesSettings(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'preferencesSettings',
|
||||
context.go(
|
||||
'/preferencesSettings',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -712,8 +682,8 @@ Future liberationHistoryOptAction(BuildContext context) async {
|
|||
}
|
||||
|
||||
Future accessQRCodeOptAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'qrCodePage',
|
||||
context.go(
|
||||
'/qrCodePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
|||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
|
||||
class NotificationService {
|
||||
|
@ -18,17 +19,17 @@ class NotificationService {
|
|||
'resource://drawable/notification_icon',
|
||||
[
|
||||
NotificationChannel(
|
||||
channelKey: 'basic_channel',
|
||||
channelGroupKey: 'basic_channel',
|
||||
channelName: 'Notificações do App',
|
||||
channelDescription: 'Canal de notificação do Aplicativo',
|
||||
importance: NotificationImportance.Max,
|
||||
channelShowBadge: false,
|
||||
playSound: true,
|
||||
criticalAlerts: true,
|
||||
onlyAlertOnce: true,
|
||||
defaultColor: Colors.green,
|
||||
ledColor: Colors.white,
|
||||
channelKey: 'basic_channel',
|
||||
channelGroupKey: 'basic_channel',
|
||||
channelName: 'Notificações do App',
|
||||
channelDescription: 'Canal de notificação do Aplicativo',
|
||||
importance: NotificationImportance.Max,
|
||||
channelShowBadge: false,
|
||||
playSound: true,
|
||||
criticalAlerts: true,
|
||||
onlyAlertOnce: true,
|
||||
defaultColor: Colors.green,
|
||||
ledColor: Colors.white,
|
||||
)
|
||||
],
|
||||
channelGroups: [
|
||||
|
@ -106,7 +107,7 @@ class NotificationService {
|
|||
ptText: 'Não',
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
|
@ -143,16 +144,16 @@ class NotificationService {
|
|||
)
|
||||
.then((value) {
|
||||
if (value) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
context.pop();
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
context.pop();
|
||||
DialogUtil.errorDefault(context);
|
||||
}
|
||||
}).catchError((e) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
context.pop();
|
||||
DialogUtil.errorDefault(context);
|
||||
});
|
||||
},
|
||||
|
@ -203,16 +204,16 @@ class NotificationService {
|
|||
)
|
||||
.then((value) {
|
||||
if (value) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
context.pop();
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
context.pop();
|
||||
DialogUtil.errorDefault(context);
|
||||
}
|
||||
}).catchError((e) {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
context.pop();
|
||||
DialogUtil.errorDefault(context);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,7 @@ 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_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
class OptModalWidget extends StatefulWidget {
|
||||
final String defaultPersonType;
|
||||
|
@ -78,7 +79,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
filterResult['accessType'] = selected['accessType']!.first;
|
||||
}
|
||||
|
||||
Navigator.pop(context, filterResult);
|
||||
// Navigator.pop(context, filterResult);
|
||||
context.pop(filterResult);
|
||||
}
|
||||
|
||||
Widget _buildCheckboxListTile(
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
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';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
class OptModalWidget extends StatefulWidget {
|
||||
final String defaultPersonType;
|
||||
|
@ -84,7 +84,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
filterResult['accessType'] = selected['accessType']!.first;
|
||||
}
|
||||
|
||||
Navigator.pop(context, filterResult);
|
||||
// Navigator.pop(context, filterResult);
|
||||
context.pop(filterResult);
|
||||
}
|
||||
|
||||
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options) {
|
||||
|
@ -329,4 +330,4 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ 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';
|
||||
|
||||
|
||||
|
||||
class OptionSelectionModalWidget extends StatefulWidget {
|
||||
const OptionSelectionModalWidget({
|
||||
super.key,
|
||||
|
@ -73,7 +71,7 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
|||
padding: const EdgeInsets.all(8.0),
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
|
@ -93,19 +91,23 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
|||
itemBuilder: (context, optionsListIndex) {
|
||||
return GestureDetector(
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
if (widget.routesListStr![optionsListIndex] == 'scheduleCompleteVisitPage') {
|
||||
context.pop();
|
||||
if (widget.routesListStr![optionsListIndex] ==
|
||||
'scheduleCompleteVisitPage') {
|
||||
// Navegação para a página ScheduleCompleteVisitPage com queryParameters
|
||||
context.pushNamed(
|
||||
'scheduleCompleteVisitPage',
|
||||
queryParameters: {
|
||||
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now()),
|
||||
'visitEndDateStr': DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now().add(const Duration(days: 1))),
|
||||
context.go(
|
||||
'/scheduleCompleteVisitPage',
|
||||
extra: {
|
||||
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||
.format(DateTime.now()),
|
||||
'visitEndDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
||||
.format(
|
||||
DateTime.now().add(const Duration(days: 1))),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
// Navegação para outras páginas
|
||||
context.pushNamed(widget.routesListStr![optionsListIndex]);
|
||||
context.go(widget.routesListStr![optionsListIndex]);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
|
@ -217,4 +219,4 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'package:hub/components/molecular_components/order_filter_modal/order_filter_modal_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/nav/nav.dart';
|
||||
|
||||
class OrderFilterModalWidget extends StatefulWidget {
|
||||
final String defaultAdresseeType;
|
||||
|
@ -91,7 +92,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
filterResult['status'] = selected['status']!.first;
|
||||
}
|
||||
|
||||
Navigator.pop(context, filterResult);
|
||||
// Navigator.pop(context, filterResult);
|
||||
context.pop(filterResult);
|
||||
}
|
||||
|
||||
Widget _buildCheckboxListTile(
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/enums/enum_throw_exception.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_animations.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'throw_exception_model.dart';
|
||||
|
||||
export 'throw_exception_model.dart';
|
||||
|
||||
class ThrowExceptionWidget extends StatefulWidget {
|
||||
|
@ -110,7 +112,7 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.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 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
class VisitorNotFoundComponentWidget extends StatefulWidget {
|
||||
const VisitorNotFoundComponentWidget({this.doc, Key? key}) : super(key: key);
|
||||
|
@ -75,7 +73,7 @@ class _VisitorNotFoundComponentWidgetState
|
|||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -146,7 +144,8 @@ class _VisitorNotFoundComponentWidgetState
|
|||
),
|
||||
);
|
||||
},
|
||||
).then((value) => Navigator.pop(context, value));
|
||||
).then((value) => context.pop(value));
|
||||
// Navigator.pop(context, value)
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart';
|
||||
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -167,7 +168,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
|||
AppState().cliUUID = local['CLI_ID'];
|
||||
AppState().local = local['CLI_NOME'];
|
||||
AppState().ownerUUID = local['CLU_OWNER_ID'];
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
} else if (local['CLU_STATUS'] == 'B') {
|
||||
String message = FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
|
@ -193,7 +194,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
|||
enText: 'Do you wish to accept the link to $localName?'),
|
||||
() async {
|
||||
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
|
||||
if (response['error'] == true) {
|
||||
DialogUtil.error(context, response['error_msg']);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:flutter/material.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 'package:hub/pages/reservation_page/reservation_page_widget.dart';
|
||||
import 'package:hub/shared/extensions/dialog_extensions.dart';
|
||||
|
||||
import '/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
||||
|
@ -41,9 +40,22 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
isGrid = !isGrid;
|
||||
}
|
||||
|
||||
Future accessQRCodeOptAction(BuildContext context) async {
|
||||
context.push(
|
||||
'/qrCodePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.scale,
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future scheduleCompleteVisitAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'scheduleCompleteVisitPage',
|
||||
context.push(
|
||||
'/scheduleCompleteVisitPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -57,8 +69,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
Future deliverySchedule(BuildContext context) async {
|
||||
final isProvisional = AppState().provisional;
|
||||
if (isProvisional == true) {
|
||||
context.pushNamed(
|
||||
'deliverySchedule',
|
||||
context.push(
|
||||
'/deliverySchedule',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -75,8 +87,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
Future provisionalSchedule(BuildContext context) async {
|
||||
final isProvisional = AppState().provisional;
|
||||
if (isProvisional == true) {
|
||||
context.pushNamed(
|
||||
'provisionalSchedule',
|
||||
context.push(
|
||||
'/provisionalSchedule',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -93,8 +105,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
Future fastPassAction(BuildContext context) async {
|
||||
final isWpp = AppState().whatsapp;
|
||||
if (isWpp) {
|
||||
context.pushNamed(
|
||||
'fastPassPage',
|
||||
context.push(
|
||||
'/fastPassPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -150,8 +162,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future registerVisitorOptAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'registerVisitorPage',
|
||||
context.push(
|
||||
'/registerVisitorPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -163,8 +175,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future peopleOnThePropertyAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'peopleOnThePropertyPage',
|
||||
context.push(
|
||||
'/peopleOnThePropertyPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -184,8 +196,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
), () async {
|
||||
AppState().deleteAll();
|
||||
|
||||
context.pushNamed(
|
||||
'welcomePage',
|
||||
context.go(
|
||||
'/welcomePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -198,8 +210,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future preferencesSettings(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'preferencesSettings',
|
||||
context.push(
|
||||
'/preferencesSettings',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -207,15 +219,15 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
).then((value) => true);
|
||||
);
|
||||
}
|
||||
|
||||
Future packageOrder(BuildContext context) async {
|
||||
final isWpp = AppState().whatsapp;
|
||||
|
||||
if (isWpp) {
|
||||
context.pushNamed(
|
||||
'packageOrder',
|
||||
context.push(
|
||||
'/packageOrder',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -223,7 +235,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
).then((value) => true);
|
||||
);
|
||||
} else {
|
||||
DialogUnavailable.unavailableFeature(context);
|
||||
}
|
||||
|
@ -232,7 +244,16 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
Future reservation(BuildContext context) async {
|
||||
final isWpp = AppState().whatsapp;
|
||||
if (isWpp) {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => ReservationPageWidget()));
|
||||
context.push(
|
||||
'/reservation',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.scale,
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
DialogUnavailable.unavailableFeature(context);
|
||||
}
|
||||
|
@ -285,8 +306,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future liberationHistoryAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'liberationHistory',
|
||||
context.push(
|
||||
'/liberationHistory',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -298,8 +319,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future accessHistoryAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'acessHistoryPage',
|
||||
context.push(
|
||||
'/acessHistoryPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -311,21 +332,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future visitHistoryAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'scheduleCompleteVisitPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.scale,
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future accessQRCodeOptAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'qrCodePage',
|
||||
context.push(
|
||||
'/scheduleCompleteVisitPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -337,8 +345,8 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
Future messageHistoryAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'messageHistoryPage',
|
||||
context.push(
|
||||
'/messageHistoryPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
|
|
@ -3,7 +3,6 @@ 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/atomic_components/menu_card_item/menu_card_item.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';
|
||||
|
@ -584,17 +583,4 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future accessQRCodeOptAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'qrCodePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.scale,
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
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/backend/api_requests/api_calls.dart';
|
||||
import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.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:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ScheduleVisitDetailWidget extends StatefulWidget {
|
||||
|
@ -156,7 +151,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -808,7 +803,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
(_model.postScheduleVisit?.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:hub/backend/api_requests/api_calls.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:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class UpArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
||||
|
@ -140,7 +141,7 @@ class _UpArrowLinkedLocalsComponentWidgetState
|
|||
r'''$.CLI_NOME''',
|
||||
).toString();
|
||||
setState(() {});
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
child: Container(
|
||||
width: 50.0,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'access_notification_modal_template_component_widget.dart'
|
||||
show AccessNotificationModalTemplateComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AccessNotificationModalTemplateComponentModel
|
||||
extends FlutterFlowModel<AccessNotificationModalTemplateComponentWidget> {
|
||||
|
@ -68,7 +70,7 @@ class AccessNotificationModalTemplateComponentModel
|
|||
(visitRequest.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import 'package:easy_debounce/easy_debounce.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:easy_debounce/easy_debounce.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'change_pass_model.dart';
|
||||
|
||||
export 'change_pass_model.dart';
|
||||
|
||||
class PassKeyTemplateWidget extends StatefulWidget {
|
||||
|
@ -311,7 +312,8 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
|||
? _model.keyTextFieldTextController2.text
|
||||
: _model.keyTextFieldTextController1.text,
|
||||
);
|
||||
Navigator.pop(context, true);
|
||||
// Navigator.pop(context, true);
|
||||
context.pop(true);
|
||||
},
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:hub/components/templates_components/details_component/details_co
|
|||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
|
@ -43,7 +43,9 @@ Widget buildDetails(
|
|||
visitaWrapItem['VTE_DOCUMENTO'] ?? '',
|
||||
)
|
||||
.then((value) {
|
||||
Navigator.pop(context, value);
|
||||
// Navigator.pop(context, value);
|
||||
context.pop(value);
|
||||
|
||||
if (value == false) {
|
||||
showSnackbar(
|
||||
context,
|
||||
|
@ -64,7 +66,7 @@ Widget buildDetails(
|
|||
);
|
||||
}
|
||||
}).catchError((err, stack) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
|
@ -100,19 +102,15 @@ Widget buildDetails(
|
|||
),
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
context.pop();
|
||||
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ScheduleCompleteVisitPageWidget(
|
||||
dropdownValue1: visitaWrapItem['MOT_DESCRICAO'],
|
||||
dropdownValue2: visitaWrapItem['NAC_DESCRICAO'],
|
||||
visitorJsonList: [visitaWrapItem],
|
||||
visitorStrList: visitaWrapItem['VTE_DOCUMENTO'],
|
||||
)),
|
||||
);
|
||||
context.pushNamed('scheduleCompleteVisitPage', extra: {
|
||||
'dropdownValue1': visitaWrapItem['MOT_DESCRICAO'],
|
||||
'dropdownValue2': visitaWrapItem['NAC_DESCRICAO'],
|
||||
'visitorJsonList': [visitaWrapItem],
|
||||
'visitorStrList': visitaWrapItem['VTE_DOCUMENTO'],
|
||||
});
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 130,
|
||||
|
|
|
@ -273,7 +273,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
FFLocalizations.of(context).getVariableText(
|
||||
enText: "Send E-mail Successful!",
|
||||
ptText: "E-mail Enviado com Sucesso!"));
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
} else {
|
||||
await DialogUtil.error(
|
||||
context,
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import 'package:flutter/material.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/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart';
|
||||
|
||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
class LiberationHistoryItemDetailsTemplateComponentModel
|
||||
extends FlutterFlowModel<
|
||||
|
@ -72,7 +70,7 @@ class LiberationHistoryItemDetailsTemplateComponentModel
|
|||
(visitRequest.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import 'package:flutter/material.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/message_notificaion_modal_template_component/message_notification_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
class MessageNotificationModalTemplateComponentModel
|
||||
extends FlutterFlowModel<MessageNotificationModalTemplateComponentWidget> {
|
||||
|
@ -69,7 +69,7 @@ class MessageNotificationModalTemplateComponentModel
|
|||
(visitRequest.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -10,9 +10,6 @@ import 'package:google_fonts/google_fonts.dart';
|
|||
import 'qr_code_pass_key_template_component_model.dart';
|
||||
export 'qr_code_pass_key_template_component_model.dart';
|
||||
|
||||
|
||||
|
||||
|
||||
class QrCodePassKeyTemplateComponentWidget extends StatefulWidget {
|
||||
const QrCodePassKeyTemplateComponentWidget({
|
||||
super.key,
|
||||
|
@ -84,7 +81,8 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -106,8 +104,8 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style:
|
||||
|
@ -127,7 +125,8 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||
|
@ -143,7 +142,8 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||
|
@ -163,7 +163,8 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
|
@ -275,8 +276,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
.asValidator(context),
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
LengthLimitingTextInputFormatter(4),
|
||||
|
||||
LengthLimitingTextInputFormatter(4),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -285,7 +285,8 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null ||
|
||||
|
@ -295,7 +296,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
await widget.toggleActionStatus?.call(
|
||||
_model.keyTextFieldTextController.text,
|
||||
);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'2cybbi5p' /* Enviar */,
|
||||
|
@ -303,9 +304,10 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -331,4 +333,4 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,17 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/flutter_flow/nav/serialization_util.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
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 '/actions/actions.dart' as action_blocks;
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'view_visit_detail_model.dart';
|
||||
|
||||
export 'view_visit_detail_model.dart';
|
||||
|
||||
class ViewVisitDetailWidget extends StatefulWidget {
|
||||
|
@ -176,7 +169,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -211,7 +204,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
// Navigator.pop(context);
|
||||
// context.pop();
|
||||
// await showModalBottomSheet(
|
||||
// isScrollControlled: true,
|
||||
// backgroundColor: Colors.transparent,
|
||||
|
@ -840,7 +833,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
(_model.deleteVisit?.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
} else {
|
||||
final error =
|
||||
await DialogUtil.errorDefault(context);
|
||||
|
@ -890,11 +883,11 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
|
||||
context.pushNamed(
|
||||
'scheduleCompleteVisitPage',
|
||||
queryParameters: {
|
||||
context.go(
|
||||
'/scheduleCompleteVisitPage',
|
||||
extra: {
|
||||
'visitStartDateStr': serializeParam(
|
||||
dateTimeFormat(
|
||||
'd/M/y H:mm:ss',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -92,7 +93,7 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||
import 'package:hub/components/atomic_components/shared_components_atoms/toast.dart';
|
||||
import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
||||
import 'package:hub/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.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/flutter_flow/nav/nav.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
||||
|
@ -434,7 +430,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
|||
await widget.getDocs?.call(
|
||||
_model.docs,
|
||||
);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
}
|
||||
|
||||
Future<void> addVisitor(BuildContext context) async {
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:from_css_color/from_css_color.dart';
|
|||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:json_path/json_path.dart';
|
||||
import 'package:timeago/timeago.dart' as timeago;
|
||||
|
@ -567,7 +568,7 @@ void showAlertDialog(BuildContext context, String title, String content,
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
FFButtonWidget(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
onPressed: () => context.pop(), //Navigator.pop(context),
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: MediaQuery.of(context).size.height * 0.05,
|
||||
|
|
|
@ -96,20 +96,33 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
builder: (context, params) => const RegisterVisitorPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'scheduleCompleteVisitPage',
|
||||
path: '/scheduleCompleteVisitPage',
|
||||
builder: (context, params) => ScheduleCompleteVisitPageWidget(
|
||||
visitorStrList: params.getParam(
|
||||
'visitorStrList',
|
||||
ParamType.String,
|
||||
),
|
||||
visitorJsonList: params.getParam<dynamic>(
|
||||
'visitorJsonList',
|
||||
ParamType.JSON,
|
||||
isList: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
name: 'scheduleCompleteVisitPage',
|
||||
path: '/scheduleCompleteVisitPage',
|
||||
builder: (context, params) {
|
||||
final dropdownValue1 = params.getParam(
|
||||
'dropdownValue1',
|
||||
ParamType.String,
|
||||
);
|
||||
final dropdownValue2 = params.getParam(
|
||||
'dropdownValue2',
|
||||
ParamType.String,
|
||||
);
|
||||
final visitorStrList = params.getParam(
|
||||
'visitorStrList',
|
||||
ParamType.String,
|
||||
);
|
||||
final visitorJsonList = params.getParam<dynamic>(
|
||||
'visitorJsonList',
|
||||
ParamType.JSON,
|
||||
isList: true,
|
||||
);
|
||||
return ScheduleCompleteVisitPageWidget(
|
||||
dropdownValue1: dropdownValue1 ?? '',
|
||||
dropdownValue2: dropdownValue2 ?? '',
|
||||
visitorStrList: visitorStrList ?? '',
|
||||
visitorJsonList: visitorJsonList ?? [],
|
||||
);
|
||||
}),
|
||||
FFRoute(
|
||||
name: 'deliverySchedule',
|
||||
path: '/deliverySchedule',
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:mime_type/mime_type.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
|
@ -79,10 +80,8 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
|||
),
|
||||
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
dense: false,
|
||||
onTap: () => Navigator.pop(
|
||||
context,
|
||||
mediaSource,
|
||||
),
|
||||
onTap: () => context.pop(mediaSource),
|
||||
// Navigator.pop(context,mediaSource,),
|
||||
);
|
||||
final mediaSource = await showModalBottomSheet<MediaSource>(
|
||||
context: context,
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/provisional_schedule_templat
|
|||
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -53,7 +54,7 @@ class _DeliveryScheduleState extends State<DeliverySchedule> {
|
|||
size: 30.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
),
|
||||
title: Text(
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/webview_util.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
@ -69,7 +70,7 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
},
|
||||
onUpdateVisitedHistory: (controller, uri, isVisited) {
|
||||
if (uri.toString().contains('/hub/home')) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -116,7 +117,7 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
},
|
||||
onUrlChange: (url) {
|
||||
if (url.url.toString().contains('/hub/home')) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
|
|
@ -262,7 +262,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
_requestFuture = _fetchRequests();
|
||||
});
|
||||
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
});
|
||||
},
|
||||
),
|
||||
|
@ -309,7 +309,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
_requestFuture = _fetchRequests();
|
||||
});
|
||||
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
});
|
||||
},
|
||||
)
|
||||
|
|
|
@ -128,7 +128,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
ptText: 'Não',
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
elevation: 0,
|
||||
|
@ -157,7 +157,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
)
|
||||
.then((value) {
|
||||
if (value.jsonBody['error'] == false) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
|
||||
AppState().notify = !AppState().notify;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
|
@ -203,7 +203,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
);
|
||||
}
|
||||
}).catchError((err) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
|
@ -226,7 +226,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
}).whenComplete(() => notifyListeners());
|
||||
} on Exception catch (e) {
|
||||
log(e.toString());
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
}
|
||||
},
|
||||
text: FFLocalizations.of(context).getVariableText(
|
||||
|
@ -285,7 +285,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
ptText: 'Cancelar',
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
|
@ -316,8 +316,19 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
AppState().deleteLocal();
|
||||
AppState().deleteOwnerUUID();
|
||||
|
||||
context.pushNamed(
|
||||
'homePage',
|
||||
context.pop();
|
||||
context.go(
|
||||
'/homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.scale,
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
);
|
||||
context.replace(
|
||||
'/homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -351,7 +362,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
})
|
||||
// ignore: body_might_complete_normally_catch_error
|
||||
.catchError((err, stack) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
|
@ -374,7 +385,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
});
|
||||
// notifyListeners();
|
||||
} catch (err, stack) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
|
@ -444,7 +455,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
FFButtonWidget(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
onPressed: () => context.pop(), // Navigator.pop(context),
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: MediaQuery.of(context).size.height * 0.05,
|
||||
|
@ -475,8 +486,8 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
if (value.jsonBody['error'] == false) {
|
||||
AppState().deleteAll();
|
||||
AppState().isLogged = false;
|
||||
context.goNamed(
|
||||
'welcomePage',
|
||||
context.go(
|
||||
'/welcomePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
@ -488,7 +499,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
}
|
||||
}).catchError((err) {
|
||||
log(err.toString());
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
|
@ -511,7 +522,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
});
|
||||
notifyListeners();
|
||||
} catch (err, stack) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
|
@ -753,8 +764,8 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
AppState().deleteAll();
|
||||
// setState(() {});
|
||||
|
||||
context.goNamed(
|
||||
'welcomePage',
|
||||
context.go(
|
||||
'/welcomePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:hub/components/templates_components/provisional_schedule_templat
|
|||
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -53,7 +54,7 @@ class _ProvisionalScheduleState extends State<ProvisionalSchedule> {
|
|||
size: 30.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
},
|
||||
),
|
||||
title: Text(
|
||||
|
|
|
@ -144,8 +144,8 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> {
|
|||
AppState().deleteAll();
|
||||
setState(() {});
|
||||
|
||||
context.goNamed(
|
||||
'welcomePage',
|
||||
context.go(
|
||||
'/welcomePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import 'dart:developer';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/utils/webview_util.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
class ReservationPageWidget extends StatefulWidget {
|
||||
final String freToken = AppState().userUUID;
|
||||
|
@ -70,7 +70,7 @@ class _ReservationPageWidgetState extends State<ReservationPageWidget> {
|
|||
},
|
||||
onUpdateVisitedHistory: (controller, uri, isVisited) {
|
||||
if (uri.toString().contains('/hub/home')) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -117,7 +117,7 @@ class _ReservationPageWidgetState extends State<ReservationPageWidget> {
|
|||
},
|
||||
onUrlChange: (url) {
|
||||
if (url.url.toString().contains('/hub/home')) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
|
|
@ -1634,7 +1634,7 @@ Widget scheduleVisit(BuildContext context,
|
|||
(value.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
|
||||
//MILESTONE
|
||||
_model.dropDownValue1 = null;
|
||||
|
@ -1657,7 +1657,7 @@ Widget scheduleVisit(BuildContext context,
|
|||
await showShare(value.jsonBody);
|
||||
} else {
|
||||
await DialogUtil.errorDefault(context);
|
||||
Navigator.pop(context);
|
||||
context.pop();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue