A giphy picker for flutter

Overview

giphy_picker

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

Gif

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) {
  return Image.network(
      gif.images.original.url, 
      headers: {'accept': 'image/*'}))
}

Acknowledgements

This plugin depends on the giphy_client.

Comments
  • Require update

    Require update

    `Because giphy_picker 1.0.8 depends on http ^0.12.0+2 and no versions of giphy_picker match >1.0.8 <2.0.0, giphy_picker ^1.0.8 requires http ^0.12.0+2.

    opened by leszekkrol 2
  • GiphyDecorator was added to improve the customization

    GiphyDecorator was added to improve the customization

    Hey, thanks for this nice package.

    I wanted to add some customization to the picker, since it's limited to some variables , I added GiphyDecorator which contains some values:

      final bool showAppBar;
      final ThemeData giphyTheme;
      final double searchElevation;
    

    The most important is the giphyTheme , where we can set our own Theme (to avoid passing many params).

    Also I added a bouncer for improve the delay when we are searching. It doesn't break anything, I added a new sample, you can see the result :

    giphy_result

    And this is the sample code (for my sample):

    
                  final gif = await GiphyPicker.pickGif(
                    context: context,
                    apiKey: '[YOUR GIPHY APIKEY]',
                    fullScreenDialog: false,
                    decorator: GiphyDecorator(
                      showAppBar: false,
                      searchElevation: 4,
                      giphyTheme: ThemeData.dark().copyWith(
                        inputDecorationTheme: InputDecorationTheme(
                          border: InputBorder.none,
                          enabledBorder: InputBorder.none,
                          focusedBorder: InputBorder.none,
                          contentPadding: EdgeInsets.zero,
                        ),
                      ),
                    ),
                  );
    
    opened by diegoveloper 2
  • LabelText Color

    LabelText Color

    Hello, How can I change the label text color? We create an application in black, so that the text entered in the field is invisible to the user. Changing ThemeData does not affect the color on the form. Any ideas?

    Example of ThemeData:

    ThemeData(
            primaryColor: Color.fromRGBO(26, 30, 37, 1.0),
            backgroundColor: Color.fromRGBO(26, 30, 37, 1.0),
            textTheme: TextTheme(
              headline1: TextStyle(color: Colors.white),
              headline6: TextStyle(color: Colors.white),
              bodyText2: TextStyle(color: Colors.white),
            ),
            inputDecorationTheme: InputDecorationTheme(
              fillColor: Colors.white,
              focusColor: Colors.white,
              hoverColor: Colors.white,
              hintStyle: TextStyle(
                color: Color.fromRGBO(183, 192, 182, 1.0)
              ),
              counterStyle: TextStyle(
                color: Color.fromRGBO(183, 192, 182, 1.0)
              ),
              labelStyle: TextStyle(
                color: Color.fromRGBO(183, 192, 182, 1.0)
              ),
              contentPadding: new EdgeInsets.symmetric(vertical: 0.0),
            ),
            cursorColor: Colors.white,
            indicatorColor: Colors.white,
            focusColor: Colors.white,
            fontFamily: 'Avenir',
            scaffoldBackgroundColor: Colors.black,
            pageTransitionsTheme: PageTransitionsTheme(
              builders: {
                TargetPlatform.android: CupertinoPageTransitionsBuilder(),
                TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
              }
            )
          ),
    
    opened by leszekkrol 2
  • 15mb demo.gif is packing with assets

    15mb demo.gif is packing with assets

    Hello folks,

    Thank you for making this amazing package. I've found that demo.gif from assets/ directory is packing into release build. What do you think, is it worth considering to exclude this 15mb file? Thank you :)

    opened by zulman 2
  • Unable to compile

    Unable to compile

    the new version is unable to compile version 1.0.1 is working fine

    Compiler message: ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/giphy_picker-1.0.2/lib/src/widgets/giphy_context.dart:40:10: Error: The method 'getElementForInheritedWidgetOfExactType' isn't defined for the class 'BuildContext'.

    • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../development/flutter/packages/flutter/lib/src/widgets/framework.dart'). Try correcting the name to the name of an existing method, or defining a method named 'getElementForInheritedWidgetOfExactType'. .getElementForInheritedWidgetOfExactType()
    opened by phong764119 2
  • `GiphyPreviewType` added in order to fix the preview images

    `GiphyPreviewType` added in order to fix the preview images

    In order to fix this issue: https://github.com/firstfloorsoftware/giphy_picker/issues/15

    This PR adds a new param GiphyPreviewType . The value by default is previewGif.

    This is a sample using the new param with the value previewWebp :

    
              final gif = await GiphyPicker.pickGif(
                context: context,
                apiKey: '[YOUR GIPHY APIKEY]',
                fullScreenDialog: false,
                previewType: GiphyPreviewType.previewWebp,
                decorator: GiphyDecorator(
                  showAppBar: false,
                  searchElevation: 4,
                  giphyTheme: ThemeData.dark().copyWith(
                    inputDecorationTheme: InputDecorationTheme(
                      border: InputBorder.none,
                      enabledBorder: InputBorder.none,
                      focusedBorder: InputBorder.none,
                      contentPadding: EdgeInsets.zero,
                    ),
                  ),
                ),
              );
    

    You can see now how the image is not blurry.

    Simulator Screen Shot - iPhone 11 Pro Max - 2020-10-07 at 00 04 20

    opened by diegoveloper 1
  • GiphyDecorator was added to improve the customization

    GiphyDecorator was added to improve the customization

    I wanted to add some customization to the picker, since it's limited to some variables , I added GiphyDecorator which contains some values:

      final bool showAppBar;
      final ThemeData giphyTheme;
      final double searchElevation;
    

    The most important is the giphyTheme , where we can set our own Theme (to avoid passing many params).

    Also I added a bouncer for improve the delay when we are searching. It doesn't break anything, I added a new sample, you can see the result :

    giphy_result

    And this is the sample code (for my sample):

    
                  final gif = await GiphyPicker.pickGif(
                    context: context,
                    apiKey: '[YOUR GIPHY APIKEY]',
                    fullScreenDialog: false,
                    decorator: GiphyDecorator(
                      showAppBar: false,
                      searchElevation: 4,
                      giphyTheme: ThemeData.dark().copyWith(
                        inputDecorationTheme: InputDecorationTheme(
                          border: InputBorder.none,
                          enabledBorder: InputBorder.none,
                          focusedBorder: InputBorder.none,
                          contentPadding: EdgeInsets.zero,
                        ),
                      ),
                    ),
                  );
    
    opened by diegoveloper 1
  • feature/optionally show preview screen

    feature/optionally show preview screen

    Thank you for creating this plugin :) As I am building a proof-of-concept chat messenger, it is really useful!

    • One feature, however, that I'd like is that I can select a gif without seeing a preview page, just like in WhatsApp etc. Hence, this PR introduces a showPreviewPage property.
    • I would also like to be able to localize the screen, so I've added a searchText property too.
    • I also updated to the latest gitignore and removed example/ios/Flutter/flutter_export_environment.sh from source control.

    If you have any concerns, please raise them. Test on Android/iOS with showPreviewPage set to tru and false, everything working as expected.

    opened by defuncart 1
  • Preview Images in the GridView are blurred

    Preview Images in the GridView are blurred

    I saw in the code you are using

    final url =
            gif.images.previewGif.url ?? gif.images.fixedWidthSmallStill.url;
    

    Which looks really blurred on high resolution devices, any way to add a new param to view the previews in the grid in a better resolution?

    image

    opened by diegoveloper 0
  • fixed issue of popping more than needed

    fixed issue of popping more than needed

    Popping all the way back to the initial screen could be unwanted behavior. This will cause it to only pop back to the screen where it was opened from.

    opened by adamfuller 0
  • Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.

    Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.

    It would be so awesome if you could just sort this warning that comes up during build:

    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/giphy_picker-2.0.0/lib/src/widgets/giphy_search_view.dart:23:20: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
     - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart').
        WidgetsBinding.instance?.addPostFrameCallback((_) {
                       ^
    

    It's just a matter of removing that question mark after instance...

    opened by kari538 0
  • Giphy Emoji is not loading

    Giphy Emoji is not loading

    I am using giphy_picker for my custom GIF keyboard. when I try to load Emojis instead of GIFs and stickers by replacing the baseUri 'v1/stickers/trending' or 'v1/gifs/trending' with v1/emoji, it will display "No data" text. Thank you.

    opened by kiburtemesgen 0
  • Display attribution mark in search page.

    Display attribution mark in search page.

    Added two parameter "showAttributionMark" and "attributionMarkDarkMode", the first shows attribution in the bottom of the search page, the second changes the image to fit dark mode.

    opened by sohaibnoman 1
Owner
First Floor Software
First Floor Software
🔔 A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]

Animated Text Kit A flutter package which contains a collection of some cool and awesome text animations. Recommended package for text animations in C

Ayush Agarwal 1.4k Jan 6, 2023
This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter for Android and IOS

AwesomeFlutterUI The purpose of this repository is to demonstrate the use of different widgets and tricks in flutter and how to use them in your proje

Subir Chakraborty 132 Nov 13, 2022
This is a Flutter URL preview plugin for Flutter that previews the content of a URL

flutter_link_preview This is a URL preview plugin that previews the content of a URL Language: English | 中文įŽ€äŊ“ Special feature Use multi-processing to

yung 67 Nov 2, 2022
Flutter liquid swipe - Liquid Swipe Animation Built With Flutter

Flutter Liquid Swipe liquid Swipe animation is amazing and its Created for iOS P

Jahongir Anvarov 6 Dec 1, 2022
A candy sorter game made with Flutter for the march flutter challenge.

A candy sorter game made with Flutter for the march flutter challenge.

Debjeet Das 1 Apr 9, 2022
✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

✨ Flutter Spinkit A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit. ?? Installing dependencies:

Jeremiah Ogbomo 2.7k Dec 30, 2022
A Flutter library for gradually painting SVG path objects on canvas (drawing line animation).

drawing_animation From static SVG assets See more examples in the showcasing app. Dynamically created from Path objects which are animated over time m

null 442 Dec 27, 2022
Flutter package for creating awesome animations.

?? Simple Animations Simple Animations is a powerful package to create beautiful custom animations in no time. ?? fully tested ?? well documented ?? e

Felix Blaschke 879 Dec 31, 2022
Fun canvas animations in Flutter based on time and math functions.

funvas Flutter package that allows creating canvas animations based on time and math (mostly trigonometric) functions. The name "funvas" is based on F

null 472 Jan 9, 2023
A flutter package that adds support for vector data based animations.

animated_vector Description and inspiration A package that adds support for vector data based animations. The data format is heavily inspired from the

Potato Open Sauce Project 6 Apr 26, 2022
Flutter UI Challenges

Introduction ?? Zoo is a small, simple and beautiful app that lists 3d model of animals. Before we start, you can take a look at the app: Usage ?? To

Sanjeev Madhav 58 Dec 22, 2022
A Flutter app with flip animation to view profiles of friends. 🌟

Flip View Made with ?? in India This flutter app is based on the design made Dmytro Prudnikov for Yalantis on Dribble.He describes the design as: Just

Shubham Soni 68 Sep 23, 2022
Simple reactive animations in your Flutter apps.

just.motion Flutter package to create organic motion transitions. Why? The Motion Value stateless hot reload status notifier Ease Motion Spring Motion

Roi Peker 49 Nov 14, 2022
Timer UI animation challenge from 'Flutter Animations Masterclass'

stopwatch_flutter An IOS stopwatch challenge from Flutter Animations Masterclass - Full Course What I learned; Use timer Use ticker Create custom shap

Ali Riza Reisoglu 11 Jan 4, 2023
💙 Google Classroom Clone using Flutter, GCP

Introduction ?? Classroom is a Google Classroom clone built using ?? Flutter. Before we start, you can take a look at the app: Screenshots ?? Key Feat

Sanjeev Madhav 20 Dec 14, 2022
Animated Menu in Flutter using radial.

Animated_radial_Menu_in_Flutter Animated Menu in Flutter using radial. Getting Started This project is a starting point for a Flutter application. A f

Habib ullah 4 Jul 18, 2022
Cool 3D Drawer Animated With flutter part 2 đŸ”Ĩ đŸ”Ĩ

Cool 3D Drawer Animated With flutter part 2 ?? ??

Hmida 12 Nov 22, 2022
Hmida 17 Nov 22, 2022
Flutter Animation 🐱‍👤 Made with algeria By DZ-TM071

Flutter Animation ??‍?? Made with algeria By DZ-TM071

Hmida 12 Oct 23, 2022