FamTheme class

Theme data for FAM UI components.

FamTheme(
  primaryColor: Colors.blue,
  backgroundColor: Colors.white,
  errorColor: Colors.red,
  borderRadius: 8.0,
)

Constructors

FamTheme({Color primaryColor = const Color(0xFF6772E5), Color backgroundColor = Colors.white, Color surfaceColor = const Color(0xFFF7F8F9), Color textColor = const Color(0xFF32325D), Color secondaryTextColor = const Color(0xFF8898AA), Color errorColor = const Color(0xFFFA755A), Color successColor = const Color(0xFF24B47E), Color borderColor = const Color(0xFFE6EBF1), Color focusBorderColor = const Color(0xFF6772E5), double borderRadius = 8.0, double borderWidth = 1.0, EdgeInsets inputPadding = const EdgeInsets.symmetric(horizontal: 12.0, vertical: 16.0), String? fontFamily, TextStyle? labelStyle, TextStyle? inputStyle, TextStyle? hintStyle, TextStyle? errorStyle, ButtonStyle? buttonStyle, TextStyle? buttonTextStyle})
Creates a FAM theme.
const
FamTheme.dark()
Creates a dark theme variant.
factory

Properties

backgroundColor Color
Background color for cards/sheets.
final
borderColor Color
Default border color.
final
borderRadius double
Border radius for inputs and buttons.
final
borderWidth double
Border width.
final
buttonStyle ButtonStyle?
Custom button style.
final
buttonTextStyle TextStyle?
Custom button text style.
final
errorColor Color
Error state color.
final
errorStyle TextStyle?
Custom error text style.
final
focusBorderColor Color
Focused border color.
final
fontFamily String?
Custom font family.
final
hashCode int
The hash code for this object.
no setterinherited
hintStyle TextStyle?
Custom hint text style.
final
inputPadding EdgeInsets
Padding inside input fields.
final
inputStyle TextStyle?
Custom input text style.
final
labelStyle TextStyle?
Custom label text style.
final
primaryColor Color
Primary brand color.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryTextColor Color
Secondary/hint text color.
final
successColor Color
Success state color.
final
surfaceColor Color
Surface color for input fields.
final
textColor Color
Primary text color.
final

Methods

copyWith({Color? primaryColor, Color? backgroundColor, Color? surfaceColor, Color? textColor, Color? secondaryTextColor, Color? errorColor, Color? successColor, Color? borderColor, Color? focusBorderColor, double? borderRadius, double? borderWidth, EdgeInsets? inputPadding, String? fontFamily, TextStyle? labelStyle, TextStyle? inputStyle, TextStyle? hintStyle, TextStyle? errorStyle, ButtonStyle? buttonStyle, TextStyle? buttonTextStyle}) FamTheme
Creates a copy with updated values.
getEffectiveButtonStyle(BuildContext context) ButtonStyle
Gets the effective button style.
getEffectiveErrorStyle(BuildContext context) TextStyle
Gets the effective error style.
getEffectiveHintStyle(BuildContext context) TextStyle
Gets the effective hint style.
getEffectiveInputStyle(BuildContext context) TextStyle
Gets the effective input style.
getEffectiveLabelStyle(BuildContext context) TextStyle
Gets the effective label style.
getInputDecoration({String? labelText, String? hintText, String? errorText, Widget? prefixIcon, Widget? suffixIcon, bool isFocused = false, bool hasError = false}) InputDecoration
Gets the default input decoration.
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