fromNativeValue static method

WallpaperTarget fromNativeValue(
  1. String? value
)

Resolves a native string value back into a WallpaperTarget.

Unknown values fall back to WallpaperTarget.home.

Implementation

static WallpaperTarget fromNativeValue(String? value) {
  switch (value) {
    case 'lock':
      return WallpaperTarget.lock;
    case 'both':
      return WallpaperTarget.both;
    default:
      return WallpaperTarget.home;
  }
}