Avatar.fromJson constructor

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

Implementation

factory Avatar.fromJson(Map<String, dynamic> json) {
  return Avatar(
    id: json['id'] as String,
    isFromCache: json['isFromCache'] as bool,
    assetPath: json['assetPath'] as String? ?? ''
  );
}