Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@DeTuksa
Copy link
Contributor

@DeTuksa DeTuksa commented Dec 5, 2025

This PR addresses pasting images into the textfield and preserving pasting of text. #129

Mobile Check:

  • Pasting local images from context menu for android and iOS
  • Pasting web images from context menu for android and iOS
  • Pasting files from context menu for android and iOS

Desktop Check:

  • Pasting web and local images using Ctrl+V/CMD+V
  • Pasting web and local images using right-click
  • Pasting files using Ctrl+V/Cmd+V or right-click
  • Pasting web and local images from toolbar (Edit -> Paste)

Web Check:

  • Pasting web images using Ctrl+V
  • Pasting local images using Ctrl+V
  • Pasting files using Ctrl+V
  • Pasting files, web and local images from right-click
  • Pasting files, web and local images from toolbar (Edit -> Paste)

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read the [Flutter Style Guide] recently, and have followed its advice.
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 5, 2025

Still working on a way to bypass the toolbar paste and right-click paste on web

@csells
Copy link
Contributor

csells commented Dec 5, 2025

@gspencergoog can you help us out here?

@gspencergoog
Copy link

To run the workflows? Sure.

@csells
Copy link
Contributor

csells commented Dec 6, 2025

@gspencergoog cam upi help us figure out how to cover all of the basis for UI gestures, keyboard shortcuts and mouse gestures to enable image pasting across desktop, web and mobile as detailed here?

@gspencergoog
Copy link

Sorry, I'd like to, but I'm a bit busy at the moment. Maybe ask the framework team to help?

@csells
Copy link
Contributor

csells commented Dec 8, 2025

Thanks, @gspencergoog .

@Piinks -- any thoughts here? what's the right way to be able to paste an image in across platforms in Flutter and hit all of the UI gestures, e.g. Ctrl/Cmd+V, right-click Paste, menu Paste, etc.? thanks!

@Piinks
Copy link

Piinks commented Dec 8, 2025

Hey @csells! I am not sure I understand the question, what are you looking for help with?

@csells
Copy link
Contributor

csells commented Dec 8, 2025

Hey Kate! The PR adds support for pasting images and text from the clipboard across platforms (desktop, mobile, web) in Flutter. @DeTuksa lists the places that image-pasting works, but he's still working on covering all paste methods — particularly toolbar-paste and right-click paste on web.

So basically: how do we override right-click / toolbar Paste on the web so we can do an image paste?

@Piinks
Copy link

Piinks commented Dec 8, 2025

how do we override right-click / toolbar Paste on the web so we can do an image paste?

Good question! I do not know this. I will see if I can find out!

@loic-sharma
Copy link
Member

@csells Have you tried using the package super_clipboard? https://pub.dev/packages/super_clipboard

@csells
Copy link
Contributor

csells commented Dec 8, 2025

thanks, @loic-sharma . that looks pretty great! @DeTuksa do you want to take a look?

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 9, 2025

Sure, thanks @csells. I'll check it out

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 10, 2025

@csells the super_clipboard package came in really handy. Pasting now works across all platforms. On MacOS, pasting from Edit on toolbar still doesn't work, but the problem isn't limited to just pasting as it includes copying, cutting and select all.

@csells
Copy link
Contributor

csells commented Dec 10, 2025

oh jeez. good catch on the copy/paste issues on editing. is that something you can track down, too?

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 10, 2025

Totally. I'll dig into the issue as well and see what I can do.

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 14, 2025

Hey @csells, so been looking into the toolbar functionality issues on macOS and it appears deeper than initally suspected. Attempted creating a custom PlatformMenuBar erases the other existing Menu Bar items (a similar issue has been raised previously here).

@csells
Copy link
Contributor

csells commented Dec 14, 2025

for this to work properly, what we need is a macos plugin that can iterate over what a normal macos app gets in the menu bar (it changes with every release of the OS in my experience) and allows you to override the functionality as you choose. Does that code exist inside the Flutter framework that we can hijack and repurpose?

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 15, 2025

Okay that sounds good. Let me take a look and see if such code exist for us to use.

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 17, 2025

@csells after going through the flutter repo, there's no existing Flutter code that we could hijack and repurpose for this particular use case. Like you mentioned earlier, we would need a macos plugin for this.

@csells
Copy link
Contributor

csells commented Dec 18, 2025

I don't know if this is true, but Opus 4.5 says that you can handle the macOS menu items in one of several ways. Do you want to see if any of this works, @DeTuksa ?

