OfType<T extends Attachment> method

List<T> OfType<T extends Attachment>()

Implementation

List<T> OfType<T extends Attachment>() {
  return this
      .where((attachment) => attachment is T)
      .map((attachment) => attachment as T)
      .toList();
}