Skip to content

styling PopupMenuDivider divider color #68176

@pishguy

Description

@pishguy

in this simple implementation code i added some PopupMenuButton items into AppBar actions argument and now i want to styling PopupMenuDivider color which that have default color.

i try to use ThemeData but i get error:

ThemeData(
  child: const PopupMenuDivider(
    height: 10,
  ),
),

my code:

PopupMenuButton<int>(
  onSelected: null,
  icon: const Icon(Icons.more_vert),
  color: const Color(0xFF32313C).withOpacity(0.9),
  elevation: 8.0,
  shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)),
  itemBuilder: (context) {
    final list = <PopupMenuEntry<int>>[];
    list.add(
      PopupMenuItem(
        child: Row(
          children: [
            Icon(Icons.add, color: Colors.white),
            Text(
              "InduceSmile.com",
              style: TextStyle(color: Colors.white),
            ).pl(16.0),
          ],
        ),
      ),
    );
    list.add(
      const PopupMenuDivider(
        height: 10,
      ),
    );
    return list;
  },
offset: Offset(0, 100),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions