IconCacheService constructor

IconCacheService(
  1. Store store, {
  2. Future<Uint8List> svgConverter(
    1. String,
    2. double, [
    3. Size? size
    ])?,
})

Creates an instance of IconCacheService.

Requires an ObjectBox Store to interact with the database. Optionally, a custom svgConverter function can be provided.

Implementation

IconCacheService(
  Store store, {
  Future<Uint8List> Function(String, double, [Size? size])? svgConverter,
})  : _cachedIconBox = store.box<CachedIcon>(),
      _svgConverter = svgConverter ?? getBitmapDescriptorFromSvgAsset;