This commit is contained in:
2026-04-21 19:16:41 +02:00
parent 497e8eb867
commit 2b0980799f
12 changed files with 247 additions and 101 deletions

View File

@@ -4,6 +4,7 @@ import 'package:flux/core/theme/theme.dart';
class FluxTextField extends StatefulWidget {
final String label;
final String? labelText;
final IconData? icon;
final bool isPassword;
final bool autoFocus;
@@ -19,6 +20,7 @@ class FluxTextField extends StatefulWidget {
const FluxTextField({
super.key, // Usiamo super.key per Flutter moderno
required this.label,
this.labelText,
this.icon,
this.isPassword = false,
this.autoFocus = false,
@@ -60,11 +62,11 @@ class _FluxTextFieldState extends State<FluxTextField> {
maxLines: widget.minLines != null ? null : widget.maxLines,
style: TextStyle(color: context.primaryText),
decoration: InputDecoration(
prefixIcon: Icon(
widget.icon,
color: context.accent.withValues(alpha: 0.6),
),
labelText: widget.label,
prefixIcon: widget.icon != null
? Icon(widget.icon, color: context.accent.withValues(alpha: 0.6))
: null,
labelText: widget.labelText ?? widget.label,
labelStyle: TextStyle(color: context.secondaryText, fontSize: 14),
filled: true,
fillColor: context.surface.withValues(alpha: 0.5),