themeStyleOf method

DropdownFieldTheme themeStyleOf(
  1. BuildContext context
)

Implementation

DropdownFieldTheme themeStyleOf(BuildContext context) {
  final theme = Theme.of(context);
  final formTheme = FormTheme.of(context);
  final fieldTheme = formTheme.dropdownTheme;
  final resolver = FieldThemeResolver(theme, formTheme, fieldTheme);

  final textStyle = this.textStyle ?? resolver.textStyle;
  final textOverflow =
      this.textOverflow ?? fieldTheme.textOverflow ?? TextOverflow.ellipsis;
  final maxLines = this.maxLines ?? fieldTheme.maxLines ?? 2;

  return DropdownFieldTheme(
    decorationTheme: resolver.decorationTheme,
    textStyle: textStyle,
    textColor: textColor ?? resolver.textColor,
    maxLines: maxLines,
    textOverflow: textOverflow,
    selectedTextStyle:
        selectedTextStyle ?? fieldTheme.selectedTextStyle ?? textStyle,
    selectedMaxLines:
        selectedMaxLines ?? fieldTheme.selectedMaxLines ?? maxLines,
  );
}