Selection.fromJson constructor

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

Implementation

factory Selection.fromJson(Map<String, dynamic> json) {
  final name = json['metadata']['name'];
  final icons = (json['icons'] as List<dynamic>)
      .map((x) => Icon.fromJson(x['properties']))
      .toList();

  return Selection(name, icons);
}