GemParameter class Core
A single typed parameter used across the SDK.
A GemParameter holds a triple: a unique key, a typed value, and an optional localized name. The type property indicates how to interpret value (see ValueType). Parameters frequently appear inside ParameterList and SearchableParameterList containers returned by various SDK APIs (for example content metadata or overlay preview data).
Use asJson to obtain a deeply structured representation suitable for serialization or for sending to platform code. Use toJson when a compact bridge-friendly representation is required (lists are represented by pointer ids in that case).
Constructors
- GemParameter({ValueType? type, dynamic value, String? name, String? key})
- Constructs a parameter object with optional fields.
-
GemParameter.fromJson(Map<
String, dynamic> json) -
Deserializes a JSON-compatible map to create an instance.
factory
- GemParameter.withBool({required String key, required bool value, String? name})
-
Creates a boolean GemParameter.
factory
- GemParameter.withInt({required String key, required int value, String? name})
-
Creates an integer GemParameter.
factory
- GemParameter.withList({required String key, required ParameterList value, String? name})
-
Creates a list-valued GemParameter.
factory
- GemParameter.withReal({required String key, required double value, String? name})
-
Creates a real (double) GemParameter.
factory
- GemParameter.withString({required String key, required String value, String? name})
-
Creates a string GemParameter.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- key ↔ String?
-
The parameter key.
getter/setter pair
- name ↔ String?
-
The parameter name.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ ValueType?
-
The parameter type.
getter/setter pair
- value ↔ dynamic
-
The parameter value.
getter/setter pair
Methods
-
asJson(
) → Map< String, dynamic> ? - Returns the parameters as a deeply structured JSON object (the lists contained within will be expanded).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes this instance to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
covariant GemParameter other) → bool -
The equality operator.
override