flutter Dialog里ListView的问题
showDialog(
context: context,
builder: (ctx) {
return // Dialog(
// child: Container(
// padding: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 0.0),
// decoration: BoxDecoration(
// color: Colors.transparent,
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.circular(20.0),
// image: DecorationImage(
// repeat: ImageRepeat.repeat,
// image: CachedNetworkImageProvider("http://" +
// ServerConfig.static_url +
// "/xxxxx/xxx/xxxxx.jpg" +
// "?x-oss-process=style/phone"),
// ),
// ),
// constraints: BoxConstraints.loose(Size(
// double.infinity, MediaQuery.of(context).size.height / 2)),
//// height: MediaQuery.of(context).size.height/2,
// child: Center(
// child: Container(
// padding: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
// decoration: BoxDecoration(
// color: Colors.white,
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.circular(20.0),
// ),
// child: new Form(
// child: new Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// new Flexible(
// child: new ListView(
// shrinkWrap: true,
// children: dialogContent,
// ))
// ],
// )),
// ),
// ),
// ),
// ); new Dialog(
child: new SingleChildScrollView(
child: new Material(
child: ListBody(children: dialogContent,),
),
),
); });
两种解决方式分别用了 两种颜色标记
ps :

flutter Dialog里ListView的问题的更多相关文章
- dialog 中装listview并让每一个item分隔悬空,并具有radiobutton的效果
先上图 两个关键地方,一是让dialog全透明,二是让listitem分开. 首先定义一个自定义的dialog 布局文件,这个只是包含一个listview而已 <?xml version=&qu ...
- dwz 在dialog里打开dialog
需要在打开dialog里再弹出一个dialog的话,需要在打开第一个dialog的地方指定rel,这样就可以弹出第二个dialog而不是替换掉第一个dialog <a class="a ...
- 关于实现自定义Dialog和实现Dialog里view的事件监听的两种方法
一.自定义dialog. 二.实现dialog里view的事件监听 1.自定义dialog比较简单.在实例化new的时候,加入样式,布局就行了.或者重写dialog. 2.实现dialog里view的 ...
- Flutter的教程:ListView
本文学习一下列表widget,是最常见的需求 在Flutter中,用ListView来显示列表项,支持垂直和水平方向展示,通过一个属性我们就可以控制其方向 1.水平的列表 2.垂直的列表 3.数据量非 ...
- flutter dialog
flutter Dialog import 'dart:math'; import 'package:flutter/material.dart'; import 'test.dart'; impor ...
- flutter dialog异常Another exception was thrown: No MaterialLocalizations found
flutter dialog异常Another exception was thrown: No MaterialLocalizations found import 'package:flutter ...
- 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 ...
- 这一次,解决Flutter Dialog的各种痛点!
前言 Q:你一生中闻过最臭的东西,是什么? A:我那早已腐烂的梦. 兄弟萌!!!我又来了! 这次,我能自信的对大家说:我终于给大家带了一个,能真正帮助大家解决诸多坑比场景的pub包! 将之前的flut ...
- .net类库里ListView的一个BUG
今天在CSDN论坛里看一个帖子,说是在ListView中添加了条目后第一行内容不显示,为了还原他的问题我写了以下代码. private void LoadFiles(DirectoryInfo dir ...
随机推荐
- Java经典代码片段——使用NIO进行快速的文件拷贝
public static void fileCopy(File in, File out) throws IOException { FileChannel inChannel = new File ...
- Android View添加删除或隐藏显示的默认动画;
代码中给控件设置Visibility ? VISIBLE : GONE ;时太生硬,用户体验不好:设置一个Android ViewGroup的默认动画很实用: 给需要添加动画的控件或布局的父布局,记住 ...
- LayaAir疑难杂症之一:List渲染无法生效
问题描述 使用Laya的list来做图片列表展示,无法渲染list. 原因分析 根据官网提供的文档,要将list的renderType设置为render,如图所示: 完全按照官网示例做的,但是还是 ...
- Android 开发 存储目录的详解
简介 Android设备,有3个地方的文件存储位置,他们分别是: 内部存储空间(用户无法浏览到此目录) 外部存储空间(就是手机自身的文件管理目录,用户可以浏览) SD卡的存储空间(需要插入T卡) Sh ...
- centos7安装NFS
在服务器上安装nfs服务,并将该服务器的/data目录进行共享. 服务端配置 安装nfs组件,并检查安装状态 yum install nfs-utils rpcbindrpm -qa nfs-util ...
- Tools:实现ping操作带时间戳【windows+linux】
[windows下]: ping.vbs Dim args, flag, unsuccOut args="" otherout="" flag= If WScr ...
- FPGA笔试必会知识点1--数字电路基本知识
组合逻辑与时序逻辑 组合逻辑电路:任意时刻电路输出的逻辑状态仅仅取决于当时输入的逻辑状态,而与电路过去的工作状态无关. 时序逻辑电路:任意时刻电路输出的逻辑状态不仅取决于当时输入的逻辑状态,而与电路过 ...
- SpringCloud系列六:Feign接口转换调用服务(Feign 基本使用、Feign 相关配置)
1.概念:Feign 接口服务 2.具体内容 现在为止所进行的所有的 Rest 服务调用实际上都会出现一个非常尴尬的局面,例如:以如下代码为例: Dept dept = this.restTempla ...
- redis 模糊删除key
redis-cli KEYS "pattern" | xargs redis-cli DEL Redis keys命令支持模式匹配,但是del命令不支持模式匹配,有时候需要根据一定 ...
- Vsftpd服务重启、暂停命令
VSFTP是一个基于GPL发布的类Unix系统上使用的FTP服务器软件,它的全称是Very Secure FTP 从此名称可以看出来,编制者的初衷是代码的安全. 在使用Vsftp服务是经常需要启动.停 ...