Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 列表正在滚动,而值在颤振中ListView的动态文本字段中键入_Android_Dart_Flutter - Fatal编程技术网

Android 列表正在滚动,而值在颤振中ListView的动态文本字段中键入

Android 列表正在滚动,而值在颤振中ListView的动态文本字段中键入,android,dart,flutter,Android,Dart,Flutter,当文本输入到文本字段时,屏幕正在滚动,我使用了resizetoavidbottopadding:false,insideScaffold,以避免屏幕大小调整,并且列表与Textfield是动态的。编辑动态文本字段时如何停止滚动或调整屏幕大小 我还通过在ListView.builder中添加physics:const NeverScrollableScrollPhysics()来抵制物理滚动 Container dynamciContainer(BuildContext context,doub

当文本输入到文本字段时,屏幕正在滚动,我使用了
resizetoavidbottopadding:false,
inside
Scaffold
,以避免屏幕大小调整,并且列表与Textfield是动态的。编辑动态
文本字段时如何停止滚动或调整屏幕大小

我还通过在ListView.builder中添加
physics:const NeverScrollableScrollPhysics()
来抵制物理滚动

Container dynamciContainer(BuildContext context,double width,double height){
    return Container(
      child: ListView.builder
        (
          itemCount:sfieldList.length,
          shrinkWrap: true,
          padding: EdgeInsets.all(0),
          physics: const NeverScrollableScrollPhysics(),
          itemBuilder: (BuildContext ctxt, int index) {
          return dynamicItem(ctxt,width, height,sfieldList[index],index);
          }
      ),
    );
  }
文本字段项

 Container textFieldContainer(double width,Fieldlist field,int p){
    return Container(

      decoration: new BoxDecoration(
          color: Colors.white,
          border: Border.all(color: Colors.grey[200], width: 2.0),
          borderRadius: new BorderRadius.all(Radius.circular(45.0))),
         padding:EdgeInsets.only(top:width*0.009,bottom: width*0.009,left: width*0.05,right: width*0.00),
         child:  new TextField(
        style: TextStyle(fontFamily: 'semibold',color: MyColors.colorPrimary),
        keyboardType:field.type=='STR'||field.type=='EMAIL'? TextInputType.text:TextInputType.number,
        textInputAction: TextInputAction.done,
        decoration: InputDecoration(contentPadding:EdgeInsets.all(8.0),hintStyle: TextStyle(fontFamily: 'semibold',color: MyColors.colorPrimary), border: InputBorder.none),
        onChanged: (String val) {
          enteredValue(field,val);
          setState(() {
            sfieldList[p].fieldvalue=val;
          });
        },),
    );
  }

能否为listview中的动态文本字段提供代码?因为“物理学:const NeverScrollableScrollPhysics()”正在为listview中的静态文本字段工作,当我们试图在编辑时滚动时,它不允许我滚动。@android看到我更新的代码。我不知道为什么,但你的代码正在为我工作:)我想它可能是容器issue@android我在那个屏幕上有多个列表。你是说嵌套列表视图吗?如果是,请将该代码也张贴出来。我可以帮你吗?你能在listview中为你的动态文本字段提供代码吗?因为“物理学:const NeverScrollableScrollPhysics()”正在为listview中的静态文本字段工作,当我们试图在编辑时滚动时,它不允许我滚动。@android看到我更新的代码。我不知道为什么,但你的代码正在为我工作:)我想它可能是容器issue@android我在那个屏幕上有多个列表。你是说嵌套列表视图吗?如果是,请将该代码也张贴出来。也许我能帮你