readArtboardsBlock method

void readArtboardsBlock(
  1. StreamReader block
)

Implementation

void readArtboardsBlock(StreamReader block) {
  int artboardCount = block.readUint16Length();
  _artboards = List<ActorArtboard?>.filled(artboardCount, null);

  for (int artboardIndex = 0, end = _artboards.length;
      artboardIndex < end;
      artboardIndex++) {
    StreamReader? artboardBlock = block.readNextBlock(blockTypesMap);
    if (artboardBlock == null) {
      break;
    }
    switch (artboardBlock.blockType) {
      case BlockTypes.actorArtboard:
        {
          ActorArtboard artboard = makeArtboard();
          artboard.read(artboardBlock);
          _artboards[artboardIndex] = artboard;
          break;
        }
    }
  }
}