ios_adaptive_context_menu 0.1.0 copy "ios_adaptive_context_menu: ^0.1.0" to clipboard
ios_adaptive_context_menu: ^0.1.0 copied to clipboard

PlatformiOS

Flutter plugin to show a native iOS context menu on single tap.

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
2
likes
140
points
86
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter plugin to show a native iOS context menu on single tap.

Repository (GitHub)
View/report issues

Topics

#ios #context-menu #flutter-plugin #cupertino

License

MIT (license)

Dependencies

flutter, svg_flutter

More

Packages that depend on ios_adaptive_context_menu

Packages that implement ios_adaptive_context_menu