OssLicenses class
Lifecycle controller for the embedded license list.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Static Properties
- refCountForTest → int
-
Test-only: the current outstanding-handle count. Do not use in
production code — it exists so tests can assert that use releases its
reference (returns to 0) even when the callback throws.
no setter
Static Methods
-
acquire(
) → Future< OssLicensesHandle> - Acquire a handle to the license list. First call decodes the blob; subsequent calls share the same decoded list. Safe to call concurrently.
-
resetForTest(
) → void - Test-only: resets the cached state. Do not call in production code.
-
use<
T> (FutureOr< T> body(List<OssLicense> licenses)) → Future<T> -
Runs
bodywith the decoded license list and releases the reference when it completes — even ifbodythrows. Prefer this for one-shot access: you never hold, or forget to close, a handle. Returns whateverbodyreturns;bodymay be sync or async.