getData method Null safety

Future<T> getData(
  1. dynamic rootBundle
)

Gets the data, either as recently downloaded, or as asset (fallback).

Implementation

Future<T> getData(final AssetBundle rootBundle) async {
  try {
    return getDataFromString(
      await DaoString(_localDatabase).get(_getDatabaseKey()),
    )!;
  } catch (e) {
    //
  }
  return getDataFromString(
    await rootBundle.loadString(getAssetPath()),
  )!;
}