BackgroundType.fromJson constructor
a BackgroundType return type can be :
Implementation
factory BackgroundType.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case BackgroundTypeWallpaper.CONSTRUCTOR:
return BackgroundTypeWallpaper.fromJson(json);
case BackgroundTypePattern.CONSTRUCTOR:
return BackgroundTypePattern.fromJson(json);
case BackgroundTypeFill.CONSTRUCTOR:
return BackgroundTypeFill.fromJson(json);
default:
return const BackgroundType();
}
}