GithubHelp home page GithubHelp logo

apphubkh / flutter_cool_alert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emrade/flutter_cool_alert

0.0 0.0 0.0 1.29 MB

A flutter package to display animated dialods

Home Page: https://pub.dev/packages/cool_alert

License: MIT License

Kotlin 0.56% Swift 1.66% Objective-C 0.16% Dart 92.06% Ruby 5.57%

flutter_cool_alert's Introduction

cool_alert

A Flutter package to display animated alert dialogs

Usage

To use this package, add cool_alert as a dependency in your pubspec.yaml file. And add this import to your file.

import 'package:cool_alert/cool_alert.dart';

Image

Screenshot  Gif

Example

CoolAlert.show(
   context: context,
   type: CoolAlertType.success,
   text: "Your transaction was successful!",
);

CoolAlert Class

Attribute Data type Description Default Value
context BuildContext @required Null
type CoolAlertType @required - Type of alert dialog, ex: CoolAlertType.success for success dialogs Null
title String Set a custom title for dialog Based on the CoolAlertType selected
text String Set the description text of the dialog. Null
widget Widget Set any you expect widget of the dialog. Null
confirmBtnText String Text of confirm button 'Ok'
confirmBtnTap Function Function that handle click of confirm button () => Navigator.pop(context)
confirmBtnColor Color Color of confirm Button Theme.of(context).primaryColor
cancelBtnText String Text of cancel button 'Cancel'
cancelBtnTap Function Function that handle click of cancel button () => Navigator.pop(context)
barrierDismissible bool Dismiss dialog on touch overlay true
animType CoolAlertAnimType Type of dialogue enter animation CoolAlertAnimType.scale
backgroundColor Color Background color of the animation Color(0xFF515C6F)
confirmBtnTextStyle TextStyle Confirm button text theme TextStyle(color: Colors.white, fontWeight:FontWeight.w600,fontSize: 18.0)
cancelBtnTextStyle TextStyle Cancel button text theme TextStyle(color: Colors.grey, fontWeight:FontWeight.w600,fontSize: 18.0)
flareAsset String Custom flare asset "animation.flr"
flareAnimationName String The name of the flare animation to play "play"
lottieAsset String Custom lottie asset "animation.json"
autoCloseDuration Duration Determines how long the dialog stays open for before closing Null
width double Dialog width MediaQuery.of(context).size.width
loopAnimation boolean Determines if the animation should loop or not false

flutter_cool_alert's People

Contributors

emrade avatar loocor avatar juancki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.