BetterEffectLifecyclePolicy class final

Controls when and how an owned Runtime shuts down.

Constructors

BetterEffectLifecyclePolicy({bool closeOnWidgetDispose = true, bool closeOnApplicationExit = true, bool interruptExecutionsBeforeClose = true, Duration gracePeriod = Duration.zero})
const
BetterEffectLifecyclePolicy.application({bool closeOnWidgetDispose = true, bool closeOnApplicationExit = true, bool interruptExecutionsBeforeClose = true, Duration gracePeriod = Duration.zero})
The default policy for an application root Runtime.
const
BetterEffectLifecyclePolicy.external()
A policy for externally owned Runtimes.
const
BetterEffectLifecyclePolicy.widget({bool interruptExecutionsBeforeClose = true, Duration gracePeriod = Duration.zero})
A policy for Runtimes owned only by one widget subtree.
const

Properties

closeOnApplicationExit bool
Close an application-owned Runtime for exit requests and host detach.
final
closeOnWidgetDispose bool
Close an owned Runtime when its widget owner leaves the tree.
final
gracePeriod Duration
Time to drain active work before cooperative interruption is requested.
final
hashCode int
The hash code for this object.
no setterinherited
interruptExecutionsBeforeClose bool
Ask active Effects to stop cooperatively after gracePeriod.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited