RefenaScope.withContainer constructor
RefenaScope.withContainer({
- Key? key,
- required RefenaContainer container,
- PlatformHint? platformHint,
- bool ownsContainer = true,
- bool defaultRef = true,
- required Widget child,
Creates a RefenaScope that uses an existing RefenaContainer.
By default, the RefenaScope will dispose the RefenaContainer
when the RefenaScope itself is disposed.
To prevent this, set ownsContainer
to false.
Implementation
factory RefenaScope.withContainer({
Key? key,
required RefenaContainer container,
PlatformHint? platformHint,
bool ownsContainer = true,
bool defaultRef = true,
required Widget child,
}) {
return RefenaScope._(
key: key,
container: container
..platformHint = platformHint ??
(container.platformHint == PlatformHint.unknown
? RefenaScope.getPlatformHint()
: container.platformHint),
implicitContainer: false,
ownsContainer: ownsContainer,
defaultRef: defaultRef,
child: child,
);
}