SuggestionController class Null safety

Inheritance

Constructors

SuggestionController({double itemHeight = 100, String hashtagSymbol = '#', String mentionSymbol = '@', double containerMaxHeight = 250, List<HashTag>? initalTags, List<Mention>? intialMentions, Future<List<Mention>> onSearchMention(String)?, Future<List<HashTag>> onSearchTags(String)?, List<HashTag>? hashtagSuggestions = const [], List<Mention>? mentionSuggestions = const [], dynamic onHashTagSelected(HashTag)?, dynamic onMentionSelected(Mention)?, SuggestionPosition? position = SuggestionPosition.bottom, Widget hashTagSearchCard(HashTag)?, Widget mentionSearchCard(Mention)?})

Properties

containerMaxHeight double
final
hashCode int
The hash code for this object.
read-onlyinherited
hashtags List<HashTag>
write-only
hashTagSearchCard → (Widget Function?(HashTag)?)
Custom hashtag widget shown during search
final
hashtagSuggestions List<HashTag>?
Initial suggested hashtags when the user enters the hashtagSymbol
final
hashtagSymbol String
final
hasListeners bool
Whether any listeners are currently registered.
@protectedread-onlyinherited
initalTags List<HashTag>?
final
intialMentions List<Mention>?
final
itemHeight double
height of the suggestion item
final
last String?
write-only
loading bool
write-only
mentionSearchCard → (Widget Function?(Mention)?)
Custom mention widget shown during search
final
mentionSuggestions List<Mention>?
Initial suggested mentions when the user enters the mentionSymbol
final
mentionSymbol String
final
onHashTagSelected → (dynamic Function?(HashTag)?)
Callback for when a hashtag is selected during search
final
onMentionSelected → (dynamic Function?(Mention)?)
Callback for when a suggestion is selected during search
final
onSearchMention → (Future<List<Mention>> Function?(String)?)
final
onSearchTags → (Future<List<HashTag>> Function?(String)?)
final
position SuggestionPosition?
Which position to append the suggested list. defaults to SuggestionPosition.bottom.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
state SuggestionState
read / write
suggestionHeight double
write-only
suggestions List<Mention>
write-only

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clear({List<HashTag>? hash, List<Mention>? people, bool load = false}) → void
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).
@mustCallSuperinherited
emit(SuggestionState value) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
onChanged(String? value) → void
onuserselect(String item, TextEditingController controller) TextEditingController
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited

Operators

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