isInstance abstract method

bool isInstance(
  1. Object? obj
)

Checks if an object is an instance of this class.

Parameters:

  • obj: The object to check

Returns:

  • true if obj is non-null and an instance of T
  • false otherwise

Example:

Class.forType<String>().isInstance('hello'); // true

Implementation

bool isInstance(Object? obj);