Comments (5)
贴上代码给我,我测试下
from flutter-custom-dialog.
贴上代码给我,我测试下
///内容对话框
YYDialog contentDialog(Widget widget,{width,height, gravity}) {
return YYDialog().build()
..width = width
..gravity = gravity
..gravityAnimationEnable = true
..borderRadius = 4.0
..height = height
..widget(
Container(
child:
Column(
children: [
Wrap(
children: [
Text("1.就这个可以,我现在用这个!!!"),
Text("2.就这个可以,我现在用这个!!!"),
Text("3.注释的代码3种情况都不行")
],
)
],
)
//1.直接Listview不行
// ListView(
// children: [
// Text("11111"),
// Text("22222"),
// Text("33333")
// ],
// )
//2.直接Column是可以的,但是嵌套Expanded也不行
// Column(
// children: <Widget>[
// Expanded(
// flex: 1,
// child: Text("Expanded1"),
// ),
// Expanded(
// flex: 2,
// child: Text("Expanded2"),
// )
// ],
// ),
//3.直接GridView,不行
// GridView.count(
// crossAxisCount: 2,
// childAspectRatio: 1.0,
// crossAxisSpacing: 10,
// mainAxisSpacing: 10,
// children: <Widget>[
// Text("1111"),
// Text("2222"),
// Text("3333")
// ],
// )
)
)
..show();
}
from flutter-custom-dialog.
贴上代码给我,我测试下
///内容对话框
YYDialog contentDialog(Widget widget,{width,height, gravity}) {
return YYDialog().build()
..width = width
..gravity = gravity
..gravityAnimationEnable = true
..borderRadius = 4.0
..height = height
..widget(
Container(
child:
Column(
children: [
Wrap(
children: [
Text("1.就这个可以,我现在用这个!!!"),
Text("2.就这个可以,我现在用这个!!!"),
Text("3.注释的代码3种情况都不行")
],
)
],
)
//1.直接Listview不行
// ListView(
// children: [
// Text("11111"),
// Text("22222"),
// Text("33333")
// ],
// )//2.直接Column是可以的,但是嵌套Expanded也不行 // Column( // children: <Widget>[ // Expanded( // flex: 1, // child: Text("Expanded1"), // ), // Expanded( // flex: 2, // child: Text("Expanded2"), // ) // ], // ), //3.直接GridView,不行 // GridView.count( // crossAxisCount: 2, // childAspectRatio: 1.0, // crossAxisSpacing: 10, // mainAxisSpacing: 10, // children: <Widget>[ // Text("1111"), // Text("2222"), // Text("3333") // ], // ) ) ) ..show();
}
整段代码直接复制就行,可以运行的,粘上来有些丑
from flutter-custom-dialog.
你的子控件没有填大小,所以出不来,填上宽高就行了,外面嵌套一层可以增加宽高的
from flutter-custom-dialog.
你的子控件没有填大小,所以出不来,填上宽高就行了,外面嵌套一层可以增加宽高的
回复:可以,谢谢o( ̄︶ ̄)o
from flutter-custom-dialog.
Related Issues (20)
- Prevent Dialog from Hardware back button HOT 1
- 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
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.