How to Override macOS Menu Item Handlers in Flutter

You can customize or replace macOS menu item handlers using the PlatformMenuBar widget. Here's how:

1. Basic Custom Menu with Handlers

Use PlatformMenuBar to define your menu structure with custom onSelected callbacks:

Dart

import 'package:flutter/material. dart';
import 'package: flutter/services.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home:  Scaffold(
        body: PlatformMenuBar(
          menus: <PlatformMenuItem>[
            PlatformMenu(
              label: 'My App',
              menus: <PlatformMenuItem>[
                // Custom "About" handler (replaces default)
                PlatformMenuItem(
                  label: 'About My App',
                  onSelected:  () {
                    // Your custom handler here
                    showAboutDialog(
                      context:  context,
                      applicationName:  'My Custom App',
                      applicationVersion:  '2.0.0',
                    );
                  },
                ),
                // Custom menu item with keyboard shortcut
                PlatformMenuItem(
                  label: 'Custom Action',
                  shortcut: const SingleActivator(
                    LogicalKeyboardKey. keyN,
                    meta: true, // Cmd on macOS
                  ),
                  onSelected: () {
                    print('Custom action triggered!');
                  },
                ),
                // Use platform-provided Quit (standard behavior)
                if (PlatformProvidedMenuItem.hasMenu(
                  PlatformProvidedMenuItemType.quit,
                ))
                  const PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.quit,
                  ),
              ],
            ),
          ],
          child: YourAppContent(),
        ),
      ),
    );
  }
}

2. Using Platform-Provided Menu Items

For standard macOS menu items (About, Quit, Hide, etc.), use PlatformProvidedMenuItem:

Dart

PlatformMenu(
  label: 'App',
  menus: <PlatformMenuItem>[
    // Standard About dialog
    const PlatformProvidedMenuItem(
      type: PlatformProvidedMenuItemType.about,
    ),
    // Standard Quit
    const PlatformProvidedMenuItem(
      type: PlatformProvidedMenuItemType. quit,
    ),
    // Standard Services submenu
    const PlatformProvidedMenuItem(
      type:  PlatformProvidedMenuItemType.servicesSubmenu,
    ),
    // Standard Hide
    const PlatformProvidedMenuItem(
      type: PlatformProvidedMenuItemType.hide,
    ),
  ],
)

Available platform-provided menu types on macOS:

  • about - About dialog
  • quit - Quit app
  • servicesSubmenu - Services submenu
  • hide - Hide app
  • hideOtherApplications - Hide other apps
  • showAllApplications - Show all apps
  • startSpeaking / stopSpeaking - Text-to-speech
  • toggleFullScreen - Toggle fullscreen
  • minimizeWindow / zoomWindow / arrangeWindowsInFront - Window management

3. Complete Example with State Management

Here's a [full working example](https://github.com/flutter/flutter/blob/ef3dbceed24a4cf545d6b538916cbc8b44ce29d6/examples/api/lib/material/platform_menu_bar/platform_menu_bar.0.dart#L8-L142) from the Flutter repo:

Dart

class _PlatformMenuBarExampleState extends State<PlatformMenuBarExample> {
  String _message = 'Hello';
  bool _showMessage = false;

  void _handleMenuSelection(MenuSelection value) {
    switch (value) {
      case MenuSelection.about:
        showAboutDialog(
          context: context,
          applicationName: 'MenuBar Sample',
          applicationVersion: '1.0.0',
        );
      case MenuSelection.showMessage:
        setState(() {
          _showMessage = !_showMessage;
        });
    }
  }

  @override
  Widget build(BuildContext context) {
    return PlatformMenuBar(
      menus:  <PlatformMenuItem>[
        PlatformMenu(
          label: 'Flutter API Sample',
          menus: <PlatformMenuItem>[
            PlatformMenuItem(
              label: 'About',
              onSelected:  () => _handleMenuSelection(MenuSelection.about),
            ),
            PlatformMenuItem(
              label: _showMessage ? 'Hide Message' : 'Show Message',
              shortcut: const CharacterActivator('m'),
              onSelected: () => _handleMenuSelection(MenuSelection. showMessage),
            ),
            // Nested submenu
            PlatformMenu(
              label: 'Messages',
              menus: <PlatformMenuItem>[
                PlatformMenuItem(
                  label:  'Message 1',
                  shortcut: const SingleActivator(
                    LogicalKeyboardKey. digit1,
                    meta: true,
                  ),
                  onSelected: () {
                    setState(() => _message = 'Message 1');
                  },
                ),
              ],
            ),
          ],
        ),
      ],
      child: Center(child: Text(_showMessage ? _message : 'No message')),
    );
  }
}

