service<T extends MomentumService> method

T service<T extends MomentumService>({
  1. bool runtimeType = true,
  2. dynamic alias,
})

A method for getting a service marked with MomentumService that are injected into Momentum root widget.

Implementation

T service<T extends MomentumService>({bool runtimeType = true, dynamic alias}) {
  // ignore: deprecated_member_use_from_same_package
  return getService<T>(runtimeType: runtimeType, alias: alias);
}