A Flutter package for a quick and handy giffy dialog.

Overview

👏 Giffy Dialogs

Say Thanks! Twitter

A beautiful and custom alert dialog for flutter highly inspired from FancyAlertDialog-Android.

The source code is 100% Dart, and everything resides in the /lib folder.

Show some ❤️ and star the repo to support the project

GitHub stars GitHub forks GitHub watchers GitHub followers
Twitter Follow

Open Source Love License Build Status CodeCov

💻 Installation

In the dependencies: section of your pubspec.yaml, add the following line:

Version

dependencies:
  giffy_dialog: <latest version>

Usage

Import this class

import 'package:giffy_dialog/giffy_dialog.dart';

Network giffy dialog

Network

onPressed: () {
  showDialog(
  context: context,builder: (_) => NetworkGiffyDialog(
    imageUrl:"https://raw.githubusercontent.com/Shashank02051997/
              FancyGifDialog-Android/master/GIF's/gif14.gif",
    title: Text('Granny Eating Chocolate',
            textAlign: TextAlign.center,
            style: TextStyle(
            fontSize: 22.0,
            fontWeight: FontWeight.w600)),
    description:Text('This is a granny eating chocolate dialog box.
          This library helps you easily create fancy giffy dialog',
          textAlign: TextAlign.center,
        ),
    entryAnimation: EntryAnimation.BOTTOM_TOP,
    onOkButtonPressed: () {},
  ) );
}

Flare giffy dialog

Flare

onPressed: () {
  showDialog(
  context: context,builder: (_) => FlareGiffyDialog(
    flarePath: 'assets/space_demo.flr',
    flareAnimation: 'loading',
    title: Text('Space Reloading',
           style: TextStyle(
           fontSize: 22.0, fontWeight: FontWeight.w600),
    ),
    description: Text('This is a space reloading dialog box.
          This library helps you easily create fancy flare dialog.',
          textAlign: TextAlign.center,
          style: TextStyle(),
        ),
    entryAnimation: EntryAnimation.DEFAULT,
    onOkButtonPressed: () {},
  ) );
}

Asset giffy dialog

Asset

onPressed: () {
  showDialog(
  context: context,builder: (_) => AssetGiffyDialog(
    imagePath: 'assets/men_wearing_jacket.gif',
    title: Text('Men Wearing Jackets',
            style: TextStyle(
            fontSize: 22.0, fontWeight: FontWeight.w600),
    ),
    description: Text('This is a men wearing jackets dialog box.
          This library helps you easily create fancy giffy dialog.',
          textAlign: TextAlign.center,
          style: TextStyle(),
        ),
    entryAnimation: EntryAnimation.RIGHT_LEFT,
    onOkButtonPressed: () {},
  ) );
}

👍 How to Contribute

If you are interested in contributing to the project, please read Contributing guide and let us know!

Contributors

Thanks goes to these wonderful people (emoji key):


ArtemKolichenkov

📖 🤔

Alex Fierro

💻

Kasidech C.

💻

Jai Sachdeva

💬

Tarekk Mohamed Abdalla

💻

madhukesh_048

⚠️

dpedrinha

💻

Nate

💻 💡

Alex

💻

jritchie

💻

Saad Bin Shahid

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

📃 License