4. Augmenting Existing Handlers

To augment rather than replace behavior, you can call custom code in your onSelected handler before/after the standard action:

Dart

PlatformMenuItem(
  label: 'Quit',
  onSelected: () async {
    // Custom pre-quit logic
    await saveAppState();
    print('App is quitting...');
    
    // Then quit (you'd need to implement this yourself)
    SystemNavigator.pop();
  },
)

Key Points:

  1. Complete replacement: When you define a PlatformMenuBar, it replaces the entire menu structure from MainMenu. xib
  2. onSelected callback: This is where your custom handler logic goes
  3. State management: Use setState if menu actions need to update UI
  4. Keyboard shortcuts: Use SingleActivator or CharacterActivator for shortcuts
  5. Check availability: Use PlatformProvidedMenuItem. hasMenu() to check if a menu type is supported

The PlatformMenuBar widget must be an ancestor of the widgets you want to interact with (typically at the app root level), so it has access to the context for dialogs, navigation, etc.

Note: Search results are limited. [View more examples on GitHub](https://github.com/flutter/flutter/search?q=PlatformMenuBar+onSelected&type=code).

You said: I don't want to replace the menubar

I don't want to replace the menubar in my app -- I want to provide augmented functionality for whatever menubar behavior is already there. specifically, I'd like to handle the Paste menu item to support image paste (which is not handled by default in Flutter).

60 references

Copilot said: Ah, that's a different scenario! You want

Ah, that's a different scenario! You want to intercept existing menu items (like Paste) rather than replace the entire menu bar. Unfortunately, Flutter's PlatformMenuBar is all-or-nothing - it replaces the entire menu structure.

For augmenting the existing Edit > Paste functionality specifically, you'll want to use platform channels to listen for paste events at a lower level. Here are your options:

Option 1: Listen for Paste Intent/Shortcut (Recommended)

Flutter has a Shortcuts and Actions system that can intercept paste commands:

Dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home:  Shortcuts(
        shortcuts: <ShortcutActivator, Intent>{
          // Intercept Cmd+V on macOS (Ctrl+V on other platforms)
          const SingleActivator(LogicalKeyboardKey.keyV, meta: true): const PasteIntent(),
        },
        child: Actions(
          actions: <Type, Action<Intent>>{
            PasteIntent: PasteImageAction(),
          },
          child: Focus(
            autofocus: true,
            child:  Scaffold(
              appBar: AppBar(title: Text('Image Paste Example')),
              body: MyImagePasteWidget(),
            ),
          ),
        ),
      ),
    );
  }
}

class PasteImageAction extends Action<PasteIntent> {
  @override
  Future<void> invoke(PasteIntent intent) async {
    // Try to get clipboard data
    final ClipboardData?  data = await Clipboard.getData('text/plain');
    
    // Check if clipboard has image data
    if (await Clipboard.hasStrings()) {
      // Handle text paste (default behavior)
      print('Pasting text:  ${data?.text}');
    }
    
    // For images, you'll need to use platform channels (see Option 2)
    await _handleImagePaste();
  }
  
  Future<void> _handleImagePaste() async {
    // Custom image paste logic here
    print('Checking for image in clipboard...');
  }
}

class MyImagePasteWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Text('Press Cmd+V to paste'),
    );
  }
}

However, this won't help with the Edit menu itself - it only intercepts the keyboard shortcut.

Option 2: Platform Channel for Clipboard Images (Better Solution)

Flutter's Clipboard API doesn't support images yet. You need a platform channel: Great! Now I have a much better understanding of the situation. Unfortunately, there isn't a straightforward way to intercept the Paste menu item without replacing the entire menu bar, but I can provide you with a workaround using a custom macOS plugin.

Solution: Create a Custom macOS Plugin to Handle Image Paste

Since you want to augment (not replace) the existing Paste behavior, you'll need to create a platform channel that intercepts clipboard access at the native macOS level. Here's how:

1. Create a Method Channel for Custom Paste Handling

In your Flutter app:

Dart

import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class CustomClipboardManager {
  static const MethodChannel _channel = MethodChannel('com.yourapp/custom_clipboard');

  // Check if clipboard contains an image
  static Future<bool> hasImage() async {
    if (! Platform.isMacOS) return false;
    try {
      final bool?  result = await _channel.invokeMethod('hasImage');
      return result ?? false;
    } catch (e) {
      return false;
    }
  }

  // Get image data from clipboard
  static Future<Uint8List?> getImage() async {
    if (!Platform.isMacOS) return null;
    try {
      final Uint8List? data = await _channel.invokeMethod('getImage');
      return data;
    } catch (e) {
      return null;
    }
  }

  // Handle paste with image support
  static Future<void> handlePaste(TextEditingController controller) async {
    // First check for image
    if (await hasImage()) {
      final imageData = await getImage();
      if (imageData != null) {
        // Handle your image paste here
        print('Got image: ${imageData.length} bytes');
        // You could show the image, save it, etc.
        return;
      }
    }
    
    // Fall back to text paste
    final ClipboardData?  data = await Clipboard.getData(Clipboard.kTextPlain);
    if (data != null && data.text != null) {
      final text = data.text!;
      final selection = controller.selection;
      controller.text = controller.text.replaceRange(
        selection.start,
        selection.end,
        text,
      );
      controller.selection = TextSelection.collapsed(
        offset: selection.start + text.length,
      );
    }
  }
}

2. Create the Native macOS Plugin Code

Create a file macos/Runner/CustomClipboardPlugin.swift:

Swift

import Cocoa
import FlutterMacOS
import AppKit

public class CustomClipboardPlugin: NSObject, FlutterPlugin {
  public static func register(with registrar: FlutterPluginRegistrar) {
    let channel = FlutterMethodChannel(
      name: "com.yourapp/custom_clipboard",
      binaryMessenger: registrar.messenger
    )
    let instance = CustomClipboardPlugin()
    registrar.addMethodCallDelegate(instance, channel: channel)
  }

  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
    switch call.method {
    case "hasImage":
      result(hasImage())
    case "getImage":
      if let imageData = getImageData() {
        result(FlutterStandardTypedData(bytes: imageData))
      } else {
        result(nil)
      }
    default: 
      result(FlutterMethodNotImplemented)
    }
  }

  private func hasImage() -> Bool {
    let pasteboard = NSPasteboard.general
    return pasteboard.canReadObject(forClasses: [NSImage.self], options: nil)
  }

  private func getImageData() -> Data? {
    let pasteboard = NSPasteboard.general
    
    // Try to get image data in various formats
    if let image = NSImage(pasteboard: pasteboard) {
      // Convert to PNG data
      guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
        return nil
      }
      
      let bitmapRep = NSBitmapImageRep(cgImage: cgImage)
      return bitmapRep.representation(using: . png, properties: [:])
    }
    
    // Or try to get raw image data
    if let imageData = pasteboard.data(forType: .tiff) {
      return imageData
    }
    
    if let imageData = pasteboard.data(forType: .png) {
      return imageData
    }
    
    return nil
  }
}

3. Register the Plugin

In macos/Runner/AppDelegate. swift:

Swift

import Cocoa
import FlutterMacOS

@main
class AppDelegate: FlutterAppDelegate {
  override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
    return true
  }
  
  override func applicationDidFinishLaunching(_ notification:  Notification) {
    let controller = mainFlutterWindow?.contentViewController as! FlutterViewController
    CustomClipboardPlugin.register(with: controller.engine.registrar(forPlugin: "CustomClipboardPlugin"))
  }
}

4. Override Paste Behavior in Your TextField

Now use it in your widgets:

Dart

class MyTextField extends StatefulWidget {
  @override
  State<MyTextField> createState() => _MyTextFieldState();
}

class _MyTextFieldState extends State<MyTextField> {
  final TextEditingController _controller = TextEditingController();
  final FocusNode _focusNode = FocusNode();

  @override
  Widget build(BuildContext context) {
    return TextField(
      controller:  _controller,
      focusNode: _focusNode,
      // Override keyboard shortcuts
      onKeyEvent: (FocusNode node, KeyEvent event) {
        // Intercept Cmd+V on macOS
        if (Platform.isMacOS &&
            event is KeyDownEvent &&
            event. logicalKey == LogicalKeyboardKey.keyV &&
            HardwareKeyboard.instance.isMetaPressed) {
          CustomClipboardManager.handlePaste(_controller);
          return KeyEventResult.handled;
        }
        return KeyEventResult.ignored;
      },
    );
  }
}

Alternative: Intercept at the Responder Level (More Complex)

If you need to truly intercept the Edit > Paste menu item (not just Cmd+V), you'd need to override the responder chain at the native level:

