fdds
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user