분류, 패키지 및 저장소 검색

alphabet_navigation 표지
패키지 상세v2.1.0

alphabet_navigation

알파벳 순으로 인덱싱된 목록 뷰를 제공하는 Flutter 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
72
좋아요
13
Pub 점수
150

패키지 설치

flutter pub add alphabet_navigation

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

알파벳 인덱스가 있는 리스트 뷰를 가능하게 하는 플러터 패키지로, 사용자가 글자를 탭하여 긴 목록을 빠르게 탐색할 수 있도록 합니다. 알파벳 표시가 있는 스크롤 가능한 사이드바를 제공하여 연락처나 사전과 같은 대규모 데이터셋의 사용성을 향상시킵니다. 이 패키지는 안드로이드, iOS, 웹, 맥OS, 윈도우, 리눅스 등 여러 플랫폼을 지원합니다. 최소한의 설정으로 기존 플러터 앱에 원활하게 통합되며, 사용자 정의 가능한 스타일과 동작을 제공합니다.

사용 사례

  • 연락처 목록에서의 빠른 탐색
  • 대규모 데이터셋의 효율적인 브라우징
  • 알파벳 검색에서 사용자 경험 개선
  • 사전 또는 용어집 항목 표시
  • 목록 중심 인터페이스에서 접근성 향상

주요 기능

  • 알파벳 순 사이드바 탐색
  • 사용자 정의 가능한 외관
  • 크로스 플랫폼 호환성
  • 스무스 스크롤 통합
  • 동적 데이터 소스 지원
  • ListView.builder와의 간편한 통합

적합한 대상

  • 긴 알파벳 목록을 가진 앱
  • 연락처 또는 디렉터리 애플리케이션
  • 교육 또는 참고 앱
  • 빠른 콘텐츠 액세스가 필요한 사용자 인터페이스
  • 직관적인 목록 탐색을 원하는 개발자

고려 사항

  • 사용자 정의 테마를 위해 추가 스타일링이 필요할 수 있습니다
  • 매우 큰 데이터 세트에서의 성능
  • 알파벳 인덱싱만 가능
  • 빈 목록과 같은 극단적인 경우를 적절히 처리해야 합니다
  • 알파벳 정렬 외의 필요에 적합하지 않음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Alphabet Navigation

License GitHub Contributors Stars GitHub Closed Issues

alphabet_navigation is a Flutter package that provides a dynamic, scrollable list view with an alphabetical index. It’s perfect for apps that need a quick and intuitive way to navigate long lists by alphabet.


Features

  • [x] A vertical alphabetical navigation bar for quick access to sections.
  • [x] Smooth scrolling to the desired section when an alphabet is selected.
  • [x] Fully customizable list items and navigation styles.
  • [x] Built-in search bar for filtering items dynamically.
  • [x] Search field is optional & can be customized.
  • [x] Dynamic list height is optional & can be customized.
  • [x] Alphabetic list direction is configurable.
  • [x] Allow users to easily configure colors, fonts, and styles.
  • [x] Lightweight and easy to integrate into any Flutter project.
  • [x] Compatible with all platforms.
  • [x] Clear documentation.

Demo

Demo GIF


Installation

To use the alphabet_navigation package, follow these steps:

Run this on your project terminal:

flutter pub add alphabet_navigation

or manually configure pubspec.yml file

  1. Add the package to your pubspec.yaml file:

    dependencies:
      alphabet_navigation: ^2.1.0 // replace with latest version
    
  2. Run the following command to get the package:

    flutter pub get
    

Usage

Here’s how you can use the AlphabetNavigation widget in your app:

