This commit is contained in:
jantunesmesias 2024-08-02 12:28:22 -03:00
parent 5a7bb289f0
commit 12c334bdd0
1 changed files with 14 additions and 16 deletions

View File

@ -172,23 +172,21 @@ Widget liberationDynamicListView(
height: double.infinity,
decoration: const BoxDecoration(),
child: FutureBuilder<ApiCallResponse>(
future: PhpGroup.getMessagesCall
.call(
devUUID: FFAppState().devUUID.toString(),
userUUID: FFAppState().userUUID.toString(),
cliID: FFAppState().cliUUID.toString(),
atividade: 'getMensagens',
pageSize: '100',
pageNumber: '1',
tipoDestino: DestIndex,
)
.catchError((error) {
log('Error: ${error.toString()}');
return Future.delayed(Duration(seconds: 1), () {
return Center(
child: Text('Erro ao carregar mensagens'),
future: Future(() async {
try {
return await PhpGroup.getMessagesCall.call(
devUUID: FFAppState().devUUID.toString(),
userUUID: FFAppState().userUUID.toString(),
cliID: FFAppState().cliUUID.toString(),
atividade: 'getMensagens',
pageSize: '100',
pageNumber: '1',
tipoDestino: DestIndex,
);
});
} catch (error) {
log('Error: ${error.toString()}');
throw error;
}
}),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {