hashtag method

Mention hashtag({
  1. required List<APISearcHashtagDetail> hashtagList,
  2. Color? textcolor,
})

Implementation

Mention hashtag(
    {required List<APISearcHashtagDetail> hashtagList, Color? textcolor}) {
  return Mention(
    trigger: '#',
    style: const TextStyle(color: Colors.blue),
    data: hashtagList.map((hashtag) => hashtag.toJson()).toList(),
    matchAll: false,
    suggestionBuilder: (data) {
      return ListTile(
        title: Text("#${data['display']} (${data["numberofuses"]})"),
        subtitle: Text(
          "Gündemdekiler",
          style: TextStyle(
            color: textcolor,
          ),
        ),
      );
    },
  );
}