ARBItemAnnotation.fromJson constructor

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

Implementation

factory ARBItemAnnotation.fromJson(Map<String, dynamic> json) {
  final placeholders =
      (json.lookup('placeholders') as Map<String, dynamic>? ?? {})
          .entries
          .map((x) => ARBItemAnnotationPlaceholder.fromJson(x.key, x.value))
          .toList();

  return ARBItemAnnotation(
    description: json.containsKey('description') ? json['description'] : null,
    placeholders: placeholders,
    isAutoGen: false,
  );
}