Giter Site home page Giter Site logo

awesomedialogs's People

Contributors

chenloong83 avatar darkjeff99 avatar iampawan avatar mahdi-abdelkebir avatar marcos930807 avatar myconsciousness avatar outdatedguy avatar pcolbp avatar sachin-dahal avatar ss-carbgem avatar than-de avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesomedialogs's Issues

Crossplatform compatibility

I love awesome_dialog but my concern it should also run in both Material and Cupertino. Can we request a crossplatform compatibility? Thank you! ๐Ÿก

Gif Format of icons

The little icon animations are nice
but it would be great if you could provide them in gif format
because when you are offline they don't work

additionally, I would like to use them elsewhere

and by default, it might also be a good idea to not have them play after being opened
if you convert them into gifs you could use "flutter_gifimage" plugin to have them just play at the start and never again
having them loop can be distracting

thanks for the help beforehand! and once again great work!

Dialog type Notification

Feature request
Please please add support to show notification type dialog with animated bell

NoSuchMethodError: The method 'pop' was called on null. Receiver: null

Hi, thank you for the amazing package :)
I'm getting this error in a lot of users, but I cannot replicate it on my phone. Do you know what it can be?
Non-fatal Exception: java.lang.Exception: NoSuchMethodError: The method 'pop' was called on null. Receiver: null Tried calling: pop() at AwesomeDialog._buildFancyButtonOk.<fn>(awesome_dialog.dart:178) at _AnimatedButtonState.build.<fn>(animated_button.dart:52) at GestureRecognizer.invokeCallback(recognizer.dart:184) at TapGestureRecognizer.handleTapUp(tap.dart:524) at BaseTapGestureRecognizer._checkUp(tap.dart:301) at BaseTapGestureRecognizer.handlePrimaryPointer(tap.dart:219) at PrimaryPointerGestureRecognizer.handleEvent(recognizer.dart:477) at PointerRouter._dispatch(pointer_router.dart:78) at PointerRouter._dispatchEventToRoutes.<fn>(pointer_router.dart:124) at PointerRouter._dispatchEventToRoutes(pointer_router.dart:122) at PointerRouter.route(pointer_router.dart:108) at GestureBinding.handleEvent(binding.dart:220) at GestureBinding.dispatchEvent(binding.dart:200) at GestureBinding._handlePointerEvent(binding.dart:158) at GestureBinding._flushPointerEventQueue(binding.dart:104) at GestureBinding._handlePointerDataPacket(binding.dart:88)

Add custom background color for dialog

Add support for custom background colors of the dialog + circular header part (if used).

If no color provided, just use the Theme's card color as it is already currently in place.

Info dialog type

Info dialog should show "i" icon, instead of exclamation mark "!" like warning dialog

Little X on modal to indicate you can close the dialog that way

I am currently debating switching to this other pop up because of the x thing...
except this implementation isn't great either

https://pub.dev/packages/flutter_beautiful_popup
notice that there is an X below the pop-up
that is great! especially for usability for those not yet used to pop-ups in this way (few I know)
but having to tap the X exactly is annoying
it should just be there as a guide

if you could add this in that would be amazing!

[Suggestion] making btnOkText a Text Widget

I don't know if it is possible but making btnOkText and btnCancelText a "Text Widget" instead of "String" would make it great

I dont want to make myself a button just to change Font family and font color.

I am using awesomeDialogs on my first ever app thanks for making it.

Unable to load assets

Dialog works normally but icons does not shown. I get this error:

Unhandled Exception: Unable to load asset: packages/awesome_dialog/assets/flare/succes_without_loop.flr
#0      PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
<asynchronous suspension>
#1      AssetFlare.load (package:flare_flutter/provider/asset_flare.dart:26:31)
#2      FlareCacheAsset.load (package:flare_flutter/flare_cache_asset.dart:30:19)
#3      Cache.getAsset (package:flare_flutter/cache.dart:58:11)
#4      cachedActor (package:flare_flutter/flare_cache.dart:27:12)
#5      FlareRenderBox.loadFlare (package:flare_flutter/flare_render_box.dart:308:35)
#6      FlareActorRenderObject.coldLoad (package:flare_flutter/flare_actor.dart:410:20)
#7      FlareRenderBox.load (package:flare_flutter/flare_render_box.dart:258:7)
#8      FlareRenderBox.attach (package:flare_flutter/flare_render_box.dart:104:7)
#9      AbstractNode.adoptChild (package:flutter/src/foundation/node.dart:132:13)
#10     RenderObject.adoptChild (package:flutter/src<โ€ฆ>

