customSlashCommand function

CharacterShortcutEvent customSlashCommand(
  1. List<SelectionMenuItem> items, {
  2. bool shouldInsertSlash = true,
  3. SelectionMenuStyle style = SelectionMenuStyle.light,
})

Implementation

CharacterShortcutEvent customSlashCommand(
  List<SelectionMenuItem> items, {
  bool shouldInsertSlash = true,
  SelectionMenuStyle style = SelectionMenuStyle.light,
}) {
  return CharacterShortcutEvent(
    key: 'show the slash menu',
    character: '/',
    handler: (editorState) => _showSlashMenu(
      editorState,
      items,
      shouldInsertSlash: shouldInsertSlash,
      style: style,
    ),
  );
}