has<T> abstract method

bool has<T>([
  1. String? context
])

Checks if a binding exists for type T.

If a context is provided, it checks for a contextual binding under that key. Otherwise, it checks for the default binding.

  • context: Optional context key to check.

Returns true if a binding exists, false otherwise.

Implementation

bool has<T>([String? context]);