|
|
@ -77,7 +77,7 @@ class TextFields extends StatefulWidget {
|
|
|
|
this.hasBorder = true,
|
|
|
|
this.hasBorder = true,
|
|
|
|
this.onTapTextFields,
|
|
|
|
this.onTapTextFields,
|
|
|
|
this.hasLabelText = false,
|
|
|
|
this.hasLabelText = false,
|
|
|
|
this.showLabelText = false})
|
|
|
|
this.showLabelText = false, this.borderRadius= 8.0})
|
|
|
|
: super(key: key);
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
final String hintText;
|
|
|
|
final String hintText;
|
|
|
@ -116,6 +116,8 @@ class TextFields extends StatefulWidget {
|
|
|
|
final Color fillColor;
|
|
|
|
final Color fillColor;
|
|
|
|
final bool hasBorder;
|
|
|
|
final bool hasBorder;
|
|
|
|
final bool showLabelText;
|
|
|
|
final bool showLabelText;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final double borderRadius;
|
|
|
|
bool hasLabelText;
|
|
|
|
bool hasLabelText;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -276,6 +278,7 @@ class _TextFieldsState extends State<TextFields> {
|
|
|
|
hintText: widget.hintText,
|
|
|
|
hintText: widget.hintText,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
fontSize: widget.fontSize,
|
|
|
|
fontSize: widget.fontSize,
|
|
|
|
|
|
|
|
|
|
|
|
fontWeight: widget.fontWeight,
|
|
|
|
fontWeight: widget.fontWeight,
|
|
|
|
color: widget.hintColor ?? Theme.of(context).hintColor,
|
|
|
|
color: widget.hintColor ?? Theme.of(context).hintColor,
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -304,7 +307,7 @@ class _TextFieldsState extends State<TextFields> {
|
|
|
|
width: 1.0)
|
|
|
|
width: 1.0)
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
|
|
|
|
: BorderRadius.circular(0.0),
|
|
|
|
: BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
focusedErrorBorder: OutlineInputBorder(
|
|
|
|
focusedErrorBorder: OutlineInputBorder(
|
|
|
@ -315,13 +318,13 @@ class _TextFieldsState extends State<TextFields> {
|
|
|
|
.withOpacity(widget.bare ? 0.0 : 0.5),
|
|
|
|
.withOpacity(widget.bare ? 0.0 : 0.5),
|
|
|
|
width: 1.0)
|
|
|
|
width: 1.0)
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
|
|
|
|
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)),
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: widget.hasBorder
|
|
|
|
borderSide: widget.hasBorder
|
|
|
|
? BorderSide(color: Colors.grey, width: 1.0)
|
|
|
|
? BorderSide(color: Colors.grey, width: 1.0)
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
|
|
|
|
: BorderRadius.circular(0.0),
|
|
|
|
: BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
disabledBorder: OutlineInputBorder(
|
|
|
|
disabledBorder: OutlineInputBorder(
|
|
|
@ -329,14 +332,14 @@ class _TextFieldsState extends State<TextFields> {
|
|
|
|
? BorderSide(color: Colors.grey, width: 1.0)
|
|
|
|
? BorderSide(color: Colors.grey, width: 1.0)
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
|
|
|
|
: BorderRadius.circular(0.0)),
|
|
|
|
: BorderRadius.circular(0.0)),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: widget.hasBorder
|
|
|
|
borderSide: widget.hasBorder
|
|
|
|
? BorderSide(color: Colors.grey, width: 1.0)
|
|
|
|
? BorderSide(color: Colors.grey, width: 1.0)
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
: BorderSide(color: Colors.transparent, width: 0),
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
borderRadius: widget.hasBorder
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : 8.0)
|
|
|
|
? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
|
|
|
|
: BorderRadius.circular(0.0),
|
|
|
|
: BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|