CardStyle constructor

  1. @JsonSerializable(explicitToJson: true)
CardStyle({
  1. int? borderWidth,
  2. @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson) Color? backgroundColor,
  3. @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson) Color? borderColor,
  4. int? borderRadius,
  5. @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson) Color? cursorColor,
  6. @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson) Color? textColor,
  7. int? fontSize,
  8. String? fontFamily,
  9. @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson) Color? textErrorColor,
  10. @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson) Color? placeholderColor,
})

Implementation

@JsonSerializable(explicitToJson: true)
factory CardStyle({
  /// Width for the border.
  int? borderWidth,
  @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)

  /// Background color of the cardfield
  ///
  /// Make sure that there is enough contrast with the text color.
  Color? backgroundColor,
  @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)

  /// Border color of the cardfield.
  Color? borderColor,

  /// Borderradius that can give the Cardfield rounded corners.
  int? borderRadius,
  @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)

  /// Cursor color when the card has focus.
  Color? cursorColor,
  @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)

  /// Color of the typed text on the Card fuekd.
  Color? textColor,

  /// Font size.
  int? fontSize,

  /// Font family
  String? fontFamily,

  /// Color of the input in case incorrect data is entered.
  @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)
  Color? textErrorColor,
  @JsonKey(toJson: ColorKey.toJson, fromJson: ColorKey.fromJson)

  /// Color of the placeholder text.
  Color? placeholderColor,
}) = _CardStyleConstructor;