Flutter 踩坑之[报错]No Material widget found

报此错误的组件外面包裹一个 Material 组件。

                              Material(
                                child: Container(
                                  child: TextField(
                                    controller: TextEditingController(text: '1212'),
                                    decoration: const InputDecoration(
                                        labelText: '用户名',
                                        hintText: '用户名',
                                        border: OutlineInputBorder()),
                                  ),
                                  margin: EdgeInsets.all(5),
                                ),
                              ),
THE END
喜欢就支持一下吧
点赞10赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容