buttonText method

TextStyle buttonText(
  1. BuildContext context,
  2. TextStyle base, {
  3. FontWeight weight = FontWeight.w600,
})

Label style for a button's textStyle: Material buttons do not inherit the surrounding text style, so without the host's labelLarge the label would fall back to the platform font instead of the app's.

Implementation

TextStyle buttonText(BuildContext context, TextStyle base, {FontWeight weight = FontWeight.w600}) {
  final own = text(base).copyWith(fontWeight: weight);
  return Theme.of(context).textTheme.labelLarge?.merge(own) ?? own;
}