Merge branch 'develop' into feat/fd-905
This commit is contained in:
commit
5a0e9dc129
|
@ -242,6 +242,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
if (widget.buttons.isNotEmpty) // Adicione este SizedBox com a altura desejada
|
||||
OverflowBar(
|
||||
overflowAlignment: OverflowBarAlignment.center,
|
||||
alignment: MainAxisAlignment.center,
|
||||
overflowSpacing: 2,
|
||||
spacing: 2,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
|
|
|
@ -12,6 +12,7 @@ import 'package:hub/pages/liberation_history/liberation_history_model.dart';
|
|||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
import 'package:hub/shared/utils/snackbar_util.dart';
|
||||
import 'package:hub/shared/utils/validator_util.dart';
|
||||
|
||||
class LiberationHistoryWidget extends StatefulWidget {
|
||||
|
@ -219,7 +220,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
),
|
||||
icon: const Icon(Icons.done),
|
||||
onPressed: () async {
|
||||
_model.answersRequest
|
||||
await _model.answersRequest
|
||||
.call(
|
||||
context: context,
|
||||
ref: liberationHistoryItem['NOT_ID'].toString(),
|
||||
|
@ -229,17 +230,23 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
)
|
||||
.then((value) {
|
||||
if (value) {
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Successfully resolved visit', ptText: 'Visita resolvida com sucesso'),
|
||||
false);
|
||||
SnackBarUtil.showSnackBar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Successfully resolved visit',
|
||||
ptText: 'Visita resolvida com sucesso',
|
||||
),
|
||||
isError: false,
|
||||
);
|
||||
} else {
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Error resolving visit', ptText: 'Erro ao resolver visita'),
|
||||
true);
|
||||
SnackBarUtil.showSnackBar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Error resolving visit',
|
||||
ptText: 'Erro ao resolver visita',
|
||||
),
|
||||
isError: true,
|
||||
);
|
||||
}
|
||||
}).whenComplete(() {
|
||||
safeSetState(() {
|
||||
|
@ -268,7 +275,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
),
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: () async {
|
||||
return _model.answersRequest
|
||||
await _model.answersRequest
|
||||
.call(
|
||||
context: context,
|
||||
ref: liberationHistoryItem['NOT_ID'].toString(),
|
||||
|
@ -277,21 +284,23 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
id: liberationHistoryItem['VTE_ID'].toString(),
|
||||
)
|
||||
.then((message) {
|
||||
if (message.isEmpty) {
|
||||
if (message != null || message != '') {
|
||||
showSnackbar(
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Successfully resolved visit', ptText: 'Visita resolvida com sucesso'),
|
||||
false);
|
||||
context,
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Successfully resolved visit',
|
||||
ptText: 'Visita resolvida com sucesso',
|
||||
),
|
||||
false,
|
||||
);
|
||||
} else {
|
||||
showSnackbar(context, message, true);
|
||||
}
|
||||
|
||||
}).whenComplete(() {
|
||||
safeSetState(() {
|
||||
_requestWrap = [];
|
||||
_requestFuture = _fetchRequests();
|
||||
});
|
||||
|
||||
context.pop();
|
||||
});
|
||||
},
|
||||
|
|
|
@ -119,6 +119,7 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
initAsync();
|
||||
tabBarController = TabController(
|
||||
vsync: Navigator.of(context),
|
||||
length: 2,
|
||||
|
@ -143,7 +144,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
textControllerObservation = TextEditingController();
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
await initAsync();
|
||||
devUUID = await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage) ?? '';
|
||||
userUUID = await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage) ?? '';
|
||||
cliUUID = await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage) ?? '';
|
||||
|
@ -411,7 +411,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
// model.safeSetState!();
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
|
@ -489,7 +488,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
});
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: 100,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
|
|
Loading…
Reference in New Issue