spawn<S> static method

Bind spawn<S>(
  1. InstanceBuilderCallback<S> builder, {
  2. String? tag,
  3. bool permanent = true,
})

Creates a binding and puts the specified dependency into the GetX service locator.

Returns the binding created.

Implementation

static Bind<dynamic> spawn<S>(
  InstanceBuilderCallback<S> builder, {
  String? tag,
  bool permanent = true,
}) {
  Get.spawn<S>(builder, tag: tag, permanent: permanent);
  return _FactoryBind<S>(
    tag: tag,
    global: false,
    autoRemove: permanent,
  );
}