ValueSocket<V extends Object> class
final
A socket for one value merged from all contributions, such as the minimum iOS version of the app.
Values carry no imports.
- Inheritance
-
- Object
- SocketKind
- ValueSocket
Constructors
-
ValueSocket({required MergePolicy<
V> policy, required String renderer(V value), bool required = false}) -
Creates the kind with a merge
policyand arendererof the merged value; setrequiredif the socket cannot render without a value.const
Properties
- carriesImports → bool
-
Whether contributions to the socket carry Dart imports.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
policy
→ MergePolicy<
V> -
How two contributed values merge.
final
- required → bool
-
Whether the socket needs at least one contribution, such as a minimum
version that the template cannot leave empty.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accepts(
Object? value) → bool -
Whether
valuecan be contributed to the socket. -
merge(
Iterable< SocketContribution> contributions, {required String key}) → V? -
Merges the values of
contributionswith the policy, or returnsnullif there are none. -
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