PdfFormStyle class
Style configuration for PDF form field overlays.
This class allows customization of the appearance of form fields rendered by PdfFormViewer.
Example:
PdfFormStyle(
borderRadius: 4,
borderColor: Colors.blue,
fillColor: Colors.yellow.withOpacity(0.3),
textStyle: TextStyle(fontFamily: 'Courier'),
)
To use your app's theme, you can extract styles from ThemeData:
PdfFormStyle.fromTheme(Theme.of(context))
- Annotations
Constructors
- PdfFormStyle({double borderRadius = 2, Color? borderColor, Color? activeBorderColor, Color? fillColor, Color? activeFillColor, Color? readOnlyFillColor, TextStyle? textStyle, TextStyle? readOnlyTextStyle, Color? cursorColor, Color? selectionColor, Color? checkColor, Color? checkedFillColor})
-
Creates a PdfFormStyle with custom values.
const
- PdfFormStyle.fromTheme(ThemeData theme)
-
Creates a PdfFormStyle from a ThemeData.
factory
Properties
- activeBorderColor → Color?
-
The border color when a field is active/focused.
final
- activeFillColor → Color?
-
The background fill color when a field is active/focused.
final
- borderColor → Color?
-
The border color of form fields.
final
- borderRadius → double
-
The border radius of form fields.
final
- checkColor → Color?
-
The color of the checkmark in checkbox fields.
final
- checkedFillColor → Color?
-
The background fill color of checked checkbox fields.
final
- cursorColor → Color?
-
The cursor color for text fields.
final
- effectiveActiveBorderColor → Color
-
Returns the effective active border color, using default if not specified.
no setter
- effectiveActiveFillColor → Color
-
Returns the effective active fill color, using default if not specified.
no setter
- effectiveBorderColor → Color
-
Returns the effective border color, using default if not specified.
no setter
- effectiveCheckColor → Color
-
Returns the effective check color, using default if not specified.
no setter
- effectiveCheckedFillColor → Color
-
Returns the effective checked fill color, using default if not specified.
no setter
- effectiveCursorColor → Color
-
Returns the effective cursor color, using default if not specified.
no setter
- effectiveFillColor → Color
-
Returns the effective fill color, using default if not specified.
no setter
- effectiveReadOnlyFillColor → Color
-
Returns the effective read-only fill color, using default if not specified.
no setter
- effectiveSelectionColor → Color
-
Returns the effective selection color, using default if not specified.
no setter
- fillColor → Color?
-
The background fill color of form fields.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- readOnlyFillColor → Color?
-
The background fill color for read-only fields.
final
- readOnlyTextStyle → TextStyle?
-
The text style for read-only form fields.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
The selection highlight color for text fields.
final
- textStyle → TextStyle?
-
The text style for editable form fields.
final
Methods
-
copyWith(
{double? borderRadius, Color? borderColor, Color? activeBorderColor, Color? fillColor, Color? activeFillColor, Color? readOnlyFillColor, TextStyle? textStyle, TextStyle? readOnlyTextStyle, Color? cursorColor, Color? selectionColor, Color? checkColor, Color? checkedFillColor}) → PdfFormStyle - Creates a copy of this style with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultStyle → const PdfFormStyle
- Default style with PDF-like appearance.