FTextFieldStateStyle.inherit constructor

FTextFieldStateStyle.inherit({
  1. required Color contentColor,
  2. required Color hintColor,
  3. required Color focusedBorderColor,
  4. required Color unfocusedBorderColor,
  5. required FFormFieldStyle formFieldStyle,
  6. required FTypography typography,
  7. required FStyle style,
})

Creates a FTextFieldStateStyle that inherits its properties.

Implementation

FTextFieldStateStyle.inherit({
  required Color contentColor,
  required Color hintColor,
  required Color focusedBorderColor,
  required Color unfocusedBorderColor,
  required FFormFieldStyle formFieldStyle,
  required FTypography typography,
  required FStyle style,
}) : this(
        labelTextStyle: formFieldStyle.labelTextStyle,
        contentTextStyle: typography.sm.copyWith(
          fontFamily: typography.defaultFontFamily,
          color: contentColor,
        ),
        hintTextStyle: typography.sm.copyWith(
          fontFamily: typography.defaultFontFamily,
          color: hintColor,
        ),
        descriptionTextStyle: formFieldStyle.descriptionTextStyle,
        focusedStyle: FTextFieldBorderStyle.inherit(color: focusedBorderColor, style: style),
        unfocusedStyle: FTextFieldBorderStyle.inherit(color: unfocusedBorderColor, style: style),
      );