runWithOwner<T> static method

T runWithOwner<T>(
  1. String ownerId,
  2. T fn()
)

Executes fn while associating any created reactive variables with ownerId.

Implementation

static T runWithOwner<T>(String ownerId, T Function() fn) {
  return _LevitReactiveCore.runWithContext(
      LxListenerContext(type: 'Owner', id: 0, data: {'ownerId': ownerId}),
      fn);
}