feat: enhance RTextField by adding isFullHeight property for improved vertical layout control

This commit is contained in:
2025-12-15 09:08:20 +03:30
parent 7c8660c1d2
commit 24431b3514

View File

@@ -23,6 +23,7 @@ class RTextField extends StatefulWidget {
final BoxConstraints? boxConstraints; final BoxConstraints? boxConstraints;
final RTextFieldVariant variant; final RTextFieldVariant variant;
final bool filled; final bool filled;
final bool isFullHeight;
final Color? filledColor; final Color? filledColor;
final Color? borderColor; final Color? borderColor;
final bool showCounter; final bool showCounter;
@@ -92,6 +93,7 @@ class RTextField extends StatefulWidget {
this.prefixIcon, this.prefixIcon,
this.suffix, this.suffix,
this.boxConstraints, this.boxConstraints,
this.isFullHeight = false,
// 📐 Layout & appearance // 📐 Layout & appearance
this.borderColor, this.borderColor,
@@ -231,10 +233,10 @@ class _RTextFieldState extends State<RTextField> {
decoration: InputDecoration( decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric( contentPadding: EdgeInsets.symmetric(
horizontal: 16, horizontal: 16,
vertical: widget.height / 3, vertical: widget.isFullHeight ? widget.height / 3 : 0,
), ),
errorStyle: widget.errorStyle,
errorStyle: widget.errorStyle,
errorMaxLines: 1, errorMaxLines: 1,
isDense: widget.isDense, isDense: widget.isDense,
suffix: widget.suffix, suffix: widget.suffix,