ChipsInputController<T> class

Controls the chips input, allows for fine-grained control of various aspects

Inheritance
Mixed-in types
  • Disposable

Constructors

ChipsInputController({GenerateSuggestions<T>? findSuggestions, String? debugName, bool suggestOnType = true, String? placeholder, String? query, Iterable<T>? chips, DiffEquality? equality, ChipTokenizer<T>? tokenizer, bool? hideSuggestionOverlay})

Properties

chips → SunnyObservableList<T>
The current list of chips to display
final
connection TextInputConnection?
Current textInputConnection
getter/setter pair
debugLabel String
final
diffStream Stream<ChipsDiff<T>>
no setter
disabled bool
no setter
enabled bool
getter/setter pair
findSuggestions GenerateSuggestions<T>
The callback to search for suggestions based on chips or query
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hideKeyboardCallback VoidCallback
no getter
hideSuggestionOverlay bool
getter/setter pair
isDisposed bool
no setter
placeholder String?
getter/setter pair
query String
no setter
queryStream → ValueStream<String?>
no setter
requestKeyboardCallback VoidCallback
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
no setter
status ControllerStatus
no setter
suggestion Suggestion<T>
getter/setter pair
suggestions List<T>
getter/setter pair
suggestionsStream → ValueStream<ChipSuggestions<T>?>
no setter
suggestionStream → ValueStream<Suggestion<T>?>
no setter
suggestionToken String?
no setter
tokenizer ChipTokenizer<T?>
Tokenizes each chip to support full-text searching
final

Methods

acceptSuggestion({T? suggestion}) Future
addAll(Iterable<T> values, bool resetQuery, {required ChipChangeOperation source}) Future<ListDiffs<T>>
addChip(T data, {required bool resetQuery}) Future<ListDiffs<T>>
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
calculateInlineSuggestion(ChipSuggestions<T>? _chipSuggest, {bool notify = false}) → void
checkStatus<X>(X operation()) → X?
checkStatusVoid(void operation()) → void
close() → void
deleteChip(T data, {required bool resetQuery}) Future<ListDiffs<T>>
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
disposeAll() Future
inherited
disposeAsync() Future
hideKeyboard() → void
initialize(BuildContext context, OverlayEntry entry) → void
loadSuggestions(String query) Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
override
open() bool
pop({required ChipChangeOperation source, required bool resetQuery}) Future<ListDiffs<T>>
registerDisposer(Disposer callback) → void
inherited
registerStream(Stream? stream) → void
inherited
registerSubscription(StreamSubscription? subscription) → void
inherited
removeAt(int index, {required bool resetQuery}) Future<ListDiffs<T>>
removeDisposer(FutureOr dispose()) → void
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
requestKeyboard() → void
resetSuggestions() Future
setInlineSuggestion(T suggestion, {String? suggestionToken, bool notify = false}) → void
setQuery(String query, {bool? isInput}) Future
syncChips(Iterable<T> newChips, {bool notify = true, bool? resetQuery, required ChipChangeOperation source}) Future<ListDiffs<T>>
toggle(BuildContext context) → void
toString() String
A string representation of this object.
inherited
updateChips(Iterable<T> chips, {required bool resetQuery, required ChipChangeOperation source}) Future

Operators

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