ServiceContainerException.nullInstanceUnallowed constructor

ServiceContainerException.nullInstanceUnallowed({
  1. required Type type,
  2. String? name,
})

Thrown when bindInstance is called with a null instance.

Implementation

ServiceContainerException.nullInstanceUnallowed({
  required this.type,
  this.name,
}) : message =
         "Instance cannot be null for type($type)${name != null ? ' with name($name)' : ''} in container or parent scopes";