[FEAT] Added hover and focus colors for fields

This commit is contained in:
2026-01-15 13:55:36 +02:00
parent 74b758bab2
commit 513c5c09dd
2 changed files with 12 additions and 3 deletions

View File

@@ -261,6 +261,8 @@ class _AstromicFieldBaseState extends State<AstromicFieldBase> {
//s1 -- Style //s1 -- Style
filled: _style().isFilled, filled: _style().isFilled,
fillColor: _style().fillColor, fillColor: _style().fillColor,
hoverColor: _style().hoverColor,
focusColor:_style().focusColor ,
// //
hintStyle: _style().hintStyle, hintStyle: _style().hintStyle,
// //

View File

@@ -3,7 +3,6 @@ import '../enums/border_type.enum.dart';
/// Styling model for the field element. /// Styling model for the field element.
class AstromicFieldStyle { class AstromicFieldStyle {
const AstromicFieldStyle({ const AstromicFieldStyle({
this.isFilled = true, this.isFilled = true,
// //
@@ -27,7 +26,9 @@ class AstromicFieldStyle {
this.suffixSpacing = 4, this.suffixSpacing = 4,
this.suffixSize = 24, this.suffixSize = 24,
// //
this.fillColor = const Color(0xffffffff), this.fillColor,
this.hoverColor,
this.focusColor,
this.borderColor, this.borderColor,
this.borderGradient, this.borderGradient,
this.cursorColor, this.cursorColor,
@@ -63,7 +64,9 @@ class AstromicFieldStyle {
final double suffixSize; final double suffixSize;
// //
//s1 - Colors //s1 - Colors
final Color fillColor; final Color? fillColor;
final Color? hoverColor;
final Color? focusColor;
final Color? cursorColor; final Color? cursorColor;
final Color? cursorErrorColor; final Color? cursorErrorColor;
final Color? borderColor; final Color? borderColor;
@@ -93,6 +96,8 @@ class AstromicFieldStyle {
double? suffixSize, double? suffixSize,
CrossAxisAlignment? suffixAlignment, CrossAxisAlignment? suffixAlignment,
Color? fillColor, Color? fillColor,
Color? hoverColor,
Color? focusColor,
Color? cursorColor, Color? cursorColor,
Color? cursorErrorColor, Color? cursorErrorColor,
Color? borderColor, Color? borderColor,
@@ -119,6 +124,8 @@ class AstromicFieldStyle {
suffixSpacing: suffixSpacing ?? this.suffixSpacing, suffixSpacing: suffixSpacing ?? this.suffixSpacing,
suffixSize: suffixSize ?? this.suffixSize, suffixSize: suffixSize ?? this.suffixSize,
fillColor: fillColor ?? this.fillColor, fillColor: fillColor ?? this.fillColor,
hoverColor: hoverColor ?? this.hoverColor,
focusColor: focusColor ?? this.focusColor,
cursorColor: cursorColor ?? this.cursorColor, cursorColor: cursorColor ?? this.cursorColor,
cursorErrorColor: cursorErrorColor ?? this.cursorErrorColor, cursorErrorColor: cursorErrorColor ?? this.cursorErrorColor,
borderColor: borderColor ?? this.borderColor, borderColor: borderColor ?? this.borderColor,