serialize method

  1. @override
Object serialize()
override

Serializes the PNF to a transportable format.

Serialization logic:

  • If only url and filename exist: returns URL string (toString())
  • Otherwise: returns structured Map (toMap())

Implementation

@override
Object serialize() {
  var uri = uriString;
  if (uri.isNotEmpty) {
    return uri;
  }
  // return inner map
  return _wrapper.toMap();
}