LxBase<T> constructor

LxBase<T>(
  1. T initial, {
  2. void onListen()?,
  3. void onCancel()?,
  4. String? name,
  5. bool isSensitive = false,
  6. bool equals(
    1. T previous,
    2. T current
    )?,
})

Creates a reactive wrapper around initial.

Implementation

LxBase(T initial,
    {this.onListen,
    this.onCancel,
    this.name,
    bool isSensitive = false,
    this.equals})
    : _value = initial,
      _isSensitive = isSensitive {
  if (LevitReactiveMiddleware.hasInitMiddlewares) {
    _LevitReactiveMiddlewareChain.applyOnInit(this);
  }
}