InstanceConstant.fromJson constructor
Creates an InstanceConstant object from JSON.
json
is a map representing the JSON structure.
constants
is a list of Constant objects that are referenced by index
in the JSON.
Implementation
factory InstanceConstant.fromJson(
Map<String, Object?> json,
List<Constant> constants,
) {
return InstanceConstant(
fields: json.map(
(key, constantIndex) => MapEntry(key, constants[constantIndex as int]),
),
);
}