xsahil03x / giffy_dialog Goto Github PK
View Code? Open in Web Editor NEWA Flutter package for a quick and handy giffy dialog.
Home Page: https://pub.dartlang.org/packages/giffy_dialog
License: MIT License
A Flutter package for a quick and handy giffy dialog.
Home Page: https://pub.dartlang.org/packages/giffy_dialog
License: MIT License
At first, we should only focus on 4 main entry animations.
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
I have used the NetworkGiffyDialog
Widget
I have tried to add customized options using children inside the widget like this:
children: <Widget>[
SimpleDialogOption(
onPressed: () {
Navigator.pop(context, "1");
},
child: const Text('Option ONE : 1'),
),
SimpleDialogOption(
onPressed: () {
Navigator.pop(context, "2");
},
child: const Text('Option ONE : 1'),
),
],
but it appears that the widget doesn't support the children property, Is there a way to add other options rather than only "ok" and "cancel"?
What do you think about making title
not a mandatory parameter? When title is not provided it won't be shown on the widget, the reason for that is that sometime image could explain everything.
Is your feature request related to a problem? Please describe.
Hi Since Lottie version 3.0.0 introduce renderCache
. Any change introduce new version of lottie in giffy dialog?
Describe the solution you'd like
introduct new version of lottie and support parameters maybe.
Describe alternatives you've considered
none
Additional context
none
Appreciate this awesome package.
I can do this.
current NetworkGiffyDialog implementation allows:
final Text title;
final Text description;
can these be modified to support
var text = new RichText( text: new TextSpan( // Note: Styles for TextSpans must be explicitly defined. // Child text spans will inherit styles from parent style: new TextStyle( fontSize: 14.0, color: Colors.black, ), children: <TextSpan>[ new TextSpan(text: 'Hello'), new TextSpan(text: 'World', style: new TextStyle(fontWeight: FontWeight.bold)), ], ), );
Hi, is Null safety migration on roadmap?
Thanks
`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'.
Description only supports text widget. It would be great if the description can also support general Widget.
Hey All
is there a way the parameters:
final Text title;
final Text description;
Are not burn as Text, and can be of the type widget?
so, we can have more flexibility?
Thanks,
I don't have the experience to develop great animations is their a list of free animations available anywhere?
When the screen is in portrait mode, we get an error message of overflowing bottom pixels. This happens even in the sample app available.
Add a contributors table in Readme to thank all the awesome contributors of this awesome project.
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?
In order to increase the codecov report, we need to cover all the possible test cases.
At this point the state of the widget's element tree is no longer stable. To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling inheritFromWidgetOfExactType() in the widget's didChangeDependencies() method.
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:
Also the case of null image could be handled better. Displaying nothing or some placeholder is better than crashing people's apps.
Material You (Material v3) has deprecated RaisedButton
in favour of ElevatedButton
I am getting build errors due to the use of deprecated RaisedButton
/home/ashu/.pub-cache/hosted/pub.dev/giffy_dialog-1.8.0/lib/src/base_dialog.dart:203:13: Error: The method 'RaisedButton' isn't defined for the class '_BaseGiffyDialogState'.
- '_BaseGiffyDialogState' is from 'package:giffy_dialog/src/base_dialog.dart' ('/home/ashu/.pub-cache/hosted/pub.dev/giffy_dialog-1.8.0/lib/src/base_dialog.dart').
package:giffy_dialog/src/base_dialog.dart:1
Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
RaisedButton(
^^^^^^^^^^^^
/home/ashu/.pub-cache/hosted/pub.dev/giffy_dialog-1.8.0/lib/src/base_dialog.dart:217:13: Error: The method 'RaisedButton' isn't defined for the class '_BaseGiffyDialogState'.
- '_BaseGiffyDialogState' is from 'package:giffy_dialog/src/base_dialog.dart' ('/home/ashu/.pub-cache/hosted/pub.dev/giffy_dialog-1.8.0/lib/src/base_dialog.dart').
package:giffy_dialog/src/base_dialog.dart:1
Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
RaisedButton(
^^^^^^^^^^^^
AssetGiffyDialog
and NetworkGiffyDialog
are exactly the same.
The only difference is that NetworkGiffyDialog
accepts any Widget
as image
prop, while AssetGiffyDialog
accepts only Image
.
Perhaps it could be simplified somehow, e.g. one ImageGiffyDialog
widget that can accept both Image.asset
and Image.network
. Actually, they return same type - Image
, so it can be already done without any changes to logic.
One other option is make different constructors like ImageGiffyDialog.asset()
and ImageGiffyDialog.network()
. Although I don't think it is necessary at this point since Flutter's Image
is handling all the asset vs network logic already.
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.
It will be awesome if we have the option to use this without an image.
How can you customize the button...
e.g
change the name,
position the button vertically
Add new button
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.)
showDialog(
context: context,
builder: (_) => AssetGiffyDialog(
image: Image.asset(
'assets/notification.gif',
fit: BoxFit.cover,
),
title: Text(
'Notification Created',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
),
entryAnimation: EntryAnimation.DEFAULT,
description: Text(
'We will be notifyig you sooner. Please be on touch.',
textAlign: TextAlign.center,
style: TextStyle(),
),
onlyOkButton: true,
onOkButtonPressed: () => Navigator.of(context).pop(),
));
This will navigate to previous page instead of dismissing dialog.
TextAlign for title text doesn't do anything, it can be start or end - nothing changes, it always stays in the center.
I suggest
textAlign: TextAlign.center,
doesn't affect anything)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.