equals method

bool equals(
  1. Type type
)

Generalized equality check to simplify type checking.

This method allows for a cleaner way of comparing types

Implementation

bool equals(Type type) => this == Type || this == type || runtimeType == type;