Skip to content
pubscout

chat_context_menu

4.2.0, released 5 weeks ago by jsontodart.cn

iOS-style chat context menus and selectable text widgets for Flutter applications.

WASM-ready
$ flutter pub add chat_context_menu
Source repository

What it does

Provides a customizable chat context menu widget with smooth animations, arrow indicators, positioning modes, and custom selectable text support. It handles positioning, background dimming, barrier cutouts, and popup layouts for chat bubbles or text.

AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a chat application and need an iOS-style context menu for messages.
  • You need customizable text selection with draggable handles and floating context menus.
  • You want to anchor popups either outside widget bounds or directly at pointer/touch coordinates.

Skip it when

  • You only need standard Material popup menus without custom chat animations or arrow indicators.
  • Your project does not use Flutter.

Strengths

  • Smooth animations and iOS-style design out of the box.
  • Supports multiple positioning modes including outside bounds and direct pointer coordinates.
  • Includes custom selectable text (`ChatSelectableText`) with desktop interactions like mouse drag and right-click.

Weaknesses

  • Limited primarily to chat context menus and selectable text rather than general-purpose UI component libraries.
  • Specific styling relies on custom wrappers and builders.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
ChatContextMenuWrapper(
  positionMode: ChatContextMenuPositionMode.outside,
  menuBuilder: (context, hideMenu) => MyMenuContent(onClose: hideMenu),
  widgetBuilder: (context, showMenu, hideMenu) {
    return GestureDetector(
      onLongPress: showMenu,
      child: const Text('Long press me'),
    );
  },
)

Alternatives

Packages that do the same job and could replace chat_context_menu.