notationOptionsFor function
The options printNotation's output is parsed with: the document's canvas id and width.
Implementation
NotationOptions notationOptionsFor(Json document) {
final roots = readStrings(document['roots']);
final screen = roots.isEmpty ? 'screen' : roots.first;
final width = readMap(readMap(readMap(document['nodes'])?[screen])?['layout'])?['width'];
return NotationOptions(screen: screen, width: width is num ? width.toDouble() : 390);
}