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 .new(
    fieldStyle: field,
    composingTextStyle: field.contentTextStyle.map((s) => s.copyWith(decoration: .underline)),
    typeaheadTextStyle: field.contentTextStyle.map((s) => s.copyWith(color: colors.mutedForeground)),
    contentStyle: .inherit(colors: colors, typography: typography, style: style),
  );
}