1. showDialog(
  2. context: context,
  3. builder: (ctx) {
  4. return
  5.  
  6. // Dialog(
  7. // child: Container(
  8. // padding: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 0.0),
  9. // decoration: BoxDecoration(
  10. // color: Colors.transparent,
  11. // shape: BoxShape.rectangle,
  12. // borderRadius: BorderRadius.circular(20.0),
  13. // image: DecorationImage(
  14. // repeat: ImageRepeat.repeat,
  15. // image: CachedNetworkImageProvider("http://" +
  16. // ServerConfig.static_url +
  17. // "/xxxxx/xxx/xxxxx.jpg" +
  18. // "?x-oss-process=style/phone"),
  19. // ),
  20. // ),
  21. // constraints: BoxConstraints.loose(Size(
  22. // double.infinity, MediaQuery.of(context).size.height / 2)),
  23. //// height: MediaQuery.of(context).size.height/2,
  24. // child: Center(
  25. // child: Container(
  26. // padding: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
  27. // decoration: BoxDecoration(
  28. // color: Colors.white,
  29. // shape: BoxShape.rectangle,
  30. // borderRadius: BorderRadius.circular(20.0),
  31. // ),
  32. // child: new Form(
  33. // child: new Column(
  34. // mainAxisSize: MainAxisSize.min,
  35. // children: <Widget>[
  36. // new Flexible(
  37. // child: new ListView(
  38. // shrinkWrap: true,
  39. // children: dialogContent,
  40. // ))
  41. // ],
  42. // )),
  43. // ),
  44. // ),
  45. // ),
  46. // );
  47.  
  48. new Dialog(
  49. child: new SingleChildScrollView(
  50. child: new Material(
  51. child: ListBody(children: dialogContent,),
  52. ),
  53. ),
  54. );
  55.  
  56. });

两种解决方式分别用了 两种颜色标记

ps :

flutter Dialog里ListView的问题的更多相关文章

  1. dialog 中装listview并让每一个item分隔悬空,并具有radiobutton的效果

    先上图 两个关键地方,一是让dialog全透明,二是让listitem分开. 首先定义一个自定义的dialog 布局文件,这个只是包含一个listview而已 <?xml version=&qu ...

  2. dwz 在dialog里打开dialog

    需要在打开dialog里再弹出一个dialog的话,需要在打开第一个dialog的地方指定rel,这样就可以弹出第二个dialog而不是替换掉第一个dialog <a class="a ...

  3. 关于实现自定义Dialog和实现Dialog里view的事件监听的两种方法

    一.自定义dialog. 二.实现dialog里view的事件监听 1.自定义dialog比较简单.在实例化new的时候,加入样式,布局就行了.或者重写dialog. 2.实现dialog里view的 ...

  4. Flutter的教程:ListView

    本文学习一下列表widget,是最常见的需求 在Flutter中,用ListView来显示列表项,支持垂直和水平方向展示,通过一个属性我们就可以控制其方向 1.水平的列表 2.垂直的列表 3.数据量非 ...

  5. flutter dialog

    flutter Dialog import 'dart:math'; import 'package:flutter/material.dart'; import 'test.dart'; impor ...

  6. flutter dialog异常Another exception was thrown: No MaterialLocalizations found

    flutter dialog异常Another exception was thrown: No MaterialLocalizations found import 'package:flutter ...

  7. flutter dialog异常Another exception was thrown: Navigator operation requested with a context that does not include a Navigator

    我在使用flutter里的对话框控件的时候遇到了一个奇怪的错误 Another exception was thrown: Navigator operation requested with a c ...

  8. 这一次,解决Flutter Dialog的各种痛点!

    前言 Q:你一生中闻过最臭的东西,是什么? A:我那早已腐烂的梦. 兄弟萌!!!我又来了! 这次,我能自信的对大家说:我终于给大家带了一个,能真正帮助大家解决诸多坑比场景的pub包! 将之前的flut ...

  9. .net类库里ListView的一个BUG

    今天在CSDN论坛里看一个帖子,说是在ListView中添加了条目后第一行内容不显示,为了还原他的问题我写了以下代码. private void LoadFiles(DirectoryInfo dir ...

随机推荐

  1. activity--常见属性总结

    15.Activit的几个重要属性总结? 12.onNewIntent()使用Tips?11.launchMode的属性介绍?及其常用的Intent Flag? ==== 15.Activit的几个重 ...

  2. Mock测试接口

    Mock使用场景: (1)创建所需的DB数据可能需要很长时间,如:调用别的接口,模拟很多数据,确保发布版本接口可用 (2)调用第三方API接口,测试很慢, (3)编写满足所有外部依赖的测试可能很复杂, ...

  3. 【01】团饱和图:(一)EHM定理

    团饱和图:(一)EHM定理 据A. Hajnal考证,术语"饱和性",即saturation,最早由前苏联数学家A. A. Zykov在1949年引入,用于研究线性复形,但是他的工 ...

  4. unity检测鼠标是点击在UI上还是物体上

    void Update() { if (Input.GetMouseButtonDown(0)||(Input.touchCount >0 && Input.GetTouch(0 ...

  5. nvm 查看node版本

    1. 查看有哪些 node 版本 命令: nvm ls-remote 2. 查看本地node版本 nvm list 3. 版本切换 nvm use 版本号

  6. LINUX新建和增加SWAP分区

    我们都知道在安装Linux系统时在分区时可以分配swap分区,而系统安装后(在运行中)如何建立或调整swap分区呢? 在装完Linux系统之后,建立Swap分区有两种方法. 1.新建磁盘分区作为swa ...

  7. LeetCode 206. Reverse Linked List倒置链表 C++

    Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4-> ...

  8. Win10 安装SqlServer2012 无法访问数据库

    win10系统,安装好vs2017,sqlserver2012, 在abp     执行 Update-Database 会出错 具体解决办法是SqlServer2012的1433端口没打开. 打开办 ...

  9. Java好的的工具类:JSONResult

    package com.nxhfzx.gdshopping.entity; import java.util.List; import com.fasterxml.jackson.databind.J ...

  10. DEPLOY YOUR WEBSITE TO GITHUB PAGES

    DEPLOY YOUR WEBSITE TO GITHUB PAGES Review Fantastic! You now have your site published on the public ...