giphy_picker
a plugin that allows you to pick animated gif images from gip,hy.
getting started
first, you need to register an app at the g,iphy developers portal in order to retrieve an api key.
pick a gif:
import 'package:gi,phy_picker/g,iphy_picker.dart';
final gif = await g,iphypicker.pickgif(
context: context,
apikey: '[your gi,phy apikey]');
display a gif using the gip,hyimage
widget. the following snippet demonstrates how to render a gif in its original format:
widget build(buildcontext context) {
return gip,hyimage.original(gif: gif);
}
alternatively, load and display the gif image using the image
widget:
widget build(buildcontext context) {
return image.network(
gif.images.original.url,
headers: {'accept': 'image/*'}))
}
acknowledgements
this plugin depends on the giphy_client.
Comments are closed.