AdvancedFieldSelector.fromJson constructor

AdvancedFieldSelector.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AdvancedFieldSelector.fromJson(Map<String, dynamic> json) {
  return AdvancedFieldSelector(
    field: json['Field'] as String,
    endsWith: (json['EndsWith'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    equals: (json['Equals'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    notEndsWith: (json['NotEndsWith'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    notEquals: (json['NotEquals'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    notStartsWith: (json['NotStartsWith'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    startsWith: (json['StartsWith'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}