Flutter Doctor Results

[โœ“] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale en-TR)

[โœ“] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[โœ“] Xcode - develop for iOS and macOS (Xcode 11.5)
[โœ“] Android Studio (version 3.6)
[โœ“] VS Code (version 1.47.1)
[โœ“] Connected device (1 available)

Not refresh the value if date updated

If I use RadioListTile in the body, and when update the value, it does not update on the screen. Looks it is stateless widget. Can you make it possible to refresh value on the screen.

Header gone forever when left app for a while and back (both Android and iOS)

Hi Macro,
It's really awesome package. I very like it.
I found an issue both happen on Android and iOS, real device and simulator. And reproducible on your demo app.

My steps are following but not 100% reproduce it. In 2 hours test, I found 1 time on iPhone 6s device, 1 time on Android 6.0 device and 1 time on Android 10 emulator.

  1. open your demo app
  2. click warning dialog
  3. cancel it
  4. press Home button
  5. press Power button
  6. stay for while (10 min, 30 min not sure ...)
  7. press Power button to resume device
  8. reopen demo app
  9. click warning dialog
    => the dialog show without header warning icon

It's not easily reproduced by the procedures above. In my experience, the failed rate is around 10%. However indeed.

BIG PROBLEM: animations sometimes not playing

I have no idea why... but sometimes the animations just wont play
usually its right after I unplug the cord and am no longer using the phone to debug
I have to close it
then open it again and then it begins working as expected
this is ofcourse a big problem if I'm trying to use this for production

Icon pop-up timing

Hi Sir,
May I know whether the icon can be pop-up earlier? When dialog appear, it's no icon until a second. I would hope I can adjust it's around a half second or shorter. Is it possible?

Feature Request: Make AnimatedButton.buttonTextStyle configurable in AwesomeDialog constructor

Morning!

I'd love being able to set the TextStyle of buttons. So far we have the text itself, the icon and the button color in the AwesomeDialog constructor. But I've noticed that the AnimatedButton class takes a TextStyle property and it would be awesome if we could define that in the AwesomeDialog constructor for both buttons.

Currently I need to create a full AnimatedButton by msyself which is somewhat semi-optimal and it could be so much easier.

What do you say? :)

btnOkOnPress function close and show black screen

                                 AwesomeDialog(
                                      context: context,
                                      dialogType: DialogType.ERROR,
                                      animType: AnimType.RIGHSLIDE,
                                      headerAnimationLoop: false,
                                      tittle: 'Login Error',
                                      desc:
                                          'The phone number and password do not correspond, please check and try again.',
                                      btnOkOnPress: () {
                                        Navigator.of(context,
                                                rootNavigator: true)
                                            .pop();
                                      },
                                      btnOkColor: Colors.red,
                                    ).show();

How to rebuild body of dialog ?

It's possible to rebuild body of dialog, if yes how can I do that ?? because seState({}); doesn't work with me. please help.

Getting error on btnOkOnPress and btnCancelOnPress:

getting error on click btnOkOnPress and
btnCancelOnPress:

โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by gesture โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
The following StateError was thrown while handling a gesture:
Bad state: Future already completed

When the exception was thrown, this was the stack:
#1 Route.didComplete (package:flutter/src/widgets/navigator.dart:208:19)
#2 Route.didPop (package:flutter/src/widgets/navigator.dart:196:5)
#3 OverlayRoute.didPop (package:flutter/src/widgets/routes.dart:62:36)
#4 TransitionRoute.didPop (package:flutter/src/widgets/routes.dart:218:18)
#5 LocalHistoryRoute.didPop (package:flutter/src/widgets/routes.dart:552:18)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#59e0d
debugOwner: GestureDetector
state: possible
won arena
finalPosition: Offset(133.0, 455.5)
finalLocalPosition: Offset(68.0, 28.0)
button: 1
sent tap down

Add 'Custom' AnimType

For the sake of customisability, it would be greate if I could pass my own animation into AwesomeDialog. That would also allow me to set my own curve, etc.

width

The method 'toDouble'
was called on null.Receiver: null
Tried calling: toDouble()

Error to call dissmiss() method

Hello, can someone help me, I am trying to use the onDissmissCallBack parameter but I am getting an error. This is my code.

AwesomeDialog awesomeDialog;

AwesomeDialog(context: context,
dialogType: DialogType.INFO,
animType: AnimType.BOTTOMSLIDE,
tittle: 'Dialog Title',
useRootNavigator: true,
desc: 'Dialog description here',
dismissOnTouchOutside: false,
onDissmissCallback: (){
debugPrint('Dialog Dissmiss from callback');
awesomeDialog.dissmiss();
},
btnCancelOnPress: () {},
btnOkOnPress: () {}).show();

