getData method

Stream<DATA> getData([
  1. bool errorPredicate(
    1. LceError<DATA> error
    )?
])

Returns model's data stream dropping state information DATA Source model data type errorPredicate A predicate to check error state. If predicate returns true, the stream emits error event

Implementation

Stream<DATA> getData([bool Function(LceError<DATA> error)? errorPredicate]) => errorIf(errorPredicate ?? (_) => true)
    .where((state) => null != state.data)
    .map((state) => state.data!)
    .distinct();