Skip to content

Commit

Permalink
reactive_input_decorator 0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilich6107 committed Nov 5, 2024
1 parent e67f2b2 commit 3a9299e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
4 changes: 4 additions & 0 deletions packages/reactive_input_decorator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.7

* fix: properly apply default text style for error builder

## 0.0.6

* `errorBuilder`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,30 +117,30 @@ class ReactiveInputDecorator extends ReactiveFormField<dynamic, dynamic> {
return IgnorePointer(
ignoring: !field.control.enabled,
child: Listener(
onPointerDown: markAsTouched == MarkAsTouched.pointerDown ? (_) => field.control.markAsTouched() : null,
onPointerUp: markAsTouched == MarkAsTouched.pointerUp ? (_) => field.control.markAsTouched() : null,
onPointerDown: markAsTouched == MarkAsTouched.pointerDown
? (_) => field.control.markAsTouched()
: null,
onPointerUp: markAsTouched == MarkAsTouched.pointerUp
? (_) => field.control.markAsTouched()
: null,
child: InputDecorator(
decoration: effectiveDecoration.copyWith(
errorText: errorBuilder == null ? field.errorText : null,
enabled: field.control.enabled,
errorText: errorBuilder == null ? field.errorText : null,
enabled: field.control.enabled,
error: errorBuilder != null && errorText != null
? DefaultTextStyle(
style: Theme.of(field.context)
.textTheme
.bodySmall
?.copyWith(
color:
Theme.of(field.context).colorScheme.error,
) ??
const TextStyle(),
child: errorBuilder.call(field.context, errorText),
)
: null
),
? DefaultTextStyle.merge(
style: effectiveDecoration.errorStyle,
child: errorBuilder.call(
field.context,
errorText,
),
)
: null),
expands: expands,
baseStyle: baseStyle,
textAlign: textAlign,
textAlignVertical: textAlignVertical,
isFocused: field.focusNode?.hasFocus ?? false,
child: child,
),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/reactive_input_decorator/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: reactive_input_decorator
description: Wrapper around input_decorator to use with reactive_forms.
version: 0.0.6
version: 0.0.7
repository: https://github.com/artflutter/reactive_forms_widgets/tree/master/packages/reactive_input_decorator
issue_tracker: https://github.com/artflutter/reactive_forms_widgets/issues

Expand Down

0 comments on commit 3a9299e

Please sign in to comment.