首页 > 解决方案 > 如何在我的颤振应用程序中将圆形指示器小部件作为小部件制作为点?

问题描述

我正在为我的页面浏览应用程序创建一个指示器小部件,这意味着它将位于我的小部件树中。

我所说的是,当我使用 PageViewIndicator 类时,它会自动放置在底部或中心,但是当我将它放置在中心时,例如,它会隐藏我不想要的字段,所以你怎么看?

我用过这个

PageIndicatorContainer(
  pageView: PageView(
    children: customWidgetLists,
    controller: controller,
  ),
  align: IndicatorAlign.Center,
  length: 4,
  indicatorSpace: 20.0,
  padding: const EdgeInsets.all(10),
  indicatorColor: Colors.white,
  indicatorSelectorColor: Colors.blue,
  shape: IndicatorShape.circle(size: 12),
  // shape: IndicatorShape.roundRectangleShape(size: Size.square(12),cornerSize: Size.square(3)),
  // shape: IndicatorShape.oval(size: Size(12, 8)),
}

一切正常,只是我希望这些点位于屏幕的中心,而不是因为它覆盖了其他小部件。

标签: androiddartflutterviewpagerindicator

解决方案


推荐阅读