From 8cfcd269f0040fe1c29e0a232d9b79cc287315a7 Mon Sep 17 00:00:00 2001 From: Vasiliy Ditsyak Date: Tue, 5 Nov 2024 16:33:18 +0100 Subject: [PATCH] reactive_input_decorator 0.0.8 --- .../reactive_input_decorator/CHANGELOG.md | 4 ++ .../ios/Flutter/AppFrameworkInfo.plist | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 8 ++-- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/lib/main.dart | 1 + .../example/pubspec.lock | 26 +++++------ .../lib/src/reactive_input_decorator.dart | 9 +++- .../src/reactive_input_decorator_stack.dart | 43 +++++++++++-------- .../reactive_input_decorator/pubspec.yaml | 41 +----------------- 9 files changed, 60 insertions(+), 76 deletions(-) diff --git a/packages/reactive_input_decorator/CHANGELOG.md b/packages/reactive_input_decorator/CHANGELOG.md index c7e0f9d1..5d2ca085 100644 --- a/packages/reactive_input_decorator/CHANGELOG.md +++ b/packages/reactive_input_decorator/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.8 + +* fix: error style application + ## 0.0.7 * fix: properly apply default text style for error builder diff --git a/packages/reactive_input_decorator/example/ios/Flutter/AppFrameworkInfo.plist b/packages/reactive_input_decorator/example/ios/Flutter/AppFrameworkInfo.plist index 9625e105..7c569640 100644 --- a/packages/reactive_input_decorator/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/reactive_input_decorator/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/project.pbxproj b/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/project.pbxproj index 88db9c3c..f85985b7 100644 --- a/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/project.pbxproj @@ -169,7 +169,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { @@ -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; @@ -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; @@ -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; diff --git a/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a09..8e3ca5df 100644 --- a/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/reactive_input_decorator/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Text('${text}+'), decoration: const InputDecoration( border: OutlineInputBorder(), isDense: true, diff --git a/packages/reactive_input_decorator/example/pubspec.lock b/packages/reactive_input_decorator/example/pubspec.lock index 9718b591..42172f12 100644 --- a/packages/reactive_input_decorator/example/pubspec.lock +++ b/packages/reactive_input_decorator/example/pubspec.lock @@ -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: @@ -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: @@ -161,7 +161,7 @@ packages: path: ".." relative: true source: path - version: "0.0.6" + version: "0.0.7" sky_engine: dependency: transitive description: flutter @@ -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: @@ -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" diff --git a/packages/reactive_input_decorator/lib/src/reactive_input_decorator.dart b/packages/reactive_input_decorator/lib/src/reactive_input_decorator.dart index 6f6aac26..8c6ad596 100644 --- a/packages/reactive_input_decorator/lib/src/reactive_input_decorator.dart +++ b/packages/reactive_input_decorator/lib/src/reactive_input_decorator.dart @@ -113,6 +113,7 @@ class ReactiveInputDecorator extends ReactiveFormField { .applyDefaults(Theme.of(field.context).inputDecorationTheme); final errorText = field.errorText; + final st = effectiveDecoration.errorStyle; return IgnorePointer( ignoring: !field.control.enabled, @@ -129,7 +130,13 @@ class ReactiveInputDecorator extends ReactiveFormField { 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, diff --git a/packages/reactive_input_decorator/lib/src/reactive_input_decorator_stack.dart b/packages/reactive_input_decorator/lib/src/reactive_input_decorator_stack.dart index a72d5386..31191202 100644 --- a/packages/reactive_input_decorator/lib/src/reactive_input_decorator_stack.dart +++ b/packages/reactive_input_decorator/lib/src/reactive_input_decorator_stack.dart @@ -101,27 +101,36 @@ class ReactiveInputDecoratorStack extends ReactiveFormField { 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, diff --git a/packages/reactive_input_decorator/pubspec.yaml b/packages/reactive_input_decorator/pubspec.yaml index b53e9d37..84f474bc 100644 --- a/packages/reactive_input_decorator/pubspec.yaml +++ b/packages/reactive_input_decorator/pubspec.yaml @@ -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 @@ -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 \ No newline at end of file