fromMap static method

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

Construct from Map.

Implementation

static BackgroundType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'backgroundTypeFill':
      return BackgroundTypeFill.fromMap(_map);
    case 'backgroundTypeWallpaper':
      return BackgroundTypeWallpaper.fromMap(_map);
    case 'backgroundTypePattern':
      return BackgroundTypePattern.fromMap(_map);
    case null:
    default:
      return null;
  }
}