customSlashCommand function

CharacterShortcutEvent customSlashCommand(
  1. List<SelectionMenuItem> items, {
  2. bool shouldInsertSlash = true,
  3. bool deleteKeywordsByDefault = false,
  4. bool singleColumn = true,
  5. SelectionMenuStyle style = SelectionMenuStyle.light,
  6. Set<String> supportSlashMenuNodeTypes = _defaultSupportSlashMenuNodeTypes,
})

Implementation

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