MentionTextController constructor

MentionTextController({
  1. required ValueNotifier<MentionModel?> lastMention,
  2. String tag = kAtSymbol,
  3. String? text,
})

Controller to track the mentions.

Parameters:

  • lastMention - last editable mention.
  • tag - is the symbol by which mention will be made. Default value is '@'. Must contain only one non-whitespace character.

Implementation

MentionTextController({
  required this.lastMention,
  this.tag = kAtSymbol,
  super.text,
}) : assert(
        tag != ' ' && tag.length == 1,
        "The tag can't be a space and have a length greater than 1",
      ) {
  addListener(_textControllerListener);
}