Example 1:
AlphabetNavigation(
  stringList: stringList, // Pass the string list for alphabet mapping
  dynamicList: dynamicList, // Pass the dynamic list for content
  dynamicListHeight: 80, // Dynamic list height (optional)
  showSearchField: true, // Toggle for search field (optional)
  circleSelectedLetter: true, // Is circle apply for the selected letter (optional)
  itemBuilder: (context, index, searchFilterList) {}, // Item builder
)
Example 2:
AlphabetNavigation(
  stringList: stringList, // Pass the string list for alphabet mapping
  dynamicList: dynamicList, // Pass the dynamic list for content
  searchFieldHintText: "Search here...", // Search field hint text
  searchFieldTextStyle: TextStyle(
   color: Colors.blue.shade800,
   fontWeight: FontWeight.w500,
   fontSize: 16,
  ),
  searchFieldHintTextStyle: TextStyle(
    color: Colors.grey.shade300,
    fontWeight: FontWeight.w500,
    fontSize: 16,
  ),
  searchFieldIcon: Icon(Icons.search, color: Colors.blue.shade800,), // Search field icon
  searchFieldEndIconColor: Colors.blue.shade800, // Search field clear icon color
  listDirection: ListDirection.left, // Direction of the list. If [ListDirection.left], the list will be from right to left (optional)
  showSearchField: true, // Toggle for search field (optional)
  circleSelectedLetter: true, // Is circle apply for the selected letter (optional)
  itemBuilder: (context, index, searchFilterList) {}, // Item builder
)
Example 3:
AlphabetNavigation(
  stringList: stringList, // Pass the string list for alphabet mapping
  dynamicList: dynamicList, // Pass the dynamic list for content
  showSearchField: true, // Toggle for search field (optional)
  alphabetListBackgroundColor: Colors.tealAccent, // Alphabet list background color
  selectedColor: Colors.white70, // Selected color for the alphabet
  unselectedColor: Colors.black38, // Unselected color for the alphabet
  circleSelectedLetter: true, // Is circle apply for the selected letter (optional)
  circleSelectedBackgroundColor: Colors.blue, // Selected circle background color
  itemBuilder: (context, index, searchFilterList) {}, // Item builder
)
Example 4:
AlphabetNavigation(
  stringList: stringList, // Pass the string list for alphabet mapping
  dynamicList: dynamicList, // Pass the dynamic list for content
  showSearchField: false, // Toggle for search field (optional)
  circleSelectedLetter: false, // Is circle apply for the selected letter (optional)
  itemBuilder: (context, index, searchFilterList) {}, // Item builder
)
Example 4:
AlphabetNavigation(
  stringList: stringList, // Pass the string list for alphabet mapping
  dynamicList: dynamicList, // Pass the dynamic list for content
  circleSelectedLetter: false, // Is circle apply for the selected letter (optional)
  itemBuilder: (context, index, searchFilterList) {}, // Item builder
)
Example 5:
AlphabetNavigation(
  stringList: stringList, // Pass the string list for alphabet mapping
  dynamicList: dynamicList, // Pass the dynamic list for content
  circleSelectedLetter: false, // Is circle apply for the selected letter (optional)
  alphabetListBackgroundColor: Colors.transparent, // Alphabet list background color
  selectedColor: Colors.blue, // Selected color for the alphabet
  unselectedColor: Colors.grey.shade600, // Unselected color for the alphabet
  itemBuilder: (context, index, searchFilterList) {}, // Item builder
)
Example 6:
AlphabetNavigation(
  stringList: stringList, // Pass the string list for alphabet mapping
  dynamicList: dynamicList, // Pass the dynamic list for content
  showSearchField: true, // Toggle for search field (optional)
  circleSelectedLetter: true, // Is circle apply for the selected letter (optional)
  circleBorderRadius: 50.0, // Border radius for the selected letter circle and alphabet list border
  scrollAnimationCurve: Curves.easeInCubic, // Scroll animation curve
  itemBuilder: (context, index, searchFilterList) {}, // Item builder
)
Example 1 Example 2 Example 3
Example 4 Example 5 Example 6

Parameters
Parameter Type Description
stringList List<String> List of strings for alphabetical grouping.
dynamicList List<dynamic> Data list to be displayed.
dynamicListHeight double Dynamic list height.
listDirection ListDirection Direction of the list.
showSearchField bool Toggle for search field.
searchFieldTextStyle TextStyle Search field text style.
searchFieldHintText String Search field hint text.
searchFieldHintTextStyle TextStyle Search field hint style.
searchFieldIcon Icon Search field icon.
searchFieldBackgroundColor Color Search field background color.
searchFieldEndIconColor Color Search field icon color.
alphabetListBackgroundColor Color Alphabet list background color.
selectedColor Color Selected alphabet color
unselectedColor Color Unselected alphabet color
circleSelectedLetter bool Is circle apply for the selected letter.
circleSelectedBackgroundColor Color Circle background color for the selected letter.
circleBorderRadius double Border radius for the selected letter circle
scrollAnimationCurve Curve Scroll animation curve.
itemBuilder Function(BuildContext, int, dynamic) Function to build list items dynamically.

Future Plans

Here are some planned features for future releases:

  • Accessibility Improvements: Enhanced support for voice-over and screen readers.
  • Horizontal Navigation: Add support for horizontal alphabetical navigation.
  • Custom Alphabet Set: Support for custom navigation sets like ['A', 'B', 'C', '1', '2', '3'].
  • Multi-Language Support: Enable alphabetical navigation for other languages.

Contributing

We welcome contributions from the community! If you encounter any issues or have feature suggestions, feel free to open an issue or submit a pull request on our GitHub repository.


Additional information

License

This project is licensed under the MIT License - see the LICENSE file for details.

CONTRIBUTORS

Contributors
Akash Das

Happy Coding 👨‍💻

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.