MyService<T> constructor

MyService<T>({
  1. T service()?,
  2. Future<T> asyncService()?,
  3. bool permanent = false,
  4. bool fenix = false,
  5. String? tag,
})

Implementation

MyService({
  this.service,
  this.asyncService,
  this.permanent = false,
  this.fenix = false,
  this.tag,
}) : assert(
        (service != null) ^ (asyncService != null),
        'service 和 asyncService 必须且只能提供其中一个',
      );