滑动卡组

一个简单的 Flutter 包,用于模仿 Flutter 的 iMessage 图片选择器

当前功能

  • 添加小部件列表,以便在可滑动卡组中显示它们
  • 基本自定义小部件

演示

用法

要使用,只需将您想添加到焦点菜单的小部件包装在FocusedMenuHolder中

      body: Container(
        child: SwipeDeck(
          startIndex: 3,
          aspectRatio: 4 / 3,
          emptyIndicator: Container(child: Center(child: Text("Nothing Here"),),),
          widgets: IMAGES
              .map((e) => GestureDetector(
                    onTap: () {
                      print(e);
                    },
                    child: ClipRRect(
                        borderRadius: borderRadius,
                        child: Image.asset(
                          "assets/images/$e.jpg",
                          fit: BoxFit.cover,
                        )),
                  ))
              .toList(),
        ),
      ),

路线图

计划添加更多自定义项。

许可证

MIT

GitHub

https://github.com/retroportalstudio/swipe_deck