FlutterUnit
FlutterUnit copied to clipboard
【Flutter 集录指南 App】The unity of flutter, The unity of coder.
![15261597730998_ pic_hd](https://user-images.githubusercontent.com/26687012/90480061-4b06c180-e162-11ea-8fad-cd1d94dbedba.jpg)
![14101597545228_ pic](https://user-images.githubusercontent.com/26687012/90325281-35e83200-dfac-11ea-860d-8b39ad53d656.jpg) > 私有化构造函数通过`ClassName._()`来实现,这样外部无法通过个构造函数来创建`类对象`,通常用于`单例模式`。
怎么防止FutureBuilder过度刷新当前页面,进入当前页面后 在页面setState操作后 会再次刷新FutureBuilder
![image](https://user-images.githubusercontent.com/26687012/67549600-3bcc0880-f737-11e9-916d-70988a1e9ccb.png)
> This requires the 'spread-collections' experiment to be enabled. `... 操作符` 至少需要`dart 2.3.0` - 解决方法 `pubspec.yaml 文件中` ```yaml environment: sdk: ">=2.3.0
Run->Edit Configurations…—>Dart entrypoint ![image](https://user-images.githubusercontent.com/26687012/67553923-e137aa00-f740-11e9-977d-5b455d62e258.png) ![image](https://user-images.githubusercontent.com/26687012/67553950-f3b1e380-f740-11e9-9860-ed8172f45538.png)
不同分辨率的图片分别放在2.0x,3.0x等文件夹下,会自动加载。注意:不需要1.0x文件夹但必须有1.0x的图片,比如存在image文件夹,则1.0x的图片直接放在image文件夹下,并在image文件夹下创建2.0x、3.0x文件夹,里面放入相应分辨率的图片 --- ![image](https://user-images.githubusercontent.com/26687012/67552626-00810800-f73e-11e9-9bb2-fd39b4991ca9.png)
`--no-hot` ![image](https://user-images.githubusercontent.com/26687012/67552333-733db380-f73d-11e9-8432-646c7b252897.png) ![image](https://user-images.githubusercontent.com/26687012/67552245-4093bb00-f73d-11e9-87a2-a0dd2df48f50.png)