Flutter 布局相关知识点
核心概念Unbounded Constraintseither the maximum width or the maximum height is set to double.INFINITYScrollView 和它的子类比如 ListView 或 GridView 是常见的 Unbounded Constraints. 也就是在某一个方向

核心概念Unbounded Constraintseither the maximum width or the maximum height is set to double.INFINITYScrollView 和它的子类比如 ListView 或 GridView 是常见的 Unbounded Constraints. 也就是在某一个方向
1. 简介A convenience widget that combines common painting, positioning, and sizing widgets.Container在Flutter中太常见了。官方给出的简介,是一个结合了绘制(painting)、定位(positioning)以及尺寸(sizing)widget的wi
https://material.io/resources/icons/?icon=accessibility_new&style=baseline
本篇文章总结了Dart中map的使用方式,由于map中的函数相对较少,没有做明确的顺序,代码如下:void main(List<String> args) { print("这个demo用来演示Map中常用的属性和方法"); //初始化Map //普通方式,不指定任何
Scaffold.of() called with a context that does not contain a Scaffold. Scaffold.of() called with a context that does not contain a Scaffold.当你在 dart 文件中要使用 SnackBar 时,需要调用 BuildContext
效果图如下:实现代码如下:详解都在代码内哦!drawer: Drawer( child: ListView( //抽屉里面一个list部件 padding: EdgeInsets.all(0), //顶部padding为0 children: <Widget>[ //所有子部件 UserAccountsDra
listView嵌套GridView可能会出现如下错误:Vertical viewport was given unbounded height.分析原因可能是因为 无限种嵌套无限导致错误,解决办法就是把内部无限高度设置自动收缩,或者增加一个高度. 转载: flutter中
Dart operator=c++ 重载操作符
推荐原版阅读:https://book.flutterchina.club/chapter7/provider.html 在Flutter开发中,状态管理是一个永恒的话题。一般的原则是:如果状态是组件私有的,则应该由组件自己管理;如果状态要跨组件共享,则该状态应该由各个组
今天简单说一下flutter中的状态管理,我们这次使用provider; ps:先说一个概念,Model,模型,这里面定义了我们准备全局使用的数据,或者方法; 举个栗子:我们有一个User类,用来储存用户的信息,比如登录之后,我们会拿到用户的一