finishReport method
Implementation
Future<void> finishReport(String packName) async {
log.i('Sending zip file to server $packName');
var packFile = File(packName);
var sendResult = await Client().sendPack(pulseHost, clientUid, clientSecret, packFile);
cleanReport(sendResult, packName);
BuildContext? context = getContext();
if (context != null && context.mounted) {
PulseLocalizations localizations = PulseLocalizations.of(context);
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(localizations.reportSubmitted),
));
} else {
log.w("Context became null or unmounted before showing 'report submitted' message.");
}
}