Skip to content

Commit

Permalink
Merge pull request #18 from Nuxify/bugfix/provide-autovalidate-params
Browse files Browse the repository at this point in the history
fix: provide autovalidate params
  • Loading branch information
JosesGabriel authored Sep 24, 2024
2 parents a8526fc + a26abbc commit c078d81
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.nuxifyWidgetbook.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
Expand All @@ -528,7 +528,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.nuxifyWidgetbook.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -544,7 +544,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.3.0;
MARKETING_VERSION = 1.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.nuxifyWidgetbook.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
10 changes: 10 additions & 0 deletions lib/input/filled_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ class FilledTextField extends StatelessWidget {
/// [readOnly] Whether the text field is read-only.
///
/// [onTap] A callback that is called when the text field is tapped.
///
/// [keyboardType] Whether the keyboard layout uses num pad or alphabets
///
/// [autovalidateMode] Determine if input user is valid according to set mode
const FilledTextField({
this.controller,
this.fillColor,
Expand Down Expand Up @@ -83,6 +87,8 @@ class FilledTextField extends StatelessWidget {
this.focusNode,
this.inputFormatters,
this.readOnly = false,
this.keyboardType,
this.autovalidateMode,
this.onTap,
super.key,
});
Expand Down Expand Up @@ -112,6 +118,8 @@ class FilledTextField extends StatelessWidget {
final FocusNode? focusNode;
final bool readOnly;
final Function()? onTap;
final TextInputType? keyboardType;
final AutovalidateMode? autovalidateMode;

@override
Widget build(BuildContext context) {
Expand All @@ -128,6 +136,8 @@ class FilledTextField extends StatelessWidget {
textInputAction: textInputAction,
onFieldSubmitted: onFieldSubmitted,
inputFormatters: inputFormatters,
keyboardType: keyboardType,
autovalidateMode: autovalidateMode,
decoration: InputDecoration(
enabled: enabled,
prefixIcon: prefix,
Expand Down
10 changes: 10 additions & 0 deletions lib/input/outlined_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ class OutlinedTextField extends StatelessWidget {
/// [readOnly] Whether the text field is read-only.
///
/// [onTap] A callback that is called when the text field is tapped.
///
/// [keyboardType] Whether the keyboard layout uses num pad or alphabets
///
/// [autovalidateMode] Determine if input user is valid according to set mode
const OutlinedTextField({
this.controller,
this.borderRadius = 30,
Expand Down Expand Up @@ -90,6 +94,8 @@ class OutlinedTextField extends StatelessWidget {
this.focusNode,
this.readOnly = false,
this.onTap,
this.keyboardType,
this.autovalidateMode,
super.key,
});

Expand Down Expand Up @@ -120,6 +126,8 @@ class OutlinedTextField extends StatelessWidget {
final FocusNode? focusNode;
final bool readOnly;
final Function()? onTap;
final TextInputType? keyboardType;
final AutovalidateMode? autovalidateMode;

@override
Widget build(BuildContext context) {
Expand All @@ -136,6 +144,8 @@ class OutlinedTextField extends StatelessWidget {
onFieldSubmitted: onFieldSubmitted,
inputFormatters: inputFormatters,
focusNode: focusNode,
keyboardType: keyboardType,
autovalidateMode: autovalidateMode,
decoration: InputDecoration(
enabled: enabled,
counterText: counterText,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: nuxify_widgetbook
description: "A new Flutter project."
publish_to: "none"
version: 1.4.0
version: 1.5.0

environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion widgetbook/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: widgetbook_workspace
description: "A new Flutter project."
publish_to: 'none'
version: 1.3.0
version: 1.5.0

environment:
sdk: '>=3.3.4 <4.0.0'
Expand Down

0 comments on commit c078d81

Please sign in to comment.