random method

Future<GiphyGif> random({
  1. String? tag,
  2. String rating = GiphyRating.g,
  3. bool sticker = false,
})

Returns a single random gif or sticker related to the word or phrase entered.

Implementation

Future<GiphyGif> random({
  String? tag,
  String rating = GiphyRating.g,
  bool sticker = false,
}) async {
  return _fetchGif(
    baseUri.replace(
      path: sticker ? 'v1/stickers/random' : 'v1/gifs/random',
      queryParameters: <String, String>{
        if (tag != null) 'tag': tag,
        'rating': rating,
      },
    ),
  );
}