provideSvg method

  1. @override
String provideSvg(
  1. void message
)
override

Provides the SVG string for loading by decoding the byte array.

If the bytes cannot be decoded, it will return an empty string or handle the error gracefully depending on the implementation.

Implementation

@override
String provideSvg(void message) {
  try {
    return utf8.decode(bytes, allowMalformed: true);
  } catch (e) {
    // Log or handle the error as appropriate
    return ''; // Returning an empty string as a fallback
  }
}