텍스트 필드 내에서 사용자가 태그를 직접 입력하고 관리할 수 있도록 해주는 플러터 패키지입니다. 태그를 동적으로 추가, 편집, 삭제할 수 있는 직관적인 인터페이스를 제공하여 시각적 피드백을 통해 폼 상호작용을 향상시킵니다. 메모, 소셜 미디어 또는 작업 관리 도구와 같은 태깅 시스템이 필요한 애플리케이션에 적합합니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하며 장치 간 일관된 동작을 보장합니다.
사용 사례
사용자 입력 태깅
동적 키워드를 가진 폼 필드
소셜 미디어 게시물 태깅
작업 또는 프로젝트 분류
태그 제안이 있는 검색 필터
주요 기능
인라인 태그 생성
사용자 정의 태그 스타일
크로스 플랫폼 지원
기존 양식과의 간편한 통합
실시간 태그 관리
적합한 대상
인터랙티브 폼을 개발하는 개발자
키워드 태그가 필요한 앱
다중 플랫폼 애플리케이션
동적 콘텐츠 입력을 가진 UI
고려 사항
태그 제한에 주의 깊게 대응해야 합니다
사용자 정의 검증 로직이 필요할 수 있습니다
대량의 태그와 함께하는 성능
제한된 내장형 자동 완성 기능
스타일 맞춤 설정에는 추가 코드가 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
textfield_tags
Textfield_tags is a widget that allows developers to create tags inside a textfield. The widget comes with 2 default controllers that allow you to store tags as regular strings or objects. Alternatively, you can create your own controller by extending the base controller class to have custom tag controllers.
Environment
sdk: ">=2.12.0 <4.0.0"
flutter: ">=1.17.0"
Installation
dependencies:textfield_tags:^3.0.1
$ flutter pub get
Getting Started
To get started using this widget, you will need to first import the package inside your project following the installation guide found on Flutter.dev.
Usage
To use this widget,
import 'package:textfield_tags/textfield_tags.dart'; inside your dart file
Follow one of the examples bellow and call the widget TextFieldTags(...).
Read the api documentation on these properties for more details or see the examples provided in the example folder.
Examples With Different Controllers
By default, the widget comes with 2 built-in controllers: one that allows you to manage string type tags and another one that allows you to use any type of tags including objects, ints, strings, etc. We will show examples of the two controllers in actions bellow.
Using String type tags (StringTagControlle)
If you only want to use string based tags, then the StringTagController is ideal for you. The example bellow shows how you can utilize the StringTagController<String>() controller to manage string tags.
If you want to store dynamic type of datas with each tags, then using DyanmicTagController will be ideal for you. This will offer you more flexibiliity and customization and will allow you to design the tags based on their own stored data.
More Advanced Functionality Via A Custom Controller
If you feel like you want more functionality than what is offered by the 2 default controllers, then you can easily extend TextfieldTagsController class to your own custom class and inherit all its functionalities and add your own stuffs as bellow example shows.
The bellow example shows you how you can use a numbers
tag picker that selects numbers between 2 and 10 with the exception of number 8.