Skip to content

Commit

Permalink
reactive_input_decorator 0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilich6107 committed Nov 5, 2024
1 parent 3a9299e commit 8cfcd26
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 76 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.8

* fix: error style application

## 0.0.7

* fix: properly apply default text style for error builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
Expand Down Expand Up @@ -345,7 +345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -473,7 +473,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -522,7 +522,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
1 change: 1 addition & 0 deletions packages/reactive_input_decorator/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class MyApp extends StatelessWidget {
children: [
ReactiveInputDecorator(
formControlName: 'input',
errorBuilder: (_, text) => Text('${text}+'),
decoration: const InputDecoration(
border: OutlineInputBorder(),
isDense: true,
Expand Down
26 changes: 13 additions & 13 deletions packages/reactive_input_decorator/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
source: hosted
version: "10.0.5"
version: "10.0.4"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "3.0.3"
leak_tracker_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -127,18 +127,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.11.1"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.12.0"
path:
dependency: transitive
description:
Expand All @@ -161,7 +161,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.6"
version: "0.0.7"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -211,10 +211,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
version: "0.7.2"
version: "0.7.0"
vector_math:
dependency: transitive
description:
Expand All @@ -227,10 +227,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
version: "14.2.5"
version: "14.2.1"
sdks:
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class ReactiveInputDecorator extends ReactiveFormField<dynamic, dynamic> {
.applyDefaults(Theme.of(field.context).inputDecorationTheme);

final errorText = field.errorText;
final st = effectiveDecoration.errorStyle;

return IgnorePointer(
ignoring: !field.control.enabled,
Expand All @@ -129,7 +130,13 @@ class ReactiveInputDecorator extends ReactiveFormField<dynamic, dynamic> {
enabled: field.control.enabled,
error: errorBuilder != null && errorText != null
? DefaultTextStyle.merge(
style: effectiveDecoration.errorStyle,
style: Theme.of(field.context)
.textTheme
.bodySmall
?.copyWith(
color:
Theme.of(field.context).colorScheme.error,
).merge(effectiveDecoration.errorStyle),
child: errorBuilder.call(
field.context,
errorText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,36 @@ class ReactiveInputDecoratorStack 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: Stack(
children: [
InputDecorator(
decoration: effectiveDecoration.copyWith(
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
errorText:
errorBuilder == null ? field.errorText : null,
enabled: field.control.enabled,
error: errorBuilder != null && errorText != null
? DefaultTextStyle.merge(
style: Theme.of(field.context)
.textTheme
.bodySmall
?.copyWith(
color: Theme.of(field.context)
.colorScheme
.error,
)
.merge(effectiveDecoration.errorStyle),
child: errorBuilder.call(
field.context,
errorText,
),
)
: null,
),
expands: expands,
baseStyle: baseStyle,
Expand Down
41 changes: 2 additions & 39 deletions 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.7
version: 0.0.8
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 All @@ -16,41 +16,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

# To add assets to your package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.

# To add custom fonts to your package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages
flutter_lints: ^4.0.0

0 comments on commit 8cfcd26

Please sign in to comment.