Skip to content

Commit 4841d9f

Browse files
authored
Merge pull request awaik#20 from tomaash/master
One more theming option
2 parents 82ce476 + 331df84 commit 4841d9f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/flutter_verification_code.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class VerificationCode extends StatefulWidget {
2222

2323
/// the color for underline when not focused, grey by default
2424
final Color? underlineUnfocusedColor;
25+
26+
/// the color for TextField background
27+
final Color? fillColor;
2528

2629
/// the line width for underline
2730
final double? underlineWidth;
@@ -46,6 +49,7 @@ class VerificationCode extends StatefulWidget {
4649
this.itemSize = 50,
4750
this.underlineColor,
4851
this.underlineUnfocusedColor,
52+
this.fillColor,
4953
this.underlineWidth,
5054
this.textStyle = const TextStyle(fontSize: 25.0),
5155
this.autofocus = false,
@@ -101,6 +105,7 @@ class _VerificationCodeState extends State<VerificationCode> {
101105
autofocus: widget.autofocus,
102106
style: widget.textStyle,
103107
decoration: InputDecoration(
108+
fillColor: widget.fillColor,
104109
enabledBorder: UnderlineInputBorder(
105110
borderSide: BorderSide(
106111
color: widget.underlineUnfocusedColor ?? Colors.grey,

0 commit comments

Comments
 (0)