ios_adaptive_context_menu

Flutter plugin for showing the native iOS context menu on single tap.

Features

  • Opens the iOS system context menu with a single tap.
  • Supports actions, dividers, and nested submenus.
  • Supports SF Symbols (iconSystemName) and SVG asset icons (iconAssetPath).
  • iOS-first behavior: on non-iOS platforms, the child is rendered as-is.

Requirements

  • Flutter >=3.13.0
  • iOS 14.0+

Installation

dependencies:
  ios_adaptive_context_menu: ^0.1.0

Run Example App

cd example
flutter pub get
flutter run -d ios

Usage

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

class DemoMenuButton extends StatelessWidget {
  const DemoMenuButton({super.key});

  @override
  Widget build(BuildContext context) {
    return IosSingleTapContextMenu(
      actions: const [
        IosContextMenuAction(
          id: 'share',
          title: 'Share',
          iconSystemName: 'square.and.arrow.up',
        ),
        IosContextMenuDivider(),
        IosContextMenuAction(
          id: 'delete',
          title: 'Delete',
          iconSystemName: 'trash',
          destructive: true,
        ),
      ],
      onSelected: (id) {
        debugPrint('Selected action: $id');
      },
      child: const ListTile(
        title: Text('Tap me'),
        subtitle: Text('Shows iOS native context menu'),
      ),
    );
  }
}

API

  • IosSingleTapContextMenu
  • IosContextMenuAction
  • IosContextMenuDivider
  • IosContextMenuSubmenu

Screenshots

iOS Android
iOS screenshot Android screenshot