Choice는 단일 및 다중 선택을 지원하는 유연하고 조합 가능한 선택 위젯을 구축하기 위해 설계된 현대적인 Flutter 패키지입니다. 기존의 smart_select 및 chips_choice와 같은 패키지를 대체하며, 인라인 또는 프롬프트 형식의 선택 인터페이스를 위한 더 깔끔한 API를 제공합니다. 폼, 필터, 태그 기반 입력에 적합하며, 플랫폼 간 일관성 있고 사용자 정의 가능한 경험을 제공합니다. 개발자 편의성과 UI의 유연성을 중시하여 다양한 앱 디자인에 쉽게 통합할 수 있습니다.
사용 사례
선택 가능한 옵션을 가진 폼 입력
필터링 인터페이스
태그 기반의 데이터 입력
동적 선택 목록
사용자 선호도 선택
다중 선택 드롭다운
주요 기능
깔끔하고 직관적인 API
단일 및 다중 선택 지원
유연한 인라인 또는 프롬프트 레이아웃
높은 사용자 정의 가능한 외관
크로스 플랫폼 호환성
조합 가능한 위젯 디자인
적합한 대상
기존 선택 패키지의 현대적 대안을 찾는 개발자
동적이고 재사용 가능한 선택 컴포넌트가 필요한 앱
UI 일관성과 유지보수를 강조하는 프로젝트
개발자 경험과 코드 명확성을 우선시하는 팀
복잡한 필터링 또는 태그 요구 사항이 있는 응용 프로그램
고려 사항
Flutter 위젯 조합에 대한 이해가 필요합니다
복잡한 테마를 위해 추가 스타일링이 필요할 수 있습니다
성숙한 패키지에 비해 문서가 제한적
자주 사용자 선택이 필요한 앱에 적합
상호작용이 없는 간단한 정적 선택에는 적합하지 않음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
The successor to smart_select and chips_choice with cleaner, more flexible, and composable API for creating inline or prompted choice widgets with single or multiple selection.
Features
Cleaner, flexible, and composable API
Inline or prompted choice widget
Single or multiple choice widget
Searchable choice items with highlighted result
Specifies whether the choice selection needs to be confirmed
Use any type of choice data and load it easily, either synchronously or asynchronously
Build your own choice item that fits your needs
Groupable choice items that can be sorted
Supports leading and trailing choice items, as well as divider choice items
Use a predefined wrapped, scrollable, virtualized choice list, or build one that fits your needs
Use a predefined popup dialog, bottom sheet, new page prompt, or build one that fits your needs
Use a predefined modal header, footer, and separator, or build one that fits your needs
Use a predefined group list, group item, and group header, or build one that fits your needs
Use a predefined anchor widget or build one that fits your needs
Use a predefined widget on loading, on error, and placeholder when empty, or build one that fits your needs
By default, the choice controller maintains the selection state within a List. Any constructors other than those dedicated to single choice will have a List<T> for their value and onChanged prop. If we want to use a single value of T, we can use ChoiceSingle.value adapter to fill the value prop and ChoiceSingle.onChanged adapter to fill the onChanged prop.
Here is an example of how to use the ChoiceSingle.value and ChoiceSingle.onChanged adapters
:x: Sortable choice items better to do this outside
:black_square_button: Add scroll wheel list
:black_square_button: Add dropdown choice widget
:black_square_button: Add chainable choice widget
Sponsoring
If this package or any other package I created is helping you, please consider to sponsor me so that I can take time to read the issues, fix bugs, merge pull requests and add features to these packages.