giphy_picker 0.0.2

giphy_picker #

A plugin that allows you to pick animated GIF images from Giphy.


Getting Started #

First, you need to register an app at the Giphy Developers Portal in order to retrieve an API key.

Pick a GIF:

import 'package:giphy_picker/giphy_picker.dart';

final gif = await GiphyPicker.pickGif(
                  context: context, 
                  apiKey: '[YOUR GIPHY APIKEY]');

Display a GIF using the GiphyImage widget. The following snippet demonstrates how to render a GIF in its original format:

Widget build(BuildContext context) {
  return GiphyImage.original(gif: gif);

Alternatively, load and display the GIF image using the Image widget:

Widget build(BuildContext context) {
      headers: {'accept': 'image/*'}))

Acknowledgements #

This plugin depends on the giphy_client.

0.0.1 - 2019-03-09 #

  • Initial release

0.0.2 - 2019-03-09 #

  • Fixes example reference


import 'package:flutter/material.dart';
import 'package:giphy_client/giphy_client.dart';
import 'package:giphy_picker/giphy_picker.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Giphy Picker Demo',
      theme: ThemeData(
      home: MyHomePage(),

class MyHomePage extends StatefulWidget {
  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  GiphyGif _gif;

  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(_gif?.title ?? 'Giphy Picker Demo'),
        body: SafeArea(
            child: Center(
                child: _gif == null
                    ? Text('Pick a gif..')
                    : GiphyImage.original(gif: _gif))),
        floatingActionButton: FloatingActionButton(
            child: Icon(,
            onPressed: () async {
              // request your Giphy API key at
              final gif = await GiphyPicker.pickGif(
                  context: context, apiKey: '[YOUR GIPHY APIKEY]');

              if (gif != null) {
                setState(() => _gif = gif);

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  giphy_picker: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:giphy_picker/giphy_picker.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Sep 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/widgets/giphy_search_view.dart. (-0.50 points)

Analysis of lib/src/widgets/giphy_search_view.dart reported 1 hint:

line 61 col 43: This function has a return type of 'bool', but doesn't end with a return statement.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (giphy_client, http).

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
giphy_client ^0.0.1 0.0.1 0.2.0
http ^0.11.0+1 0.11.3+17 0.12.0+2
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
json_annotation 0.2.9+1 3.0.0
meta 1.1.7
path 1.6.4
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies