toolbarButtons static method

List<EmbedButtonBuilder> toolbarButtons({
  1. QuillToolbarImageButtonOptions? imageButtonOptions = const QuillToolbarImageButtonOptions(),
  2. QuillToolbarVideoButtonOptions? videoButtonOptions = const QuillToolbarVideoButtonOptions(),
  3. QuillToolbarCameraButtonOptions? cameraButtonOptions,
  4. QuillToolbarTableButtonOptions? tableButtonOptions,
  5. @Deprecated('Media button has been removed, the value of this parameter will be ignored') QuillToolbarMediaButtonOptions? mediaButtonOptions,
})

Returns a list of embed button builders to customize the toolbar buttons.

If you don't want to show one of the buttons for soem reason, pass null to the options of it

The returned list contains embed button builders for the Quill toolbar.

Implementation

static List<fq.EmbedButtonBuilder> toolbarButtons({
  QuillToolbarImageButtonOptions? imageButtonOptions =
      const QuillToolbarImageButtonOptions(),
  QuillToolbarVideoButtonOptions? videoButtonOptions =
      const QuillToolbarVideoButtonOptions(),
  QuillToolbarCameraButtonOptions? cameraButtonOptions,
  QuillToolbarTableButtonOptions? tableButtonOptions,
  @Deprecated(
    'Media button has been removed, the value of this parameter will be ignored',
  )
  QuillToolbarMediaButtonOptions? mediaButtonOptions,
}) =>
    [
      if (imageButtonOptions != null)
        (controller, toolbarIconSize, iconTheme, dialogTheme) =>
            QuillToolbarImageButton(
              controller: controller,
              options: imageButtonOptions,
            ),
      if (videoButtonOptions != null)
        (controller, toolbarIconSize, iconTheme, dialogTheme) =>
            QuillToolbarVideoButton(
              controller: controller,
              options: videoButtonOptions,
            ),
      if (cameraButtonOptions != null)
        (controller, toolbarIconSize, iconTheme, dialogTheme) =>
            QuillToolbarCameraButton(
              controller: controller,
              options: cameraButtonOptions,
            ),
      if (tableButtonOptions != null)
        (controller, toolbarIconSize, iconTheme, dialogTheme) =>
            QuillToolbarTableButton(
              controller: controller,
              options: tableButtonOptions,
            ),
    ];