Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions lib/src/flutter_verification_code.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ class VerificationCode extends StatefulWidget {
/// padding inside boxes
final EdgeInsets? padding;

/// Decoration of enable full borders
final OutlineInputBorder ? fullBorderEnabledDecoration ;

/// Decoration of Focused full borders
final OutlineInputBorder ? fullBorderFocusedDecoration ;

const VerificationCode({
Key? key,
required this.onCompleted,
Expand All @@ -70,6 +76,8 @@ class VerificationCode extends StatefulWidget {
this.underlineColor,
this.underlineUnfocusedColor,
this.fullBorder = false,
this.fullBorderEnabledDecoration ,
this.fullBorderFocusedDecoration,
this.fillColor,
this.underlineWidth,
this.textStyle = const TextStyle(fontSize: 25.0),
Expand Down Expand Up @@ -164,13 +172,13 @@ class _VerificationCodeState extends State<VerificationCode> {
final fullDecoration = InputDecoration(
fillColor: widget.fillColor,
filled: widget.fillColor != null ? true : false,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
enabledBorder: widget.fullBorderEnabledDecoration ?? OutlineInputBorder(
borderSide: BorderSide(
color: widget.underlineUnfocusedColor ?? Colors.grey,
width: widget.underlineWidth ?? 1,
),
),
focusedBorder: OutlineInputBorder(
focusedBorder: widget.fullBorderFocusedDecoration ?? OutlineInputBorder(
borderSide: BorderSide(
color: widget.underlineColor ?? Theme.of(context).primaryColor,
width: widget.underlineWidth ?? 1,
Expand Down