Comments (6)
try showCallBack property avaliable or not
from flutter-custom-dialog.
Sorry, how am I supposed to use the function showCallBack, it doesn't receive any argument. Can you show a sample using showCallBack? the property does exist
from flutter-custom-dialog.
YYDialog YYNoticeDialog() {
return YYDialog().build()
..width = 120
..height = 110
..backgroundColor = Colors.black.withOpacity(0.8)
..borderRadius = 10.0
..showCallBack = () {
print("showCallBack invoke");
}
..dismissCallBack = () {
print("dismissCallBack invoke");
}
..widget(Padding(
padding: EdgeInsets.only(top: 21),
child: Image.asset(
'images/success.png',
width: 38,
height: 38,
),
))
..widget(Padding(
padding: EdgeInsets.only(top: 10),
child: Text(
"Success",
style: TextStyle(
fontSize: 15,
color: Colors.white,
),
),
))
..animatedFunc = (child, animation) {
return ScaleTransition(
child: child,
scale: Tween(begin: 0.0, end: 1.0).animate(animation),
);
}
..show();
}
from flutter-custom-dialog.
sorry, but it doesn't solve my problem. I can execute the showCallback
and the dismissCallBack
. But how do I get the returned value after the user hit onTap1
or onTap2
? I want to return the selected value when the dialog is dismiss. Using Navigor.pop(context, selectedButton)
will pop the whole screen.
from flutter-custom-dialog.
1、dismiss
Do not use 'Navigator.pop(context)' to make the popover disappear, or you will close your page
This problem has been solved internally in YYDialog, and you can simply call 'dismiss()' supplied internally
var yyDialog = YYDialog();
yyDialog?.dismiss();
2、return value
return value belongs to the business logic, can find a way to obtain
from flutter-custom-dialog.
i get. thank you
from flutter-custom-dialog.
Related Issues (20)
- YYDialog.init(context); 报错 HOT 3
- 在onTap中路由跳转会报错 '!_debugLocked': is not true
- The method 'findRootAncestorStateOfType' was called on null. Receiver: null Tried calling: findRootAncestorStateOfType<NavigatorState>() HOT 1
- The following NoSuchMethodError was thrown while handling a gesture: flutter: The method 'findRootAncestorStateOfType' was called on null. flutter: Receiver: null flutter: Tried calling: findRootAncestorStateOfType<NavigatorState>() flutter: HOT 2
- 在点击确认的回调中跳转路由没反应 HOT 1
- RadioItem 里的字体大小没办法设置。 HOT 1
- Add Gravity.spaceEvenly to double Button Property! HOT 1
- new flutter build fail HOT 1
- Migrate to null safety HOT 2
- Null safety!! HOT 1
- pleas please add null safety support We beg you HOT 1
- can not work on flutter 2.5,about Android V2 embedding HOT 3
- The plugin `flutter_custom_dialog` uses a deprecated version of the Android embedding. HOT 6
- 带参返回 HOT 3
- A problem occurred configuring project ':flutter_custom_dialog'. HOT 1
- how to make dialog always on top of keyboard?
- version: v1.2.0 , when upgrade flutter sdk to v3.3.0, Remove deprecated FlatButton HOT 1
- Replace "EdgeInsets margin" by "EdgeInsetsGeometry margin"
- It not working with newest Flutter version HOT 1
- Not working with Flutter 3.22.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-custom-dialog.