operator [] method

BodyPart operator [](
  1. int index
)

Eases access to a nested part, same as accessing parts[index]

Implementation

BodyPart operator [](int index) => parts != null
    ? parts!.elementAt(index)
    : throw RangeError('$index invalid for BodyPart with length of 0');