patchbayLifecycleReaderFor function
PatchbayLifecycleStateReader
patchbayLifecycleReaderFor({
- required bool isAppResumed()?,
- required PatchbayLifecycleStateReader? lifecycleState,
Pairs a lifecycle reader with the resumed decision it has to describe.
lifecycleState wins when the caller supplies one. Otherwise the reader
follows isAppResumed: the binding when the default decision is in use, and
unknown when the caller replaced it.
Implementation
PatchbayLifecycleStateReader patchbayLifecycleReaderFor({
required bool Function()? isAppResumed,
required PatchbayLifecycleStateReader? lifecycleState,
}) =>
lifecycleState ??
(isAppResumed == null
? patchbayBindingLifecycleState
: patchbayUnknownLifecycleState);