giphy_picker 1.0.0 copy "giphy_picker: ^1.0.0" to clipboard
giphy_picker: ^1.0.0 copied to clipboard

outdated

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

example/lib/main.dart

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 {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Giphy Picker Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

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

class _MyHomePageState extends State<MyHomePage> {
  GiphyGif _gif;

  @override
  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(Icons.search),
            onPressed: () async {
              // request your Giphy API key at https://developers.giphy.com/
              final gif = await GiphyPicker.pickGif(
                  context: context, apiKey: '[YOUR GIPHY APIKEY]');

              if (gif != null) {
                setState(() => _gif = gif);
              }
            }));
  }
}
76
likes
0
pub points
92%
popularity

Publisher

verified publisherfirstfloorsoftware.com

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, giphy_client, http

More

Packages that depend on giphy_picker