It says docs.flutter.dev/menus-text-style:
The default text style for MenuItemButton […] is TextTheme.labelLarge for Material 3.
If I now want to add a Text
widget in a Column
with several MenuItemButtons
in such a way that the TextStyle
is equalized, I could write:
Column(
children: [
Text(
'some text',
style: Theme.of(context).textTheme.labelLarge,
),
MenuItemButton(child: Text('some text'),
MenuItemButton(child: Text('some text'),
],
),
Is it possible to programmatically determine the TextStyle
of MenuItemButtons
(Material 3, “neutral” WidgetState
)?
New contributor
Stefan Wurzelsand is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.