小编Sai*_*uri的帖子

streambuilder is rebuilding again and again when keyboard popup or closes

在这里,我遇到了一个问题。我有一列带有流构建器和文本字段的小部件。当我尝试输入一些文本时,键盘会弹出,然后流构建器再次重建,或者当键盘关闭时,流构建器再次重建。在构建聊天屏幕时,我不想再次重建流构建器,因为它会增加读取次数。

任何形式的建议都有帮助。

dart flutter

6
推荐指数
1
解决办法
2279
查看次数

为什么我的列表视图没有用 setstate 更新

在下面的代码中,我有小部件列表,并在列表视图中使用,我在 setstate 中使用 list.add() 添加小部件,列表也没有更新,我不知道发生了什么。为什么我的列表没有更新

这是下面的代码

class EditorPageState extends State<EditorPage> {

List<Widget> obj = List<Widget>();

GlobalKey formkey= GlobalKey<FormState>();



@override
Widget build(BuildContext context) {

obj.add( TextFormField(
        textCapitalization: TextCapitalization.sentences,
        maxLength: 50,
        decoration: InputDecoration(
          labelText: "TITLE",
          hintText: "UR ARTICLE NAME"
        ),
      ));
      obj.add(TextFormField(decoration: InputDecoration(
          labelText: "Article's Propic",
          hintText: "Only image Url is Accepted"
        ),));

return Scaffold(
  appBar: AppBar(title: Text("data"),),
body: Form(
  key: formkey,
  child:Stack(
    children: <Widget>[
      Padding(
        padding: const EdgeInsets.only(bottom: 50),
        child: ListView(
                shrinkWrap: true,
                  children: obj
              ),
      ),
            Container(
              height: MediaQuery.of(context).size.height,
              child: …
Run Code Online (Sandbox Code Playgroud)

dart flutter

4
推荐指数
1
解决办法
6482
查看次数

Flutter 如何让 uber 或 ola 之类的汽车图标在谷歌地图上移动

我正在 flutter 中开发一个公交车跟踪应用程序,但在使用 google_maps_flutter 制作移动公交车图标动画时感到震惊,我尝试使用标记,但它在标记上没有任何动画,我不知道如何解决这种情况,有什么可以制作移动动画吗地图中的标记

maps android dart flutter flutter-animation

4
推荐指数
1
解决办法
3823
查看次数

标签 统计

dart ×3

flutter ×3

android ×1

flutter-animation ×1

maps ×1