open method

Future<void> open({
  1. bool openFromStack = true,
  2. bool viewGif = true,
  3. bool viewEmoji = true,
  4. required String id,
})

Implementation

Future<void> open(
    {bool openFromStack = true,
    bool viewGif = true,
    bool viewEmoji = true,
    required String id}) async {
  if (isOpened && currentMenu!.id != id) {
    close(updateState: false);
  }
  if (Get.find<KeyboardController>().isOpen) {
    await SystemChannels.textInput.invokeMethod('TextInput.hide');
    await Future.delayed(const Duration(milliseconds: 200));
  }
  currentMenu = menus.singleWhere((element) => element.id == id);
  currentMenu!.viewEmoji = viewEmoji;
  currentMenu!.viewGif = viewGif;
  print("currentMenuHere:$currentMenu");
  update();
  await Future.delayed(const Duration(milliseconds: 200));
  currentMenu!.focus();
}