fromMap static method

BackgroundFill? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static BackgroundFill? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'backgroundFillFreeformGradient':
      return BackgroundFillFreeformGradient.fromMap(_map);
    case 'backgroundFillSolid':
      return BackgroundFillSolid.fromMap(_map);
    case 'backgroundFillGradient':
      return BackgroundFillGradient.fromMap(_map);
    case null:
    default:
      return null;
  }
}