toIntValue static method

int toIntValue(
  1. GiphyVideoViewPlaybackState state
)

Converts a GiphyVideoViewPlaybackState enum value to an integer.

state The playback state to be converted.

Returns the corresponding integer value for the given playback state.

Implementation

static int toIntValue(GiphyVideoViewPlaybackState state) {
  switch (state) {
    case GiphyVideoViewPlaybackState.unknown:
      return 0;
    case GiphyVideoViewPlaybackState.readyToPlay:
      return 3;
    case GiphyVideoViewPlaybackState.playing:
      return 4;
    case GiphyVideoViewPlaybackState.paused:
      return 5;
    }
}