build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Build the widget.

Implementation

@override
Widget build(final BuildContext context) {
  final newFunction = newCallback;
  final openFunction = openCallback;
  final deleteFunction = deleteCallback;
  final moveUpFunction = moveUpCallback;
  final moveDownFunction = moveDownCallback;
  final homeFunction = homeCallback;
  final endFunction = endCallback;
  final pageUpFunction = pageUpCallback;
  final pageDownFunction = pageDownCallback;
  final testFunction = testCallback;
  final backspaceFunction = backspaceCallback;
  final text = copyText;
  return CallbackShortcuts(
    bindings: {
      if (newFunction != null) newShortcut: newFunction,
      if (openFunction != null) openShortcut: openFunction,
      if (deleteFunction != null) deleteShortcut: deleteFunction,
      if (moveUpFunction != null) moveUpShortcut: moveUpFunction,
      if (moveDownFunction != null) moveDownShortcut: moveDownFunction,
      if (homeFunction != null) moveToStartShortcut: homeFunction,
      if (endFunction != null) moveToEndShortcut: endFunction,
      if (pageUpFunction != null) pageUpHotkey: pageUpFunction,
      if (pageDownFunction != null) pageDownHotkey: pageDownFunction,
      if (testFunction != null) testHotkey: testFunction,
      if (backspaceFunction != null) backspaceHotkey: backspaceFunction,
      if (text != null) copyHotkey: text.copyToClipboard,
    },
    child: child,
  );
}