flutter_tagging 1.0.1 copy "flutter_tagging: ^1.0.1" to clipboard
flutter_tagging: ^1.0.1 copied to clipboard

outdated

A flutter package with tagging or multiselect functionality. Useful for adding Tag or Label Selection Forms.

Flutter Tagging #

[pub packages]

A flutter package with tagging or multiselect functionality. Useful for adding Tag or Label Selection Forms.

DEMO

Usage #

1. Depend

Add this to you package's pubspec.yaml file:

dependencies:
  flutter_tagging: ^1.0.1

2. Install

Run command:

$ flutter packages get

3. Import

Import in Dart code:

import 'package:flutter_tagging/flutter_tagging.dart';

4. Using Flutter Tagging

///
/// textFieldDecoration: Adds decoration to TextField.
/// addButtonWidget: Button to be shown when new pattern is typed.
/// chipsColor: Background Color of Chips. Default is light grey.
/// chipsFontColor: Font Color of Chips. Default is black.
/// deleteIcon: Delete Icon to be included in Chips. Default is Material Cancel Icon.
/// chipsPadding: Imposes padding inside chips.
/// chipsSpacing: Defines horizontal space between chips.
/// suggestionsCallback: Callback to get suggestions as per the pattern entered.
/// onChanged: Callback to get result on data change.
///
FlutterTagging(
     textFieldDecoration: InputDecoration(
         border: OutlineInputBorder(),
         hintText: "Tags",
         labelText: "Enter tags"),
     addButtonWidget: _buildAddButton(),
     chipsColor: Colors.pinkAccent,
     chipsFontColor: Colors.white,
     deleteIcon: Icon(Icons.cancel,color: Colors.white),
     chipsPadding: EdgeInsets.all(2.0),
     chipsFontSize: 14.0,
     chipsSpacing: 5.0,
     chipsFontFamily: 'helvetica_neue_light',
     suggestionsCallback: (pattern) async {
       return await TagSearchService.getSuggestions(pattern);
       },
     onChanged: (result) {
       setState(() {
         text = result.toString();
         });
       },
),

Example #

Example sources

Credit

This package uses flutter_typeahead in order to display typeahead TextField with suggestions.

Huge thanks to @AbdulRahmanAlHamali for developing Flutter Typeahead.

License #

Copyright 2018 Sarbagya Dhaubanjar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
182
likes
0
pub points
81%
popularity

Publisher

verified publishersarbagyastha.com.np

A flutter package with tagging or multiselect functionality. Useful for adding Tag or Label Selection Forms.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_typeahead

More

Packages that depend on flutter_tagging