Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: provide autovalidate params #18

Merged
merged 2 commits into from
Sep 24, 2024
Merged
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
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