Skip to content

CupertinoContextMenu on LongPressAnimation going behind the screen #122951

@gonciuu

Description

@gonciuu
  1. I would like to incorporate a CupertinoContextMenu into a CupertinoListTile in my Flutter application. However, upon performing a long press on the item, a portion of it disappears off-screen. How can I go about remedying this issue? Alternatively, is there a way to decrease the scale of the animation to resolve this problem?

Expected results: I would like to change CupertinoContextMenu animation

Actual results: Youtube video showing the bug

Code sample
 return CupertinoContextMenu(
      actions: [
        CupertinoContextMenuAction(
          child: const Text('Edit'),
          onPressed: () {
            //TODO: Handle the edit action
          },
        ),
        CupertinoContextMenuAction(
          child: const Text('Show'),
          onPressed: () {
            //TODO: Handle the show action
          },
        ),
      ],
      child: SizedBox(
        width: MediaQuery.of(context).size.width,
        child: CupertinoListTile(
          backgroundColor: CupertinoColors.white,
          padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
          title: Text(event.name, style: const TextStyle(fontSize: 20),),
          subtitle: Text(event.formattedDate, style: const TextStyle(fontSize: 16),),
          trailing: const CupertinoListTileChevron(),
        ),
      ),
    );
Logs
[✓] Flutter (Channel stable, 3.7.5, on macOS 13.2.1 22D68 darwin-arm64, locale pl-PL)
    • Flutter version 3.7.5 on channel stable at /Users/kacperwojak/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c07f788888 (3 weeks ago), 2023-02-22 17:52:33 -0600
    • Engine revision 0f359063c4
    • Dart version 2.19.2
    • DevTools version 2.20.1



[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3


Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsf: cupertinoflutter/packages/flutter/cupertino repositoryfound in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions