Listview抖动中项目之间的不必要间隙

时间:2019-03-13 12:30:07

标签: listview dart flutter divider

我有一个Listview,其内容是动态的。 Listview用于显示动态窗口小部件的列表。 使用以下代码填充Listview

new Container(
      color: Colors.white,
      child:
      new ListView(
        padding: EdgeInsets.all(0.0),
        children: _widgetsList.map((Widget item){
          return new Container(
            color: Colors.red,
            child: item,
          );
        }).toList(),
      ),
);

输出是下面的图像

enter image description here

问题是列表视图中的每个项目之间都出现了很小的间隙,我希望将其删除。

enter image description here

等待您的帮助!

1 个答案:

答案 0 :(得分:1)

尝试一下

[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ PricingService ---
[INFO] 
[INFO] --- spring-cloud-contract-maven-plugin:1.2.2.RELEASE:generateStubs (default-generateStubs) @ PricingService ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.079 s
[INFO] Finished at: 2019-03-13T16:09:17+03:30
[INFO] Final Memory: 62M/483M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.cloud:spring-cloud-contract-maven-plugin:1.2.2.RELEASE:generateStubs (default-generateStubs) on project PricingService: Stubs could not be found: [/home/akarimin/project/foo/pricing-service/pricing/target/stubs] .
[ERROR] Please make sure that spring-cloud-contract:convert was invoked
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException