FeatureSchema.fromJson constructor
FeatureSchema.fromJson(
- Map<
String, dynamic> json, - GlobalConfig global
Creates a FeatureSchema from a JSON map and global config.
Implementation
factory FeatureSchema.fromJson(
Map<String, dynamic> json,
GlobalConfig global,
) {
final functions =
(json['functions'] as List<dynamic>?)
?.map((f) => FunctionDef.fromJson(f as Map<String, dynamic>))
.toList() ??
[];
return FeatureSchema(
name: json['name'] as String? ?? '',
functions: functions,
globalConfig: global,
);
}