Copyright (c) 2019 Sahil Kumar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Comments
  • Default Title & Description & Image

    Default Title & Description & Image

    Should there be default Title and Description?
    I get that it sounds a bit weird at first but consider following situations where title can be empty:

    • Some dynamically generated dialogs where this could easily happen.
    • In case of mistake - if something goes wrong it is much better to display neutral title (or empty string) rahter than red screen of death.
    • Maybe somebody wants weird dialog box without any text - just some kind of image/animation

    Also the case of null image could be handled better. Displaying nothing or some placeholder is better than crashing people's apps.

    opened by ArtemKolichenkov 4
  • How cancel button dismisses the dialog?

    How cancel button dismisses the dialog?

    I use 'Navigator.of(context).pop();' once I get '200' statusCode from the server and immediately show the giffy dialog.

    and I have another pop() in the dialog as follow:

    onOkButtonPressed: () {
                Navigator.of(context).pop();
              },
    

    when I press OK, I get the following error:

    I/flutter (14881): Another exception was thrown: Instance of 'DiagnosticsProperty'

    am guessing because the screen with the 'context' was already gone, however, when I press cancel, the dialog get dismissed, just how I want it to happen.

    my question is, how can I dismiss the dialog when OK is pressed just like the Cancel button?

    opened by Ziyad33 3
  • Documentation

    Documentation

    Closes #31

    First commit Upgrads SDK to 28

    Example app didn't even start on my emulator/device. Since AndroidX been up for 3 months already its time to upgrade SDK to 28 and enable jetifier.

    New flutter version also enables R8 automatically.

    Other commits

    Basicaly added bunch of doc comments for pub.dev API Reference, modified CONTRIBUTING.md, etc.

    Feel free to suggest edits.

    opened by ArtemKolichenkov 3
  • Create pubspec(updated).yaml

    Create pubspec(updated).yaml

    name: giffy_dialog description: A Flutter package for a quick, handy and beautiful giffy dialog. version: 1.5.0 author: Sahil Kumar [email protected] homepage: https://github.com/xsahil03x/giffy_dialog

    environment: sdk: ">=2.2.2 <3.0.0"

    dependencies: flutter: sdk: flutter flare_flutter:

    dev_dependencies: flutter_test: sdk: flutter image_test_utils: ^1.0.0

    flutter:

    opened by Gandharvdalal 3
  • add entry animation variations

    add entry animation variations

    From previous #35, I added only the modified files. I am new for PR, but I will try my best. 😉

    enum EntryAnimation {
      DEFAULT, // Center
      LEFT,
      RIGHT,
      TOP,
      BOTTOM,
      TOP_LEFT,
      TOP_RIGHT,
      BOTTOM_LEFT,
      BOTTOM_RIGHT,
    }
    

    Screenshot: https://gph.is/g/a9Wyvzb

    opened by Kawaeee 3
  • Additional entry animations

    Additional entry animations

    from #32 I add more variation of entry animations. 😉

    enum EntryAnimation {
      DEFAULT, // Center
      LEFT,
      RIGHT,
      TOP,
      BOTTOM,
      TOP_LEFT,
      TOP_RIGHT,
      BOTTOM_LEFT,
      BOTTOM_RIGHT,
    }
    

    Screenshot: https://gph.is/g/a9Wyvzb

    opened by Kawaeee 3
  • Add widget test for portrait mode.

    Add widget test for portrait mode.

    Fix #28

    • [x] - NetworkGiffyDialog test (Portrait mode)
    • [x] - AssetGiffyDialog test (Portrait mode)
    • [x] - FlareGiffyDialog test (Portrait mode)
    • [x] - Test for covering all the possible assertions.
    opened by xsahil03x 3
  • Compatibility with Flutter 1.5 and Dart 2.2.0

    Compatibility with Flutter 1.5 and Dart 2.2.0

    `file:///Users/USER/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.5.0/lib/flare.dart:1028:18: Error: The argument type 'Int32List' can't be assigned to the parameter type 'Uint16List'.

    • 'Int32List' is from 'dart:typed_data'.
    • 'Uint16List' is from 'dart:typed_data'. Try changing the type of the parameter, or casting the argument to 'Uint16List'. indices: _indices, textureCoordinates: _uvBuffer);`
    hacktoberfest 
    opened by abd3llatif 3
  • cross-reference

    cross-reference

    Because every version of giffy_dialog depends on cached_network_image ^0.5.1 which depends on flutter_cache_manager ^0.2.0+1, every version of giffy_dialog requires flutter_cache_manager ^0.2.0+1. And because flutter_cache_manager >=0.1.0-rc.1 <0.3.0-alpha depends on shared_preferences ^0.4.0, every version of giffy_dialog requires shared_preferences ^0.4.0. So, because mobile_driver_app depends on both giffy_dialog ^1.2.0 and shared_preferences ^0.5.1+1, version solving failed.

    I think the best way is not depend on any network plugin

    enhancement 
    opened by natezhengbne 3
  • AssetGiffyDialog() widget doesn't have any property named 'imagePath'

    AssetGiffyDialog() widget doesn't have any property named 'imagePath'

    The AssetGiffyDialog() widget doesn't take any 'imagePath' property. It rather takes the property with the name 'image' and then the image can be passed using Image.asset()

    It was not updated in the README.

    opened by AryanSethi 2
  • Dialog without a button and will be dismiss programmatically

    Dialog without a button and will be dismiss programmatically

    Hello,

    I am a newbie. I have already a working code of a buttonless dialog and dismisses programmatically. Until I found this awesome package and I want to replace the dialog with giffy. How could I make a buttonless dialog and make this a function so I can just call in the future builder.

    Below is my code for the dialog; showAlertDialog(BuildContext context) { AlertDialog alert = AlertDialog( title: Text("Slow Internet Connection!"), content: Text("Your internet speed connection is too slow. " "Switch to Airplane mode to continue making transaction." ), );

    showDialog(
      barrierDismissible: false,
      context: context,
      builder: (BuildContext context) {
        return alert;
      },
    );
    

    }`

    And I can call this in the builder widget and dismiss using Navigator.of(context).pop(); on some condition.

    How could I implement this using giffy_dialog. Thanks in advance.

    opened by annagat 2
  • Upgrade Flutter v2.5

    Upgrade Flutter v2.5

    Hi, I am trying to upgrade to the latest version in flutter and got this error.

    Because flare_loading 3.0.0 depends on flare_flutter ^3.0.0 and no versions of flare_loading match >3.0.0 <4.0.0, flare_loading ^3.0.0 requires flare_flutter ^3.0.0. And because giffy_dialog >=1.8.0 depends on flare_flutter ^2.0.5, giffy_dialog >=1.8.0 is incompatible with flare_loading ^3.0.0. And because flare_splash_screen 4.0.0 depends on flare_loading ^3.0.0 and no versions of flare_splash_screen match >4.0.0 <5.0.0, giffy_dialog >=1.8.0 is incompatible with flare_splash_screen ^4.0.0. So, because accetera depends on both flare_splash_screen ^4.0.0 and giffy_dialog ^1.8.0, version solving failed. pub get failed (1; So, because accetera depends on both flare_splash_screen ^4.0.0 and giffy_dialog ^1.8.0, version solving failed.)

    opened by ZoroRoronoaX 0
  • fixed broken imagePath property in asset and network giffy dialogs

    fixed broken imagePath property in asset and network giffy dialogs

    The Problem

    The problem is in connection to an un-updated part of the document specifically the imagePath property in NetworkGifyDialog and AssetGiffyDialog property.

    The Solution

    Reading the source code reveals that the imagePath property has been replaced with image which is of type Image widget class.

    NetworkGiffyDialog now uses Image widget against the new image property

    onPressed: () {
      showDialog(
      context: context,builder: (_) => NetworkGiffyDialog(
        image: Image.asset("https://raw.githubusercontent.com/Shashank02051997/FancyGifDialog-Android/master/GIF's/gif14.gif"),
        title: Text('Granny Eating Chocolate',
                textAlign: TextAlign.center,
                style: TextStyle(
                fontSize: 22.0,
                fontWeight: FontWeight.w600)),
        description:Text('This is a granny eating chocolate dialog box.
              This library helps you easily create fancy giffy dialog',
              textAlign: TextAlign.center,
            ),
        entryAnimation: EntryAnimation.BOTTOM_TOP,
        onOkButtonPressed: () {},
      ) );
    }
    

    AssetGiffyDialog now uses Image widget against the new image property

    onPressed: () {
      showDialog(
      context: context,builder: (_) => AssetGiffyDialog(
        image: Image.asset('assets/men_wearing_jacket.gif'),
        title: Text('Men Wearing Jackets',
                style: TextStyle(
                fontSize: 22.0, fontWeight: FontWeight.w600),
        ),
        description: Text('This is a men wearing jackets dialog box.
              This library helps you easily create fancy giffy dialog.',
              textAlign: TextAlign.center,
              style: TextStyle(),
            ),
        entryAnimation: EntryAnimation.RIGHT_LEFT,
        onOkButtonPressed: () {},
      ) );
    }
    
    opened by danqulogy 0
  • Support null safety

    Support null safety

    This PR aims to support null safety feature and aims to fix #74. Following changes are made:

    1. Support linux desktop support
    2. Migrate project to support null safety
    3. Remove assertion test cases

    Please note that one needs to use --no-sound-null-safety flag when running flutter run as flutter_flare doesn't support null safety

    opened by apgapg 0
Owner
Sahil Kumar
Flutter Engineer at @GetStream
Sahil Kumar
A new Flutter dialog with a series of beautiful animations, slide fade rotate size scale rotate3D animations.

flutter_animated_dialog A new Flutter dialog with a series of beautiful animations, slide fade rotate size scale rotate3D animations. Dialog barrier i

null 20 Dec 3, 2022
🔔 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
Dart package that converts number to words (English language)A Flutter/Dart package that converts number to words (English language)

flutter_number_to_words_english A Flutter/Dart package that converts number to words (English language) Flutter (Null Safety) Flutter (Channel stable,

Ke Nguyen 4 Dec 9, 2022
A flutter package which contains a collection of some cool and beautiful effects; support android and ios

flutter effects A flutter package which contains a collection of some cool and beautiful effects; support android and ios . Screenshot type support ch

大海豚 462 Jan 3, 2023
A package to create nice and smooth animations for flutter

animation_director A package to create nice and smooth animations for flutter Introduction A simple package to build beautiful and smooth animations f

null 10 Nov 28, 2022
A flutter package which will help you to generate pin code fields with beautiful design and animations

A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs ?? ??

Adar 550 Dec 23, 2022
A Flutter package to custom splash screen like change logo icon, logo animation, and splash screen background color.

Custom Splash Screen A Flutter package to custom splash screen: change logo icon, logo animation, and splash screen background color. (Custom from ani

tranhuycong 78 Sep 6, 2022
Convert text to paths and animate them with this Flutter package

Text to Path Maker This is a pure Flutter and Dart package that allows you to convert text--both characters and icons--into paths. It can generate SVG

Ashraff Hathibelagal 81 Sep 23, 2022
This package helps you daily usable function and ready-made Widgets with ease.

Show some love and like to support the project Documentation API Docs are available. Platform Support Android iOS MacOS Web Linux Windows ✔️ ✔️ ✔️ ✔️

Bhoomin Naik 51 Dec 23, 2022
Change Application's name, package name, icon and Splash in one shot by one Command on Android & IOS

Change Application's name, package name, icon and Splash in one shot by one Command on Android & IOS. Installing dart pub global activate before_publi

null 10 Oct 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
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
A flutter package which makes it easier to display the difference between two images.

?? Before After A flutter package which makes it easier to display the differences between two images.. The source code is 100% Dart, and everything r

Sahil Kumar 741 Dec 30, 2022
A Flutter Package providing Avatar Glow Widget

Avatar Glow This Flutter package provides a Avatar Glow Widget with cool background glowing animation. Live Demo: https://apgapg.github.io/avatar_glow

Ayush P Gupta 250 Dec 22, 2022
A Flutter package with a selection of simple yet very customizable set of loading animations.

Flutter Loading Animations A simple yet very customizable set of loading animations for Flutter projects. Installation Add the following to your pubsp

Andre Cytryn 171 Sep 23, 2022
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.

Motion Tab Bar A beautiful animated widget for your Flutter apps Preview: | | Getting Started Add the plugin: dependencies: motion_tab_bar: ^0.1.5 B

Rezaul Islam 237 Nov 15, 2022
Animation package for Flutter, inspired by Animate.css

animator Enables you to create stunning flutter animations, faster, efficient and with less code. Null safety: For null safety please use flutter_anim

Sjoerd van Den Berg 136 Dec 6, 2022
☀️ A Flutter package for some material design app intro screens with some cool animations.

IntroViews is inspired by Paper Onboarding and developed with love from scratch. Checkout our fully responsive live example app. Table of contents Fea

Ayush Agarwal 652 Dec 30, 2022
A light weight package for flutter apps, that easily shows a splash screen with a nice fade animation.

Animated Splash Screen Using the package Get the library environment: sdk: ">=2.1.0 <3.0.0" Add dependency in pubspec.yaml dependencies: animated_

Mohammad Fayaz 112 Oct 6, 2022