labelWidget property

Widget? labelWidget
final

Overrides the default label widget which is Text(label).

This sample shows how to override the default label Text widget with one that forces the menu entry to appear on one line by specifying Text.maxLines and Text.overflow.
link

To create a local project with this code sample, run:
flutter create --sample=material.DropdownMenuEntry.labelWidget.1 mysample

Implementation

final Widget? labelWidget;