FlutterTagging<T extends Taggable> class

Inheritance

Constructors

FlutterTagging({required List<T> initialItems, required FutureOr<List<T>> findSuggestions(String), required ChipConfiguration configureChip(T), required SuggestionConfiguration configureSuggestion(T), VoidCallback? onChanged, T additionCallback(String)?, bool enableImmediateSuggestion = false, Widget errorBuilder(BuildContext, Object?)?, Widget loadingBuilder(BuildContext)?, Widget emptyBuilder(BuildContext)?, WrapConfiguration wrapConfiguration = const WrapConfiguration(), TextFieldConfiguration textFieldConfiguration = const TextFieldConfiguration(), SuggestionsBoxConfiguration suggestionsBoxConfiguration = const SuggestionsBoxConfiguration(), Widget transitionBuilder(BuildContext, Widget, AnimationController?)?, Duration debounceDuration = const Duration(milliseconds: 300), bool hideOnEmpty = false, bool hideOnError = false, bool hideOnLoading = false, Duration animationDuration = const Duration(milliseconds: 500), double animationStart = 0.25, FutureOr<T> onAdded(T)?})
Creates a FlutterTagging widget.

Properties

additionCallback → (T Function(String)?)
Defines an object for search pattern.
final
animationDuration Duration
The duration that transitionBuilder animation takes.
final
animationStart double
The value at which the transitionBuilder animation starts.
final
configureChip ChipConfiguration Function(T)
The configuration of Chips that are displayed for selected tags.
final
configureSuggestion SuggestionConfiguration Function(T)
The configuration of suggestions displayed when findSuggestions finishes.
final
debounceDuration Duration
The duration to wait after the user stops typing before calling findSuggestions.
final
emptyBuilder → (Widget Function(BuildContext)?)
Called when findSuggestions returns an empty list.
final
enableImmediateSuggestion bool
If set to true, suggestions will be fetched immediately when the field is added to the view.
final
errorBuilder → (Widget Function(BuildContext, Object?)?)
Called when findSuggestions throws an exception.
final
findSuggestions FutureOr<List<T>> Function(String)
Called with the search pattern to get the search suggestions.
final
hashCode int
The hash code for this object.
no setterinherited
hideOnEmpty bool
If set to true, nothing will be shown if there are no results. emptyBuilder will also be ignored.
final
hideOnError bool
If set to true, nothing will be shown if there is an error. errorBuilder will also be ignored.
final
hideOnLoading bool
If set to true, no loading box will be shown while suggestions are being fetched. loadingBuilder will also be ignored.
final
initialItems List<T>
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingBuilder → (Widget Function(BuildContext)?)
Called when waiting for findSuggestions to return.
final
onAdded → (FutureOr<T> Function(T)?)
Called when add to tag button is pressed.
final
onChanged VoidCallback?
Called every time the value changes. i.e. when items are selected or removed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suggestionsBoxConfiguration SuggestionsBoxConfiguration
The configuration of suggestion box.
final
textFieldConfiguration TextFieldConfiguration
The configuration of the TextField that the FlutterTagging widget displays.
final
transitionBuilder → (Widget Function(BuildContext, Widget, AnimationController?)?)
Called to display animations when findSuggestions returns suggestions.
final
wrapConfiguration WrapConfiguration
The configuration of selected tags like their spacing, direction, etc.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _FlutterTaggingState<T>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited