singletonFwProto<T extends GeneratedMessage> method

Future<Fw<T>> singletonFwProto<T extends GeneratedMessage>({
  1. required int id,
  2. required T create(),
  3. T? defaultValue,
  4. required DspReg disposers,
})

Implementation

Future<Fw<T>> singletonFwProto<T extends GeneratedMessage>({
  required int id,
  required T Function() create,
  T? defaultValue,
  required DspReg disposers,
}) =>
    singletonFw(
      id: id,
      bidi: BiDi.proto(create),
      defaultValue: defaultValue ?? create()
        ..freeze(),
      disposers: disposers,
    );