This commit is contained in:
jantunesmesias 2024-08-08 09:11:00 -03:00
parent 1da4899d5a
commit 09b339da8d
2 changed files with 6 additions and 7 deletions

View File

@ -3,6 +3,7 @@ import 'dart:developer';
import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/flutter_flow/nav/nav.dart';
import 'package:hub/flutter_flow/nav/serialization_util.dart'; import 'package:hub/flutter_flow/nav/serialization_util.dart';
import 'package:hub/shared/utils/dialog_util.dart';
import '/backend/api_requests/api_calls.dart'; import '/backend/api_requests/api_calls.dart';
import '/components/molecular_components/throw_exception/throw_exception_widget.dart'; import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
@ -841,6 +842,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
false) { false) {
Navigator.pop(context); Navigator.pop(context);
} else { } else {
final error =
await DialogUtil.errorDefault(context);
await showModalBottomSheet( await showModalBottomSheet(
isScrollControlled: true, isScrollControlled: true,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
@ -849,11 +852,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
builder: (context) { builder: (context) {
return Padding( return Padding(
padding: MediaQuery.viewInsetsOf(context), padding: MediaQuery.viewInsetsOf(context),
child: ThrowExceptionWidget( child: error,
msg: PhpGroup.deleteVisitCall.msg(
(_model.deleteVisit?.jsonBody ?? ''),
)!,
),
); );
}, },
).then((value) => safeSetState(() {})); ).then((value) => safeSetState(() {}));

View File

@ -157,10 +157,10 @@ class PreferencesPageModel with ChangeNotifier {
notifica: FFAppState().notify ? 'S' : 'N', notifica: FFAppState().notify ? 'S' : 'N',
) )
.then((value) { .then((value) {
Navigator.pop(context);
if (value.jsonBody['error'] == false) { if (value.jsonBody['error'] == false) {
FFAppState().notify = !FFAppState().notify; Navigator.pop(context);
FFAppState().notify = !FFAppState().notify;
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
content: Text( content: Text(