Create macos/Runner/CustomFlutterViewController.swift:

Swift

import Cocoa
import FlutterMacOS

class CustomFlutterViewController: FlutterViewController {
  override func paste(_ sender: Any?) {
    // Check for image in pasteboard
    let pasteboard = NSPasteboard. general
    
    if pasteboard.canReadObject(forClasses: [NSImage.self], options: nil) {
      // Handle image paste via method channel
      if let channel = self.engine?.registrar(forPlugin: "CustomClipboardPlugin") {
        let methodChannel = FlutterMethodChannel(
          name: "com.yourapp/custom_clipboard",
          binaryMessenger: channel.messenger
        )
        methodChannel.invokeMethod("onImagePasted", arguments: nil)
      }
    } else {
      // Call super for normal text paste
      super.paste(sender)
    }
  }
}

Then use this custom view controller in your MainFlutterWindow. swift.

Summary

The key insight: You cannot easily augment menu handlers without native code because:

  1. The Edit > Paste menu item routes through the responder chain
  2. Flutter's default text handling doesn't support images
  3. You need to intercept at the NSResponder level (native macOS)

The approach above:

  • ✅ Leaves the default menu intact
  • ✅ Adds image paste support via platform channel
  • ✅ Falls back to text paste for normal behavior
  • ✅ Works with both Cmd+V and Edit > Paste menu

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 18, 2025

Hey @csells, so been looking into the toolbar functionality issues on macOS and it appears deeper than initally suspected. Attempted creating a custom PlatformMenuBar erases the other existing Menu Bar items (a similar issue has been raised previously here).

@csells, solutions 1-3 are great. Replacing the macOS menu items works fine like I previously mentioned. However, when we take that approach we lose the original menu items. I have attached a screenshot of what it looks like. The code used is also attached below

For the Copilot solution of using Actions, that hasn't worked and from what I’ve been able to gather its because EditableText overrides the PasteTextIntent.

Native code would serve as the best bet, but since this is a package, there’s no room for that.

Should we proceed with the PlatformMenuBar as it is?

Screenshot 2025-12-18 at 08 43 17
@override
  Widget build(BuildContext context) {
    return PlatformMenuBar(
      menus: [
        PlatformMenu(
          label: 'Edit',
          menus: [
            PlatformMenuItemGroup(
              members: [
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.about))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.about,
                  ),
                PlatformMenuItem(
                  label: 'Paste',
                  shortcut: const SingleActivator(
                    LogicalKeyboardKey.keyV,
                    meta: true,
                  ),
                  onSelected: _handlePaste,
                ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.stopSpeaking))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.stopSpeaking,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.startSpeaking))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.startSpeaking,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.minimizeWindow))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.minimizeWindow,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.showAllApplications))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.showAllApplications,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.servicesSubmenu))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.servicesSubmenu,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.arrangeWindowsInFront))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.arrangeWindowsInFront,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.hide))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.hide,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.hideOtherApplications))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.hideOtherApplications,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.quit))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.quit,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.toggleFullScreen))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.toggleFullScreen,
                  ),
                if (PlatformProvidedMenuItem.hasMenu(PlatformProvidedMenuItemType.zoomWindow))
                  PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.zoomWindow,
                  ),
              ],
            ),
          ],
        ),
      ],
      child: CallbackShortcuts(
        bindings: <ShortcutActivator, VoidCallback>{
          const SingleActivator(LogicalKeyboardKey.enter):
              () => widget.onSubmitted(widget.controller.text),
          if (UniversalPlatform.isMacOS)
            const SingleActivator(LogicalKeyboardKey.keyV, meta: true):
                _handlePaste,
          if (UniversalPlatform.isWindows || UniversalPlatform.isLinux)
            const SingleActivator(LogicalKeyboardKey.keyV, control: true):
                _handlePaste,
        },
        child: _buildAdaptiveTextField(context),
      ),
    );
  }

@csells
Copy link
Contributor

csells commented Dec 18, 2025

can we build a separate package to allow us to override the existing implementations?

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 18, 2025

Yeah that's the best option right now. Already started working on one

@DeTuksa
Copy link
Contributor Author

DeTuksa commented Dec 18, 2025

Great news @csells, I've built the plugin and it works fine with the AI ToolKit 😅. Pasting now works from the default menu bar while still maintaining the original hierarchy and items.

@csells
Copy link
Contributor

csells commented Dec 18, 2025

Nice!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants