register<T> function

void register<T>(
  1. T creator()
)

Shortcut to register a factory function for creating instances of type T.

Implementation

void register<T>(T Function() creator) => ServiceLocator.I.register(creator);