accepts<T> static method

bool accepts<T>(
  1. Type type
)

Returns true if T accepts a value of type.

Implementation

static bool accepts<T>(Type type) {
  return T == type || T == Object || T == dynamic;
}