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 ...
随机推荐
- activity--常见属性总结
15.Activit的几个重要属性总结? 12.onNewIntent()使用Tips?11.launchMode的属性介绍?及其常用的Intent Flag? ==== 15.Activit的几个重 ...
- Mock测试接口
Mock使用场景: (1)创建所需的DB数据可能需要很长时间,如:调用别的接口,模拟很多数据,确保发布版本接口可用 (2)调用第三方API接口,测试很慢, (3)编写满足所有外部依赖的测试可能很复杂, ...
- 【01】团饱和图:(一)EHM定理
团饱和图:(一)EHM定理 据A. Hajnal考证,术语"饱和性",即saturation,最早由前苏联数学家A. A. Zykov在1949年引入,用于研究线性复形,但是他的工 ...
- unity检测鼠标是点击在UI上还是物体上
void Update() { if (Input.GetMouseButtonDown(0)||(Input.touchCount >0 && Input.GetTouch(0 ...
- nvm 查看node版本
1. 查看有哪些 node 版本 命令: nvm ls-remote 2. 查看本地node版本 nvm list 3. 版本切换 nvm use 版本号
- LINUX新建和增加SWAP分区
我们都知道在安装Linux系统时在分区时可以分配swap分区,而系统安装后(在运行中)如何建立或调整swap分区呢? 在装完Linux系统之后,建立Swap分区有两种方法. 1.新建磁盘分区作为swa ...
- LeetCode 206. Reverse Linked List倒置链表 C++
Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4-> ...
- Win10 安装SqlServer2012 无法访问数据库
win10系统,安装好vs2017,sqlserver2012, 在abp 执行 Update-Database 会出错 具体解决办法是SqlServer2012的1433端口没打开. 打开办 ...
- Java好的的工具类:JSONResult
package com.nxhfzx.gdshopping.entity; import java.util.List; import com.fasterxml.jackson.databind.J ...
- DEPLOY YOUR WEBSITE TO GITHUB PAGES
DEPLOY YOUR WEBSITE TO GITHUB PAGES Review Fantastic! You now have your site published on the public ...