getReleaseData method
Implementation
Future<ReleaseData?> getReleaseData(String projectId) async {
ReleaseData? res;
try {
final bundle = _localRepo.getBundle();
if (bundle == null) return null;
if (bundle.projectId != projectId) {
await removeData();
return null;
}
res = ReleaseData(
version: bundle.translationVersion,
// ignore: deprecated_member_use_from_same_package
data: bundle.legacyTranslations,
);
} catch (e) {
_log.w('Failed to load cached translations.', e);
}
return res;
}