SuggestionController class

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)?, Color? borderColor})

Properties

borderColor Color?
final
containerMaxHeight double
final
hashCode int
The hash code for this object.
no setterinherited
hashtags List<HashTag>
no getter
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.
no setterinherited
initalTags List<HashTag>?
final
intialMentions List<Mention>?
final
itemHeight double
height of the suggestion item
final
last String?
no getter
loading bool
no getter
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.
no setterinherited
state SuggestionState
getter/setter pair
suggestionHeight double
no getter
suggestions List<Mention>
no getter

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).
inherited
emit(SuggestionState value) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
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