deserializeFocusMode function

FocusMode deserializeFocusMode(
  1. String str
)

Returns the focus mode for a given String.

Implementation

FocusMode deserializeFocusMode(String str) {
  switch (str) {
    case 'locked':
      return FocusMode.locked;
    case 'auto':
      return FocusMode.auto;
    default:
      throw ArgumentError('"$str" is not a valid FocusMode value');
  }
}