From 74d634b41c8dd9152e44e61b111eea1a7a836379 Mon Sep 17 00:00:00 2001 From: Kiruel Date: Fri, 17 Nov 2023 14:11:28 +0100 Subject: [PATCH] fix: enabled is not null with default at true on DecoratedPlatformTextfield --- CHANGELOG.md | 4 ++ .../decorated_platform_textfield.dart | 4 +- pubspec.yaml | 41 ++----------------- 3 files changed, 9 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e90851e..8b1b0ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.0 +- Fix an error on `enabled` Textfield in the `DecoratedPlatformTextfield` +- Update `flutter_platform_widgets` to `6.0.2` + ## 0.7.4 - Improved `DialogHandler` API - you can now specify the return type, e.g. `final result = await DialogHandler.showWidgetDialog(...)` - Add `PlatformSnackApp.router` and `CupertinoSnackApp.router` to allow for using the `Router` API diff --git a/lib/src/platform/decorated_platform_textfield.dart b/lib/src/platform/decorated_platform_textfield.dart index d6fdc36..7d13e53 100644 --- a/lib/src/platform/decorated_platform_textfield.dart +++ b/lib/src/platform/decorated_platform_textfield.dart @@ -214,7 +214,7 @@ class DecoratedPlatformTextField extends StatelessWidget { /// /// If non-null this property overrides the [decoration]'s /// [InputDecoration.enabled] property. - final bool? enabled; + final bool enabled; /// {@macro flutter.widgets.editableText.cursorWidth} final double cursorWidth; @@ -412,7 +412,7 @@ class DecoratedPlatformTextField extends StatelessWidget { this.onSubmitted, this.onAppPrivateCommand, this.inputFormatters, - this.enabled, + this.enabled = true, this.cursorWidth = 2.0, this.cursorHeight, this.cursorRadius, diff --git a/pubspec.yaml b/pubspec.yaml index 1c985c8..f3e6527 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,56 +1,21 @@ name: enough_platform_widgets description: Useful platform aware widgets to bring a Material app to Cupertino. -version: 0.7.4 +version: 0.8.0 homepage: https://github.com/Enough-Software/enough_platform_widgets environment: sdk: ">=2.17.0 <4.0.0" - flutter: ">=3.0.0" + flutter: ">=3.16.0" dependencies: cupertino_stepper: ^0.2.1 cupertino_progress_bar: ^0.2.0 flutter: sdk: flutter - flutter_platform_widgets: ^3.3.5 + flutter_platform_widgets: ^6.0.2 dev_dependencies: flutter_test: sdk: flutter -# 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