FB2Image constructor

FB2Image(
  1. String binary
)

Implementation

FB2Image(final String binary) {
  id = RegExp(r'id="(.+?)"').firstMatch(binary)?.group(1);
  contentType = RegExp(r'content-type="(.+?)"').firstMatch(binary)?.group(1);
  bytes = RegExp(r'<binary[\s\S]+?>([\s\S]+?)<\/binary>')
          .firstMatch(binary)
          ?.group(1) ??
      '';
}