disallowUnsafeConstructors property
bool
disallowUnsafeConstructors
Implementation
static bool get disallowUnsafeConstructors => _disallowUnsafeConstructors;
Global configuration that specifies if unsafe constructors can be used
or not. The default is false
.
Implementation
static set disallowUnsafeConstructors(bool value) {
if (_disallowUnsafeConstructors == value) return;
if (ImmutableCollection.isConfigLocked)
throw StateError("Can't change the configuration of immutable collections.");
_disallowUnsafeConstructors = value;
}