fromStringValue static method

dynamic fromStringValue(
  1. String value, {
  2. bool isClip = false,
})

Converts a string value to a GiphyRendition or GiphyClipsRendition object.

The value parameter is the string representation of the rendition. If isClip is true, the conversion is done to a GiphyClipsRendition, otherwise to a GiphyRendition.

Throws an ArgumentError if the string value is not recognized.

Implementation

static dynamic fromStringValue(String value, {bool isClip = false}) {
  if (isClip) {
    return _fromStringClipsValue(value);
  } else {
    return _fromStringValue(value);
  }
}