giphyInfo method

GiphyInfo? giphyInfo(
  1. GiphyInfoType type
)

Returns the GiphyInfo for the given type.

Implementation

GiphyInfo? giphyInfo(GiphyInfoType type) {
  final giphy = extraData['giphy'] as Map<String, Object?>?;
  if (giphy == null) return null;

  final info = giphy[type.value] as Map<String, Object?>?;
  if (info == null) return null;

  return GiphyInfo(
    url: info['url']! as String,
    width: double.parse(info['width']! as String),
    height: double.parse(info['height']! as String),
  );
}