搜尋分類、套件與程式碼儲存庫

GitHub 儲存庫maheshj01/alphabet_scroll_view

alphabet_scroll_view

一個可滾動的 ListView 小部件,帶有側邊動態垂直字母列表,您可以拖曳或點擊以滾動到清單中以該字母開頭的第一個項目。

alphabet_scroll_view 專案封面
星標
26
分支
21
最近推送(UTC)
2026年2月22日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

alphabet_scroll_view: ^0.3.2

A Scrollable ListView Widget with the dynamic vertical Alphabet List on the Side which you can drag and tap to scroll to the first item starting with that letter in the list.

Features

  • Responsive on all screens of different Sizes and runs on all Flutter supported platforms
  • show your own widget(overlayWidget) when pointer is in focus with Screen
  • Align the alphabet list on the left or right
  • Tap or drag to scroll to particular Alphabet.

ezgif com-gif-maker

Responsive on device of any size

ezgif com-gif-maker (2)

Installation
  • Add the dependency
flutter pub add alphabet_scroll_view
  • Import the package ​
import 'package:alphabet_scroll_view/alphabet_scroll_view.dart';

Example Usage
AlphabetScrollView(
    list: list.map((e) => AlphaModel(e)).toList()
    itemExtent: 50,
    itemBuilder: (_, k, id) {
    return Padding(
            padding: const EdgeInsets.only(right: 20),
            child: ListTile(
                    title: Text('$id'),
                    subtitle: Text('Secondary text'),
                    leading: Icon(Icons.label),
                    trailing: Radio<bool>(
                      value: false,
                      groupValue: selectedIndex != k,
                      onChanged: (value) {
                        setState(() {
                          selectedIndex = k;
                        });
                      },
                    ),
                ),
            );
        },
    ),
Customize your overlay widget
Screenshot 2021-01-24 at 1 12 37 PM
overlayWidget: (value) => Stack(
                alignment: Alignment.center,
                children: [
                  Icon(
                    Icons.star,
                    size: 50,
                    color: Colors.red,
                  ),
                  Container(
                    height: 50,
                    width: 50,
                    decoration: BoxDecoration(
                      shape: BoxShape.circle,
                    ),
                    alignment: Alignment.center,
                    child: Text(
                      '$value'.toUpperCase(),
                      style: TextStyle(fontSize: 18, color: Colors.white),
                    ),
                  ),
                ],
              ),
Screenshot 2021-01-24 at 1 09 55 PM
 overlayWidget: (value) => Container(
                    height: 50,
                    width: 50,
                    decoration: BoxDecoration(
                      shape: BoxShape.circle,
                      color: Theme.of(context).primaryColor,
                    ),
                    alignment: Alignment.center,
                    child: Text(
                      '$value'.toUpperCase(),
                      style: TextStyle(fontSize: 20, color: Colors.white),
                    ),
                  ),
Overlay Widget in Action

ezgif com-gif-maker

Refer the complete example here

Contributing

You are welcome to contribute to this package, contribution doesnt necessarily mean sending a pull request it could be

  • pointing out bugs/issues
  • requesting a new feature
  • improving the documentation

If you feel generous and confident send a PR but make sure theres an open issue if not feel free to create one before you send a PR. This helps Identify the problem and helps everyone to stay aligned with the issue :)

Mahesh Jamdade GitHub avatar
GitHub 作者

Mahesh Jamdade ↗

Refactor less, Ship more.

iVueitColumbus, OH官方網站 ↗
語言C++CMakeDartCHTMLSwiftKotlinObjective-C

分類

使用的依賴

依賴清單 5 項

  • flutter{"sdk":"flutter"}
  • collection^1.16.0
  • flutter_test開發依賴{"sdk":"flutter"}
  • pedantic開發依賴>=1.10.0-nullsafety.3 <3.0.0
  • flutter_lints開發依賴2.0.1

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