bucket property

RestorationBucket? get bucket

The RestorationBucket used for the restoration data of the RestorablePropertys registered to this mixin.

The bucket has been claimed from the surrounding RestorationScope using restorationId.

The getter returns null if state restoration is turned off. When state restoration is turned on or off during the lifetime of this mixin (and hence the return value of this getter switches between null and non-null) didToggleBucket is called.

Interacting directly with this bucket is uncommon. However, the bucket may be injected into the widget tree in the State's build method using an UnmanagedRestorationScope. That allows descendants to claim child buckets from this bucket for their own restoration needs.

Implementation

RestorationBucket? get bucket => _bucket;