FAutocompleteStyle.inherit constructor

FAutocompleteStyle.inherit({
  1. required FColors colors,
  2. required FTypography typography,
  3. required FStyle style,
})

Creates a FAutocompleteStyle that inherits its properties.

Implementation

factory FAutocompleteStyle.inherit({
  required FColors colors,
  required FTypography typography,
  required FStyle style,
}) {
  final field = FTextFieldStyle.inherit(colors: colors, typography: typography, style: style);

  return FAutocompleteStyle(
    fieldStyle: field,
    composingTextStyle: field.contentTextStyle.map((s) => s.copyWith(decoration: TextDecoration.underline)),
    typeaheadTextStyle: field.contentTextStyle.map((s) => s.copyWith(color: colors.mutedForeground)),
    popoverStyle: FPopoverStyle.inherit(colors: colors, style: style),
    contentStyle: FAutocompleteContentStyle.inherit(colors: colors, typography: typography, style: style),
  );
}