And this is the error that I get

I/flutter (30505): Dialog Dissmiss from callback
E/flutter (30505): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The method 'dissmiss' was called on null.
E/flutter (30505): Receiver: null
E/flutter (30505): Tried calling: dissmiss()
E/flutter (30505): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
E/flutter (30505): #1 _UpdatePasswordState._onChangePassword.
package:alerta_acapulco_app/โ€ฆ/settings/update_password_page.dart:177
E/flutter (30505): #2 AwesomeDialog.show.
package:awesome_dialog/awesome_dialog.dart:95
E/flutter (30505): #3 _rootRunUnary (dart:async/zone.dart:1155:38)
E/flutter (30505): #4 _CustomZone.runUnary (dart:async/zone.dart:1048:19)
E/flutter (30505): #5 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
E/flutter (30505): #6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
E/flutter (30505): #7 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
E/flutter (30505): #8 Future._completeWithValue (dart:async/future_impl.dart:526:5)
E/flutter (30505): #9 Future._asyncComplete. (dart:async/future_impl.dart:556:7)
E/flutter (30505): #10 _rootRun (dart:async/zone.dart:1147:13)
E/flutter (30505): #11 _CustomZone.run (dart:async/zone.dart:1040:19)
E/flutter (30505): #12 _CustomZone.runGuarded (dart:async/zone.dart:942:7)
E/flutter (30505): #13 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:982:23)
E/flutter (30505): #14 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
E/flutter (30505): #15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)

Thank you

Dialog width expanded on flutter web

How can I prevent dialog expending on flutter web?

awesome_dialog

Doctor summary :

[โˆš] Flutter (Channel master, 1.20.0-2.0.pre, on Microsoft Windows [Version 10.0.18363.900], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[โˆš] Chrome - develop for the web
[!] Android Studio (version 4.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[โˆš] VS Code (version 1.46.1)
[โˆš] Connected device (3 available)

DialogType Question Mark

I want use your dialog for a mini survey but dialogType have no question mark. Does it take long to add?

theme parameter

right now I'm having to do some very annoying stuff because my modals and the rest of my app have a different theme
my app is dark mode
but I still want my modals to be light since its hard to tell that a dark pop up is a pop-up cuz the scrim is still dark

Dialog width doesn't change

Hello.

I'm struggling to change the width of a dialog, trying to provide both MediaQuery.of(context).size.width and a static value.

Tested on iOS emulator and an Android 10 device.

Thanks in advance

Use AwesomeDialog with WillPopScope to confirm app exit

This is how I did it with standard AlertDialog:


return WillPopScope(
      onWillPop: _promptExit,
      child: Container() /*Remaining window layout*/

Future<bool> _promptExit {

return showDialog(
      context: context,
      builder: (context) => new AlertDialog(
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20.0))),
        title: new Text(Strings.prompt_exit_title),
        content: new Text(Strings.prompt_exit_content),
        actions: <Widget>[
          FlatButton(
            child: new Text(Strings.no),
            onPressed: () => Navigator.of(context).pop(false),
          ),
          SizedBox(height: 16),
          FlatButton(
            child: new Text(Strings.yes),
            onPressed: () => Navigator.of(context).pop(true),
          ),
        ],
      ),
    ) ??
        false;

}

How to do that with AwesomeDialog? I can;t see any way to put it into showDialog. Any advice?

Awesome Dialog is now Perfect

Hi Marco,
Just want to say thank you for this widget, AwesomeDialog now performs awesome, all the bells and whistles are now functioning awesome! Thank you!! :)

add enable and disable buttons options for Ok and Cancel btn - improvements

Hi,
I would like to thank you for your package and would like to ask if it is possible to include the option of enable and disable for the buttons?
I would like to enable and disable the buttons under some conditions.
For example, after clicking on a checkbox agreeing to the terms, the Ok button would be enabled.

determining whether dialog was dismissed via cancel or ok

Currently the only way to determine if the AwesomeDialog instance was dismissed because of ok button press is by keeping a state in the presenting widget and referring it to onDissmissCallback. It will be great if onDismissCallback can supply the close path of the dialog, maybe as an enum value.

How do i dismiss the dialog

Everytime i press the buttons to naviagate to another page the dialog is not dismissed

