{"id":19273035,"url":"https://github.com/fluttercandies/left-scroll-actions","last_synced_at":"2026-01-11T04:52:46.956Z","repository":{"id":37374403,"uuid":"198212450","full_name":"fluttercandies/left-scroll-actions","owner":"fluttercandies","description":"Flutter的左滑删除组件","archived":false,"fork":false,"pushed_at":"2024-12-19T03:18:26.000Z","size":823,"stargazers_count":82,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T09:07:35.988Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluttercandies.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-22T11:44:30.000Z","updated_at":"2024-12-19T03:18:29.000Z","dependencies_parsed_at":"2024-11-09T20:40:28.640Z","dependency_job_id":"7d7f7fd2-2a44-418c-a365-fae563cbfc4d","html_url":"https://github.com/fluttercandies/left-scroll-actions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluttercandies%2Fleft-scroll-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluttercandies%2Fleft-scroll-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluttercandies%2Fleft-scroll-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluttercandies%2Fleft-scroll-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluttercandies","download_url":"https://codeload.github.com/fluttercandies/left-scroll-actions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464223,"owners_count":20942970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T20:40:22.861Z","updated_at":"2026-01-11T04:52:46.949Z","avatar_url":"https://github.com/fluttercandies.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# left_scroll_actions\n\nA useful left scroll actions widget like WeChat.\n\n一款仿微信效果的 Flutter 左滑菜单插件。现在支持 iOS 的展开与弹性效果。\n\n很轻松的打开关闭指定组件。\n或者在同一个列表内通过 tag 实现联动关闭（打开一个关闭其他）。\n\n![preview](demo.gif)\n\n## Install\n\nAdd this to your package's pubspec.yaml file:\n把如下字段加入你的`pubspec.yaml`文件：\n\n```yaml\ndependencies:\n  flutter:\n    sdk: flutter\n  // 添加下面这一行。 Add this row.\n  left_scroll_actions: any\n```\n\n然后运行`flutter packages get`即可\n\n## Usage\n\n### CupertinoLeftScroll (1.4.0)\n\n```dart\n  final key = Key('MY CUSTOM KEY, use id/title');\n  final closeTag = LeftScrollCloseTag('MyTestListTag');\n\n  // widget\n  CupertinoLeftScroll(\n    // important, each Row must have different key.\n    // DO NOT use '$index' as Key! Use id or title.\n    key: key,\n    // left scroll widget will auto close while the other widget is opened and has same closeTag.\n    // 当另一个有相同closeTag的组件打开时，其他有着相同closeTag的组件会自动关闭.\n    closeTag: closeTag,\n    buttonWidth: 80,\n    child: Container(\n      height: 60,\n      color: Colors.white,\n      alignment: Alignment.center,\n      child: Text('👈 Try Scroll Left'),\n    ),\n    onTap: () {\n      print('tap row');\n      closeTag.of(key).open();\n    },\n    buttons: \u003cWidget\u003e[\n      LeftScrollItem(\n        text: 'edit',\n        color: Colors.orange,\n        onTap: () {\n          print('edit');\n          closeTag.of(key).close();\n        },\n      ),\n      LeftScrollItem(\n        text: 'delete',\n        color: Colors.red,\n        onTap: () {\n          // with animation\n          closeTag.of(key).remove(() async {\n            print('delete');\n            setState(() {\n              list.remove(id);\n            });\n            // return false; // restore dismiss status\n            return true;\n          });\n        },\n      ),\n    ],\n    onTap: () {\n      print('tap row');\n    },\n  );\n```\n\n### LeftScroll\n\nYou can use this widget as same as `CupertinoLeftScroll`.\nCustom define you slide animation by implements `onScroll` function.\n\n### 弹性 (1.5.0）\n\n1. 设置`CupertinoLeftScroll`的`bounce`参数为`true`，即可获得弹性效果\n2. 通过`CupertinoLeftScroll`的`bounceStyle`参数控制弹性效果\n\n### 左滑联动列表（1.3.0）\n\n1. 对于提供同一个`LeftScrollCloseTag`的 LeftScroll 组件，可以在一个打开时，关闭其他组件\n2. 想要关闭特定的行，只需使用以下代码\n\n```dart\n// 找到对应tag与key的row状态，改变状态即可\nLeftScrollGlobalListener.instance.targetStatus(tag,key).value = LeftScrollStatus.close;\n\nLSTag(\"list\").of(Key(id)).to(LeftScrollStatus.close)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluttercandies%2Fleft-scroll-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluttercandies%2Fleft-scroll-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluttercandies%2Fleft-scroll-actions/lists"}