Code Monkey home page Code Monkey logo

Comments (5)

AndroidHensen avatar AndroidHensen commented on June 23, 2024

贴上代码给我,我测试下

from flutter-custom-dialog.

mx4g avatar mx4g commented on June 23, 2024

贴上代码给我,我测试下

///内容对话框
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.

mx4g avatar mx4g commented on June 23, 2024

贴上代码给我,我测试下

///内容对话框
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.

AndroidHensen avatar AndroidHensen commented on June 23, 2024

你的子控件没有填大小,所以出不来,填上宽高就行了,外面嵌套一层可以增加宽高的

from flutter-custom-dialog.

mx4g avatar mx4g commented on June 23, 2024

你的子控件没有填大小,所以出不来,填上宽高就行了,外面嵌套一层可以增加宽高的

回复:可以,谢谢o( ̄︶ ̄)o

from flutter-custom-dialog.

Related Issues (20)

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.