美文网首页
2020-11-03

2020-11-03

作者: 詹姆斯洪尼古拉斯利 | 来源:发表于2020-11-04 19:38 被阅读0次

Flutter 学习打卡 2020-11-03 02

1. 快速创建 Widget

stle ------> 快速创建StatelessWidget

   class haahh extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Container(
      
      );
      }
}

stful ------> 快速创建StatefulWidget

class 输入类名称自动填充  extends StatefulWidget {
  @override
  _输入类名称自动填充State createState() => _输入类名称自动填充State();
}

class _输入类名称自动填充State extends State<输入类名称自动填充> {
  @override
  Widget build(BuildContext context) {
    return Container(
      
    );
  }
}

2. 方法名, widget等等 光标选中, command + ., 可以进行快捷操作

image.png
image.png

wrap 相关快捷操作, 意为将现有代码块放入新的代码块中
extract 为 提取当前代码, 独立出来成为一个新的方法/变量/widget
convert 为, 将当前类或widget, 转换成其他的, 比如statelesswidget转换成statefulwidget

3. listView布局

list进行列布局时,要考虑到需要撑起足够的大小,否则代码运行报错

children: [
          Text("let me see see"),
          Expanded(
            child: ListView(
              children: list,
            ),
          )
        ],

相关文章

  • 周二 2020-11-03 23:45 - 06:50 阴 09

    2020-11-03 月总结的一天,顺便开个会周二 2020-11-03 23:45 - 06:50 阴 09h0...

  • RefrigeratorTool

    Effective Date:2020-11-03* RefrigeratorTool(And "we", "ou...

  • 2020-11-03

    Flutter 学习打卡 2020-11-03 02 1. 快速创建 Widget stle ------> 快...

  • 2020-11-03

    【318号】2020-11-03点赞列表 http://www.jianshu.com/p/5d101da93cc...

  • 男童幼儿园坠楼事件感想:设计思维的视角

    2020-11-03看到央视网的官方微信号上发布了消息:https://mp.weixin.qq.com/s/uF...

  • 2020-12-03

    2020-11-03 # 最近git clone项目一直报这个错。 * 于是乎为了解决这个问题我找遍了全网,终于解...

  • 2020-12-05

    2020-11-03 # 最近git clone项目一直报这个错。 * 于是乎为了解决这个问题我找遍了全网,终于解...

  • 2020-12-07

    2020-11-03 # 最近git clone项目一直报这个错。 * 于是乎为了解决这个问题我找遍了全网,终于解...

  • 2020-12-08

    2020-11-03 # 最近git clone项目一直报这个错。 * 于是乎为了解决这个问题我找遍了全网,终于解...

  • 2020-12-04

    2020-11-03 # 最近git clone项目一直报这个错。 * 于是乎为了解决这个问题我找遍了全网,终于解...

网友评论

      本文标题:2020-11-03

      本文链接:https://www.haomeiwen.com/subject/jqjbvktx.html