$computed<U> function

  1. @Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
Computed<U> $computed<U>(
  1. U getter()
)

Creates a reactive Computed with the provided getter function. The value is recomputed only when dependencies change and is guaranteed to notify listeners when it is updated.

The Computed instance is automatically disposed when the widget is disposed.

Note: This is part of the deprecated defineWidget API.

Implementation

@Deprecated('Use KaeruWidget instead. This will be removed in a future version.')
Computed<U> $computed<U>(U Function() getter) =>
    autoContextDispose(Computed(getter));