Flutter:如何制作曲线列表视图

问题描述 投票:0回答:1

我想制作一个弯曲的列表项,但它没有按预期工作

我尝试过ListWheelScrollView和circle_wheel_scroll包。基本上,我可以创造出我想要的设计。但问题是:

  • 我无法点击每个元素
  • 当 onSelectedItemChanged 触发时,我更新每个项目的变换旋转,这使得滚动动作不平滑
flutter dart listview
1个回答
0
投票
 **Can you please try this.**

 Transform.rotate(
    angle: 35 * (3.14159 / 90),
    child: Container(
    height: 120,
    width: 100,
    color: Colors.pink,
        ),
      ),
   const SizedBox(height: 50),
   Container(
   height: 100,
   width: 120,
   color: Colors.pink,
   ),
   const SizedBox(height: 50),
   Transform.rotate(
   angle: 35 * (3.14159 / 90),
   child: Container(
   height: 120,
   width: 100,
   color: Colors.pink,
      ),
    ),

and are you using listview so manage on index.
© www.soinside.com 2019 - 2024. All rights reserved.