requireData property
T
get
requireData
Returns data if kind is Kind.onData, otherwise throws a StateError error.
Implementation
T get requireData => isNotEmpty(_value)
? _value as T
: (throw StateError(
'This notification has no data value, because its kind is $kind'));