Merge branch 'develop' into feature/fd-466
This commit is contained in:
commit
c8ef889273
|
@ -14,8 +14,8 @@ void main() {
|
||||||
|
|
||||||
group('Initialization', () {
|
group('Initialization', () {
|
||||||
group('Navigation', () {
|
group('Navigation', () {
|
||||||
setUpAll(() async => await initializeApp()
|
setUpAll(() async => await initializeApp().then(
|
||||||
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
(_) async => await StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||||
testWidgets('Test Welcome', (WidgetTester tester) async {
|
testWidgets('Test Welcome', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testWelcome();
|
await _testWelcome();
|
||||||
|
@ -26,16 +26,16 @@ void main() {
|
||||||
});
|
});
|
||||||
group('Authentication', () {
|
group('Authentication', () {
|
||||||
group('Sign in', () {
|
group('Sign in', () {
|
||||||
setUpAll(() async => await initializeApp()
|
setUpAll(() async => await initializeApp().then(
|
||||||
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
(_) async => await StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||||
testWidgets('Test Sign In', (WidgetTester tester) async {
|
testWidgets('Test Sign In', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testSignIn();
|
await _testSignIn();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
group('Sign up', () {
|
group('Sign up', () {
|
||||||
setUpAll(() async => await initializeApp()
|
setUpAll(() async => await initializeApp().then(
|
||||||
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
(_) async => await StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||||
testWidgets('Test Sign Up', (WidgetTester tester) async {
|
testWidgets('Test Sign Up', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testSignUp();
|
await _testSignUp();
|
||||||
|
|
|
@ -73,19 +73,19 @@ Future<void> onMessageReceived(Map<String, dynamic> payload, String? extra, Stri
|
||||||
task: 'L',
|
task: 'L',
|
||||||
response: '',
|
response: '',
|
||||||
id: payload['idVisitante'].toString(),
|
id: payload['idVisitante'].toString(),
|
||||||
).then((value) {
|
).then((value) async {
|
||||||
if (value) {
|
if (value) {
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
} else {
|
} else {
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
}
|
}
|
||||||
}).catchError((e) {
|
}).catchError((e) async {
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -112,19 +112,19 @@ Future<void> onMessageReceived(Map<String, dynamic> payload, String? extra, Stri
|
||||||
response: '',
|
response: '',
|
||||||
id: payload['idVisitante'].toString(),
|
id: payload['idVisitante'].toString(),
|
||||||
)
|
)
|
||||||
.then((value) {
|
.then((value) async {
|
||||||
if (value) {
|
if (value) {
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
} else {
|
} else {
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
}
|
}
|
||||||
}).catchError((e) {
|
}).catchError((e) async {
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -77,7 +77,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
|
|
||||||
if (isError) {
|
if (isError) {
|
||||||
final String errorMsg = widget.response?.jsonBody['error_msg'];
|
final String errorMsg = widget.response?.jsonBody['error_msg'];
|
||||||
_handleError(context, errorMsg);
|
await _handleError(context, errorMsg);
|
||||||
return widget.response;
|
return widget.response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _handleError(BuildContext context, String errorMsg) {
|
static Future<void> _handleError(BuildContext context, String errorMsg) async {
|
||||||
DialogUtil.error(context, errorMsg);
|
await DialogUtil.error(context, errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> _fetchResponseLink(String status, String cliID) async {
|
Future<dynamic> _fetchResponseLink(String status, String cliID) async {
|
||||||
|
@ -151,7 +151,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
return response.jsonBody;
|
return response.jsonBody;
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s);
|
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s);
|
||||||
return {
|
return {
|
||||||
'error': true,
|
'error': true,
|
||||||
|
@ -212,7 +212,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
// message = local['CLU_BLK_MESSAGE'];
|
// message = local['CLU_BLK_MESSAGE'];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
DialogUtil.warning(context, message);
|
await DialogUtil.warning(context, message);
|
||||||
_localsWrap = [];
|
_localsWrap = [];
|
||||||
_localsFuture = _fetchLocals();
|
_localsFuture = _fetchLocals();
|
||||||
} else {
|
} else {
|
||||||
|
@ -222,20 +222,22 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
FFLocalizations.of(context).getVariableText(ptText: 'Ativar Vínculo', enText: 'Activate Link'),
|
FFLocalizations.of(context).getVariableText(ptText: 'Ativar Vínculo', enText: 'Activate Link'),
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Deseja aceitar o vínculo a $localName?',
|
ptText: 'Deseja aceitar o vínculo a $localName?',
|
||||||
enText: 'Do you wish to accept the link to $localName?'), () async {
|
enText: 'Do you wish to accept the link to $localName?'),
|
||||||
|
() async {
|
||||||
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
||||||
context.pop();
|
context.pop();
|
||||||
|
|
||||||
if (response['error'] == true) {
|
if (response['error'] == true) {
|
||||||
DialogUtil.error(context, response['error_msg']);
|
await DialogUtil.error(context, response['error_msg']);
|
||||||
} else {
|
} else {
|
||||||
DialogUtil.success(context, response['error_msg']);
|
await DialogUtil.success(context, response['error_msg']);
|
||||||
setState(() {
|
setState(() {
|
||||||
_localsWrap = [];
|
_localsWrap = [];
|
||||||
_localsFuture = _fetchLocals();
|
_localsFuture = _fetchLocals();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -617,7 +617,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
if (PhpGroup.postProvVisitSchedulingCall
|
if (PhpGroup.postProvVisitSchedulingCall
|
||||||
.error((model.provVisitSchedule?.jsonBody ?? '')) ==
|
.error((model.provVisitSchedule?.jsonBody ?? '')) ==
|
||||||
false) {
|
false) {
|
||||||
DialogUtil.success(
|
await DialogUtil.success(
|
||||||
context,
|
context,
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: "Agendamento Provisório Realizado com Sucesso!",
|
ptText: "Agendamento Provisório Realizado com Sucesso!",
|
||||||
|
@ -631,14 +631,14 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
var message = PhpGroup.postProvVisitSchedulingCall
|
var message = PhpGroup.postProvVisitSchedulingCall
|
||||||
.msg((model.provVisitSchedule?.jsonBody ?? ''));
|
.msg((model.provVisitSchedule?.jsonBody ?? ''));
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
DialogUtil.error(context, message);
|
await DialogUtil.error(context, message);
|
||||||
} else {
|
} else {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed(
|
LogUtil.requestAPIFailed(
|
||||||
"processRequest.php", "", "Cadastrar Visita Provisória", e, s);
|
"processRequest.php", "", "Cadastrar Visita Provisória", e, s);
|
||||||
}
|
}
|
||||||
|
|
|
@ -733,7 +733,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return DialogUtil.error(
|
return await DialogUtil.error(
|
||||||
context,
|
context,
|
||||||
PhpGroup.postScheduleVisitorCall.errorMsg(_model.scheduleVisitor?.jsonBody) == null
|
PhpGroup.postScheduleVisitorCall.errorMsg(_model.scheduleVisitor?.jsonBody) == null
|
||||||
? FFLocalizations.of(context).getVariableText(
|
? FFLocalizations.of(context).getVariableText(
|
||||||
|
|
|
@ -195,13 +195,13 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheetandFaceDetection({
|
||||||
if (faces.isEmpty) {
|
if (faces.isEmpty) {
|
||||||
final String message = FFLocalizations.of(context)
|
final String message = FFLocalizations.of(context)
|
||||||
.getVariableText(ptText: "Nenhuma face detectada na imagem", enText: "No face detected in the image");
|
.getVariableText(ptText: "Nenhuma face detectada na imagem", enText: "No face detected in the image");
|
||||||
DialogUtil.error(context, message);
|
await DialogUtil.error(context, message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (faces.length > 1) {
|
if (faces.length > 1) {
|
||||||
final String message = FFLocalizations.of(context).getVariableText(
|
final String message = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: "Mais de uma face detectada na imagem", enText: "More than one face detected in the image");
|
ptText: "Mais de uma face detectada na imagem", enText: "More than one face detected in the image");
|
||||||
DialogUtil.error(context, message);
|
await DialogUtil.error(context, message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,7 +209,7 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('processRequest', "", "Busca Acesso", e, s);
|
LogUtil.requestAPIFailed('processRequest', "", "Busca Acesso", e, s);
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
|
|
@ -333,7 +333,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Solicitações", e, s);
|
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Solicitações", e, s);
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
|
|
@ -119,7 +119,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Mensagems", e, s);
|
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Mensagems", e, s);
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
|
|
@ -122,7 +122,7 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('processRequest', "", "Busca Encomendas", e, s);
|
LogUtil.requestAPIFailed('processRequest', "", "Busca Encomendas", e, s);
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
|
|
@ -120,7 +120,7 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Pets", e, s);
|
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Pets", e, s);
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
@ -318,8 +318,8 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
_petsWrap = [];
|
_petsWrap = [];
|
||||||
_petsFuture = _fetchVisits().then((value) => value!.jsonBody['pets'] ?? []);
|
_petsFuture = _fetchVisits().then((value) => value!.jsonBody['pets'] ?? []);
|
||||||
});
|
});
|
||||||
}).catchError((e, s) {
|
}).catchError((e, s) async {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Pets", e, s);
|
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Pets", e, s);
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
|
|
@ -95,7 +95,7 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s);
|
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s);
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
@ -274,8 +274,8 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
_visitWrap = [];
|
_visitWrap = [];
|
||||||
_visitFuture = _fetchVisits();
|
_visitFuture = _fetchVisits();
|
||||||
});
|
});
|
||||||
}).catchError((e, s) {
|
}).catchError((e, s) async {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s);
|
LogUtil.requestAPIFailed("proccessRequest.php", "", "Consulta de Visitas", e, s);
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
_hasData = false;
|
_hasData = false;
|
||||||
|
|
|
@ -18,7 +18,7 @@ class AuthenticationService {
|
||||||
final response = await callback.call();
|
final response = await callback.call();
|
||||||
|
|
||||||
if (response.jsonBody['error']) {
|
if (response.jsonBody['error']) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
||||||
|
@ -78,16 +78,16 @@ class AuthenticationService {
|
||||||
await login(context);
|
await login(context);
|
||||||
} else {
|
} else {
|
||||||
if (response.jsonBody['error'] == null) {
|
if (response.jsonBody['error'] == null) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
} else {
|
} else {
|
||||||
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
await DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
||||||
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
await DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);
|
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,14 +115,14 @@ class AuthenticationService {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.jsonBody['error'] == false) return true;
|
if (response.jsonBody['error'] == false) return true;
|
||||||
DialogUtil.error(context, response.jsonBody['error_msg']);
|
await DialogUtil.error(context, response.jsonBody['error_msg']);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('registro.php', email.toString(), "Register", e, s);
|
LogUtil.requestAPIFailed('registro.php', email.toString(), "Register", e, s);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -152,12 +152,12 @@ class AuthenticationService {
|
||||||
response = await callback.call(email: email);
|
response = await callback.call(email: email);
|
||||||
|
|
||||||
if (response.jsonBody['error'] == false) {
|
if (response.jsonBody['error'] == false) {
|
||||||
DialogUtil.success(context, message);
|
await DialogUtil.success(context, message);
|
||||||
} else {
|
} else {
|
||||||
DialogUtil.error(context, response.jsonBody['error_msg']);
|
await DialogUtil.error(context, response.jsonBody['error_msg']);
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s);
|
LogUtil.requestAPIFailed('forgotPassword.php', email, "Forgot Password", e, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,13 +172,13 @@ class AuthenticationService {
|
||||||
enText: "Password changed successfully!",
|
enText: "Password changed successfully!",
|
||||||
ptText: "Senha alterada com sucesso!",
|
ptText: "Senha alterada com sucesso!",
|
||||||
);
|
);
|
||||||
DialogUtil.success(context, message).then((_) => context.pop);
|
await DialogUtil.success(context, message).then((_) => context.pop);
|
||||||
} else {
|
} else {
|
||||||
final String message = response.jsonBody['error_msg'];
|
final String message = response.jsonBody['error_msg'];
|
||||||
DialogUtil.error(context, message);
|
await DialogUtil.error(context, message);
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s);
|
LogUtil.requestAPIFailed('changePassword.php', email, "Change Password", e, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class LocalizationService {
|
||||||
enText: 'Verify your connection',
|
enText: 'Verify your connection',
|
||||||
ptText: 'Verifique sua conexão',
|
ptText: 'Verifique sua conexão',
|
||||||
);
|
);
|
||||||
DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, response));
|
await DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, response));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class LocalizationService {
|
||||||
enText: 'Verify your connection',
|
enText: 'Verify your connection',
|
||||||
ptText: 'Verifique sua conexão',
|
ptText: 'Verifique sua conexão',
|
||||||
);
|
);
|
||||||
DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, response));
|
await DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, response));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ class LocalizationService {
|
||||||
enText: 'Error getting locals, verify your connection',
|
enText: 'Error getting locals, verify your connection',
|
||||||
ptText: 'Erro ao obter locais, verifique sua conexão',
|
ptText: 'Erro ao obter locais, verifique sua conexão',
|
||||||
);
|
);
|
||||||
DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, null));
|
await DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, null));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ class LocalizationService {
|
||||||
enText: 'Error getting data, verify your connection',
|
enText: 'Error getting data, verify your connection',
|
||||||
ptText: 'Erro ao obter dados, verifique sua conexão',
|
ptText: 'Erro ao obter dados, verifique sua conexão',
|
||||||
);
|
);
|
||||||
DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, null));
|
await DialogUtil.error(context, errorMsg).whenComplete(() => selectLocal(context, null));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ class LocalizationService {
|
||||||
}
|
}
|
||||||
if (response.jsonBody['error'] == false) return await processData(context).then((value) => value);
|
if (response.jsonBody['error'] == false) return await processData(context).then((value) => value);
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s);
|
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue