字母列表视图
Flutter 包。带有粘性标题和类似 iOS 的可点击侧边栏的 ListView。
- 星标
- 14
- 复刻
- 20
- 最近推送(UTC)
- 2026年8月16日
- 项目状态
- 未归档
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
Alphabet List View
A ListView with sticky headers and an iOS-like clickable sidebar.
Features
- Easy to create
- Customizable header
- Customizable sidebar
- Customizable overlay
- Right to left language support
- Configurable sidebar items
Usage
Depend on it:
dependencies:
alphabet_list_view: ^1.1.1
Import it:
import 'package:alphabet_list_view/alphabet_list_view.dart';
Example:
final List<AlphabetListViewItemGroup> tech = [
AlphabetListViewItemGroup(
tag: 'A',
children: const [
Text('Apple'),
Text('Amazon'),
Text('Alibaba'),
],
),
AlphabetListViewItemGroup(
tag: 'I',
children: const [
Text('Intel'),
Text('IBM'),
],
),
];
AlphabetListView(
items: tech,
);
Default symbols
You can easily get the alphabet (A-Z) using the following code:
final String alphabet = DefaultScrollbarSymbols.alphabet;
Customization options
final List<AlphabetListViewItemGroup> tech = [
AlphabetListViewItemGroup(
tag: 'A',
children: const [
Text('Apple'),
Text('Amazon'),
Text('Alibaba'),
],
),
AlphabetListViewItemGroup(
tag: 'I',
children: const [
Text('Intel'),
Text('IBM'),
],
),
];
final AlphabetListViewOptions options = AlphabetListViewOptions(
listOptions: ListOptions(
listHeaderBuilder: (context, symbol) => Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.grey,
borderRadius: BorderRadius.circular(100),
),
child: Text(symbol),
),
),
),
scrollbarOptions: const ScrollbarOptions(
backgroundColor: Colors.yellow,
),
overlayOptions: const OverlayOptions(
showOverlay: false,
),
);
AlphabetListView(
items: tech,
options: options,
);
语言DartC++CMakeSwiftCHTMLShellKotlinObjective-C
分类
使用的依赖
依赖清单 5 项
- flutter
{"sdk":"flutter"} - flutter_sticky_header
^0.8.0 - flutter_test开发依赖
{"sdk":"flutter"} - cosee_lints开发依赖
^0.13.0 - dart_code_linter开发依赖
^4.0.0
如何选择适合项目的代码仓?
先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
- 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
- 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
- 使用前在 GitHub 核对 README、许可证与 Issues。
来源与维护
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
