itemFwHot method

Fw<V> itemFwHot(
  1. K key, {
  2. V? defaultValue,
  3. DspReg? disposers,
})

Implementation

Fw<V> itemFwHot(
  K key, {
  V? defaultValue,
  DspReg? disposers,
}) {
  return frw(
    fr(() {
      return watch()[key] ?? defaultValue!;
    }),
    (value) {
      update((m) {
        m[key] = value;
      });
    },
  );
}