showDialog: () {
AwesomeDialog(
context: context,
dialogType: DialogType.NO_HEADER,
animType: AnimType.TOPSLIDE,
title: 'Release Music',
desc: 'Release a new single or a new album',
btnCancelOnPress: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => NewSingleView(),
),
);
},
body: Column(
children: [
Text(
'Release Music',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 25,
color: Colors.black),
),
SizedBox(
height: 10,
),
Text(
'Release a new single or a new album',
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500),
)
],
),
btnOkText: 'New Single',
// btnOk: FlatButton(
// shape: RoundedRectangleBorder(
// borderRadius:
// BorderRadius.circular(10.0)),
// color: Colors.blue,
// onPressed: () {
// Navigator.pop(context);
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => NewSingleView(),
// ),
// );
// },
// child: Text('New Single'),
// ),
// btnCancel: FlatButton(
// shape: RoundedRectangleBorder(
// borderRadius:
// BorderRadius.circular(10.0)),
// color: Colors.blue,
// onPressed: () {
// // Navigator.of(context)?.pop();
//
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => AddAlbumView(
// currentArtist: model.currentArtist,
// ),
// ),
// );
// },
// child: Text('New Album'),
// ),
btnCancelColor: Colors.blue,
btnOkColor: Colors.blue,
btnCancelText: 'New Album',
btnOkOnPress: () {
debug(
title: 'New album pressed',
className: className);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddAlbumView(
currentArtist: model.currentArtist,
),
),
);
},
)..show();
},

single OK button get a sizebox on left

btnCancel != null ? Expanded( child: btnCancel ?? Container(), ) : Container(), SizedBox( width: 10, ), btnOk != null ? Expanded( child: btnOk, ) : Container(),
thanks for you awesome work! ๐Ÿ‘
there has a little suggestion:
when there is only a single button, the sizedbox should be invisible

Text of the buttons is not centered

Hi, i use this plugin with ok and cancel buttons. But text of ok and cancel button is not centered. Shifted a little to the right. It appears in the image on the link. Please fix it, thank you, best regards.

https://hizliresim.com/jaIrEr

Is it possible to refresh dialog content while it is shown ?

Hello,

I am using the Dialog with a custom body, to display a counter of quantity (text & buttons).
My problem is that the text widget is not update dynamically while the dialog is shown.
Do you have an idea how I can handle it?

Many thanks,
Benjamin
AlertDialog

dialogType: DialogType.NO_HEADER giving error

hi,

I am using the following code which i copied from your code.
AwesomeDialog(
context: context,
headerAnimationLoop: false,
dialogType: DialogType.NO_HEADER,
tittle: 'No Header',
desc:
'Dialog description here..................................................',
btnOkOnPress: () {
debugPrint('OnClcik');
},
btnOkIcon: Icons.check_circle,
)..show();

i get an error in android studio on dialogType: DialogType.NO_HEADER that reads:
There is no constant named 'NO_HEADER' in dialogType

how can i turn off the hearder image?

Error: The getter 'headline6' isn't defined for the class 'TextTheme'

The error message when trying to run the project :

Compiler message:
../../../flutter-sdk/flutter/.pub-cache/hosted/pub.dartlang.org/awesome_dialog-1.1.0/lib/src/vertical_stack_header_dialog.dart:60:66: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.

  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../../flutter-sdk/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
    style: Theme.of(context).textTheme.headline6,
    ^^^^^^^^^
    Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
    build failed.

Package version :
awesome_dialog: ^1.1.0

Documentation Suggestion for dismissing dialog.

I found your dialog today and overall very happy with it!

But one thing that might help others who are new to this library.

I wanted to be able to "dismiss" the dialog from a button in my body in the same way it does when you click the background.

Maybe my understanding of Root Navigator is a little lacking, but when I called dissmiss() from my button it would change the "page" I was on and NOT remove the dialog from the screen.

After digging around and "guessing" I set useRootNavigator = true and then the dissmiss() method behaved as I would expect. I'm not real clear how having a dismiss method that does not actually remove the dialog is helpful, but I think the documentation needs to be made more clear as to the meaning of useRootNavigator. Possibly true needs to be the default?

Now it is entirely possible that I'm missing something here. But in my setup it was the only way I could seem to remove the dialog?

Why AwesomeDialog is not a Widget?

I'm trying to use your package together with Get, but for it to show a dialog (with Get.dialog) it needs to be a Widget. So, is there a reason you chose to not make AwesomeDialog a widget?

Set max width of the dialog box

Is it possible to set the maximum width of the dialog box?
When running on FlutterWeb on a normal computer screen the dialog is very large.

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.