getImage method

CdnImage getImage(
  1. int index
)

Retreive CdnImage from group Throws RangeError if index greater than filesCount

Implementation

CdnImage getImage(int index) {
  if (index > filesCount - 1) {
    throw RangeError('Group contains only $filesCount files');
  }

  return CdnImage('$id/nth/$index');
}