getLicense method Null safety

LicenseRecord? getLicense(
  1. String id
)

Returns the LicenseRecord for an id or null if the license or corresponding title record is not found.

Implementation

LicenseRecord? getLicense(String id) {
  LicenseModel? license = _licenseService.getById(Bytes.base64UrlDecode(id));
  if (license == null) return null;
  TitleModel? title = _titleService.getById(license.title);
  if (title == null) return null;
  return _toLicense(title, license);
}