Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions lib/Utilities/SizeConfig.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ class SizeConfig {

static double? width;
static double? height;
static double? spaceBetween;
}
10 changes: 8 additions & 2 deletions lib/flutter_pw_validator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class FlutterPwValidator extends StatefulWidget {
numericCharCount,
specialCharCount;
final Color defaultColor, successColor, failureColor;
final double width, height;
final double width, height, spaceBetween;
final Function onSuccess;
final Function? onFail;
final TextEditingController controller;
Expand All @@ -31,6 +31,7 @@ class FlutterPwValidator extends StatefulWidget {
required this.minLength,
required this.onSuccess,
required this.controller,
this.spaceBetween = 0,
this.uppercaseCharCount = 0,
this.lowercaseCharCount = 0,
this.numericCharCount = 0,
Expand All @@ -45,6 +46,7 @@ class FlutterPwValidator extends StatefulWidget {
//Initial entered size for global use
SizeConfig.width = width;
SizeConfig.height = height;
SizeConfig.spaceBetween = spaceBetween;
}

@override
Expand Down Expand Up @@ -168,7 +170,7 @@ class FlutterPwValidatorState extends State<FlutterPwValidator> {
width: SizeConfig.width,
height: widget.height,
child: new Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
children: [
new Flexible(
flex: 3,
Expand All @@ -188,6 +190,10 @@ class FlutterPwValidatorState extends State<FlutterPwValidator> {
],
),
),
new SizedBox(
width: SizeConfig.width,
height: SizeConfig.spaceBetween,
),
new Flexible(
flex: 7,
child: new Column(
Expand Down