RestorationBucket.empty constructor
Creates an empty RestorationBucket to be provided to adoptChild to add it to the bucket hierarchy.
Instantiating a bucket directly is rare, most buckets are created by claiming a child from a parent via claimChild. If no parent bucket is available, RestorationManager.rootBucket may be used as a parent.
Implementation
RestorationBucket.empty({
required String restorationId,
required Object? debugOwner,
}) : _restorationId = restorationId,
_rawData = <String, Object?>{} {
assert(() {
_debugOwner = debugOwner;
return true;
}());
if (kFlutterMemoryAllocationsEnabled) {
_maybeDispatchObjectCreation();
}
}