getBoolData method

Future<bool> getBoolData(
  1. String key,
  2. Future<bool> parser(
    1. String value
    )
)

Retrieve a boolean value by its Key value. Supply a parser function to process the operation. (See. Flutter's AssetBundle.loadStructuredData

Implementation

Future<bool> getBoolData(
    String key, Future<bool> Function(String value) parser) async {
  assert(Assets._assets != null, 'Assets.init() must be called first.');
  bool data;
  try {
    data =
        await Assets._assets!.loadStructuredData('$setPath(key)$key', parser);
  } catch (ex) {
    data = false;
  }
  return data;
}