BackgroundFill.fromJson constructor

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

Implementation

factory BackgroundFill.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case BackgroundFillSolid.CONSTRUCTOR:
      return BackgroundFillSolid.fromJson(json);
    case BackgroundFillGradient.CONSTRUCTOR:
      return BackgroundFillGradient.fromJson(json);
    case BackgroundFillFreeformGradient.CONSTRUCTOR:
      return BackgroundFillFreeformGradient.fromJson(json);
    default:
      return const BackgroundFill();
  }
}