BackgroundType.fromJson constructor

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

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();
  }
}