runWithContext<T> static method

T runWithContext<T>(
  1. LxListenerContext context,
  2. T fn()
)

Executes fn within a specific listener context.

Used internally to attribute subscriptions to specific widgets or controllers.

Returns the value returned by fn.

Throws any exception thrown by fn.

Implementation

static T runWithContext<T>(LxListenerContext context, T Function() fn) {
  return Lx.runWithContext(context, fn);
}