marcos930807 / awesomedialogs Goto Github PK
View Code? Open in Web Editor NEWA new Flutter package project for simple a awesome dialogs
License: Other
A new Flutter package project for simple a awesome dialogs
License: Other
Is there a way to set the fontSize of the btnOkText and btnCancelText .
I love awesome_dialog but my concern it should also run in both Material and Cupertino. Can we request a crossplatform compatibility? Thank you! ๐ก
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!
Feature request
Please please add support to show notification type dialog with animated bell
As I said at this issues title, How do I scroll dialog which use TextField in body property when Keyboard showed?
I'm trying to use TextField in a body property.
I focus TextField input area, Keyboard is showed up, the dialog is being under the keyboard.
Thank you:)
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 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 should show "i" icon, instead of exclamation mark "!" like warning dialog
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!
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.
As a developer, I would like to be able to change colors of the animated icons for success, warning, info, danger, etc.
For example, dark green for success, orange for danger, black for warning, etc. (just to mention some possibilities)
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)
I am trying to update a widget inside AwesomeDialog using setState but only the main widget tree gets updated. Is there a way to make AwesomeDialog stateful as well?
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.
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.
It's not easily reproduced by the procedures above. In my experience, the failed rate is around 10%. However indeed.
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
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?
Hi marcos,
I would like to ask you how can I hide dialog automatically for timed out (i.e 3 seconds from dialog appear).
Thank you very much.
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? :)
if we could have a feature like this it would be great (:
i need one asap
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();
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 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
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.
The method 'toDouble'
was called on null.Receiver: null
Tried calling: toDouble()
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
How can I prevent dialog expending on flutter web?
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)
Implements a WillPopScope to block of dissmiss the dialog to keypress back hardware
I want use your dialog for a mini survey but dialogType have no question mark. Does it take long to add?
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
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
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?
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!! :)
I find that the header animation took a few seconds to load when AwesomeDialog was called for the first time.
Will appear immediately in subsequential calls.
Can you add dynamic color to DialogTypes ?
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.
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.
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();
},
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
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
Calling it in initState or before build causes black screen background.
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?
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'.
Package version :
awesome_dialog: ^1.1.0
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?
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?
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.
this would be great
worst case some can simply add their own bottom spacing
being able to control padding, in general, would be nice honestly
should be a simple addition
thanks beforehand!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.