Open aeq-dev opened 3 days ago
Hey, Thank you for using the package! To better assist you, could you please provide a minimal reproducible example that I can run to investigate the issue? It’s a bit challenging to deduce the behavior from the code snippet shared, as the implementations are not included
Hi ! Thanks for quick reply, Okey so for _sendSingleSMS : I'm using flutter_sim_data: ^1.0.5 and updateSMSStatus: it's my own server api point. So what I'm doing here : Get pending sms list from my api server Then send sms for each item using this package and finally update the sms status using api server
Hey, so since I don’t have the exact implementation of _sendSingleSMS, my guess is that the issue might be due to the sendSMS
function. While it has a return type of Future<bool?>
, it may not be returning the actual status of the sent SMS at the moment.
This issue has already been addressed in an open PR #4 , but I haven’t had the chance to review and merge it yet. I’ll prioritize it and get it resolved as soon as possible.
Here's it :
Future<bool> _sendSingleSMS({
required SMS sms,
required int subscriptionId,
}) async {
try {
await _simDataPlugin.sendSMS(
phoneNumber: sms.phone,
message: sms.message,
subId: subscriptionId,
);
return true;
} catch (e) {
print('SMS sending failed: $e');
return false;
}
}
I mean if we could have a callback after sending sms, something like this :
await _simDataPlugin.sendSMS(
phoneNumber: sms.phone,
message: sms.message,
subId: subscriptionId,
)->then(
// Do something
);
Any chance to help me please ? :)
Hello, Thanks for this awesome package :) Please I'm facing an issue when I call an api after each sms sent (success or failed), the sms sent but the api point never called, Here my code :
What I'm missing ? Thanks :)