memory static method

MorphIconData memory(
  1. Uint8List bytes, {
  2. bool fit = true,
  3. double grid = 24,
  4. String? cacheKey,
})

Parses SVG bytes — the response body of a request you made yourself, a blob from a database, an entry you pulled out of an archive.

This is also the escape hatch on the web, where file and network are unavailable: fetch the bytes however your app already does, then call this.

Implementation

static MorphIconData memory(
  Uint8List bytes, {
  bool fit = true,
  double grid = 24,
  String? cacheKey,
}) {
  final source = utf8.decode(bytes, allowMalformed: true);
  return _parse(
    _key('mem', cacheKey ?? source, fit, grid),
    source,
    fit,
    grid,
  );
}