DependencyIsFutureException constructor

DependencyIsFutureException({
  1. required Object type,
  2. required Entity<Object>? groupEntity,
})

Implementation

DependencyIsFutureException({
  required Object type,
  required Entity? groupEntity,
}) : super(
        condition:
            'Attempted to retrieve a dependency of type "$type" in group "$groupEntity", but it is actually a Future<$type>.',
        reason:
            'This exception is thrown when trying to access a Future dependency synchronously. Dependencies that are asynchronous should be awaited or resolved using the appropriate method.',
        options: [
          'Use "await di.get<$type>(groupEntity: Entity($groupEntity))" instead of "di<$type>(groupEntity: Entity($groupEntity))".',
        ],
      );