Icon.fromJson constructor

Icon.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory Icon.fromJson(Map<String, Object?> json) {
  return Icon(
    path: json[r'path'] as String? ?? '',
    width: (json[r'width'] as num?)?.toInt() ?? 0,
    height: (json[r'height'] as num?)?.toInt() ?? 0,
    isDefault: json[r'isDefault'] as bool? ?? false,
  );
}