style property

TextStyle? style

The text style to use for text in the dropdown button and the dropdown menu that appears when you tap the button.

To use a separate text style for selected item when it's displayed within the dropdown button, consider using selectedItemBuilder.

{@tool dartpad} This sample shows a DropdownButton with a dropdown button text style that is different than its menu items.

** See code in examples/api/lib/material/dropdown/ ** {@end-tool}

Defaults to the TextTheme.titleMedium value of the current ThemeData.textTheme of the current Theme.


final TextStyle? style;