flutter 遇见的坑

2019-07-18  本文已影响0人  yinlang

1、Row嵌套textfiled
解决办法:

用Expanded 包裹一下Textfiled

Expanded(
               child: TextField(
                 controller: _textEditingController2,
                 decoration: InputDecoration(
                     prefixIcon: Icon(Icons.code,size: ScreenUtil().setWidth(28),),
                     border: InputBorder.none,
                     hintText:"验证码"
                 ),
               ),
             ),

2、Waiting for another flutter command to release the startup lock...

解决办法:删除flutter->bin->cache->lockfile文件。
3、RenderRepaintBoundary 文件截屏

4、Flutter Widget - Spacer
更个性化的分配空间:

Row (
children:[
 MyBox(),
 Spacer(),
 MyBox(),
 Spacer(flex:3),
 MyBox(),
],

上一篇 下一篇

猜你喜欢

热点阅读