패키지, 저장소 및 앱 카테고리 검색

flutter_tagging 표지
패키지 상세v3.0.0

flutter_tagging

태그 또는 다중 선택 기능을 갖춘 플러터 패키지입니다. 태그 또는 레이블 선택 폼을 추가하는 데 유용합니다.

30일 다운로드
117
좋아요
183
Pub 점수
80

패키지 설치

flutter pub add flutter_tagging

패키지 개요

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

Flutter Tagging은 폼 내에서 태그 또는 레이블을 생성하고 관리할 수 있도록 해주는 Flutter 패키지입니다. 동적 태그 입력, 제거 및 칩을 통한 시각적 피드백을 지원하여 메타데이터 분류, 사용자 선호도 또는 콘텐츠 태깅이 필요한 애플리케이션에 적합합니다. 가볍고 사용자 정의 가능한 스타일 옵션을 통해 기존 UI에 원활하게 통합될 수 있습니다. 사용자가 여러 레이블을 효율적으로 선택하거나 추가해야 하는 폼에 특히 유용합니다.

사용 사례

  • 여러 레이블을 가진 폼 입력
  • 사용자 선호도 선택
  • 콘텐츠 분류
  • 태그 기반 검색 필터
  • 동적 레이블 관리
  • 소셜 미디어 게시물 태깅

주요 기능

  • 다중 선택 칩 인터페이스
  • 사용자 정의 태그 스타일
  • 실시간 태그 추가/제거
  • 사용자 정의 입력 필드 지원
  • 경량이며 간편한 통합
  • 반응형 디자인

적합한 대상

  • 양식 중심 앱을 개발하는 개발자
  • 사용자 중심 태그가 필요한 앱
  • 메타데이터 분류가 있는 프로젝트
  • 인터랙티브 칩이 필요한 UI 구성 요소
  • 라벨 기반 필터링을 갖춘 모바일 앱

고려 사항

  • 제한된 플랫폼별 사용자 지정
  • 내장된 검증 없음
  • 태그 데이터의 지속성 처리를 수동으로 수행해야 합니다
  • 매우 큰 태그 목록에 최적화되지 않음
  • 복잡한 사용 사례를 위해 외부 상태 관리에 의존합니다

원본 README

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

Flutter Tagging

Pub Package licence

A flutter package with tagging or multi-select functionality. Useful for adding Tag or Label Selection Forms.

DEMO

List<Language> _selectedLanguages = [];

FlutterTagging<Language>(
    initialItems: _selectedLanguages,
    textFieldConfiguration: TextFieldConfiguration(
        decoration: InputDecoration(
            border: InputBorder.none,
            filled: true,
            fillColor: Colors.green.withAlpha(30),
            hintText: 'Search Tags',
            labelText: 'Select Tags',
        ),
    ),
    findSuggestions: LanguageService.getLanguages,
    additionCallback: (value) {
        return Language(
                name: value,
                position: 0,
        );
    },
    onAdded: (language){
      // api calls here, triggered when add to tag button is pressed
        return Language();
    },
    configureSuggestion: (lang) {
        return SuggestionConfiguration(
            title: Text(lang.name),
            subtitle: Text(lang.position.toString()),
            additionWidget: Chip(
                avatar: Icon(
                    Icons.add_circle,
                    color: Colors.white,
                ),
                label: Text('Add New Tag'),
                labelStyle: TextStyle(
                    color: Colors.white,
                    fontSize: 14.0,
                    fontWeight: FontWeight.w300,
                ),
                backgroundColor: Colors.green,
            ),
        );
    },
    configureChip: (lang) {
        return ChipConfiguration(
            label: Text(lang.name),
            backgroundColor: Colors.green,
            labelStyle: TextStyle(color: Colors.white),
            deleteIconColor: Colors.white,
        );
    },
    onChanged: () {
      print();
    }
);

/// LanguageService
class LanguageService {
    /// Mocks fetching language from network API with delay of 500ms.
    static Future<List<Language>> getLanguages(String query) async {
          await Future.delayed(Duration(milliseconds: 500), null);
          return <Language>[
            Language(name: 'JavaScript', position: 1),
            Language(name: 'Python', position: 2),
            Language(name: 'Java', position: 3),
            Language(name: 'PHP', position: 4),
            Language(name: 'C#', position: 5),
            Language(name: 'C++', position: 6),
          ].where((lang) => lang.name.toLowerCase().contains(query.toLowerCase())).toList();
    }
}

License

Copyright 2020 Sarbagya Dhaubanjar. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.
    * Neither the name of Google Inc. nor the names of its
      contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

카테고리

의존성

의존성 목록 3 개

소스 저장소

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

아직 데이터가 없습니다.