addStickerToRecentlyUsed method
Future
addStickerToRecentlyUsed({
- required GlobalKey<
StickerPickerWidgetState> key, - required Sticker sticker,
- KeyboardConfig keyboardConfig = const KeyboardConfig(),
Add a sticker to recently used list or increase its counter
Implementation
Future addStickerToRecentlyUsed({
required GlobalKey<StickerPickerWidgetState> key,
required Sticker sticker,
KeyboardConfig keyboardConfig = const KeyboardConfig(),
}) async {
return StickerPickerInternalUtils()
.addStickerToRecentlyUsed(sticker: sticker, config: keyboardConfig)
.then((recentStickerList) =>
key.currentState?.updateRecentSticker(recentStickerList));
}