Skip to content

InkWell overflows in PopupMenuItem #107215

@BananaMasterz

Description

@BananaMasterz

Steps to Reproduce

  1. Execute flutter run on the code sample
  2. Tap the menu button and then hove over the action.

Expected results:
InkWell to be clipped according to PopupMenuThemeData shape.

Actual results:
As seen in the screenshots, the inkwell overflows the popup

Note: This is tested in stable channel 3.0.3. Not sure if fixed in master.

image

Code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      theme: ThemeData(
        popupMenuTheme: const PopupMenuThemeData(
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(
              Radius.circular(40),
            ),
          ),
        ),
      ),
      home: Scaffold(
        body: Center(
          child: PopupMenuButton(
            itemBuilder: (BuildContext context) {
              return [PopupMenuItem(child: Text('Some action'))];
            },
          ),
        ),
      ),
    );
  }
}
Flutter doctor

[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.25151.1010], locale el-GR)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.4)
[√] Android Studio (version 2021.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

Metadata

Metadata

Assignees

Labels

a: qualityA truly polished experiencef: material designflutter/packages/flutter/material repository.found in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions