Running Gradle task 'assembleDebug'...
../../.pub-cache/hosted/pub.dev/enough_platform_widgets-0.7.4/lib/src/platform/decorated_platform_textfield.dart:536:20: Error: The argument type 'bool?' can't be assigned to the parameter type 'bool' because 'bool?' is nullable and 'bool' isn't.
          enabled: enabled,
                   ^
../../.pub-cache/hosted/pub.dev/flutter_platform_widgets-3.3.5/lib/src/platform_text_field.dart:578:30: Error: The argument type 'bool?' can't be assigned to the parameter type 'bool' because 'bool?' is nullable and 'bool' isn't.
      enabled: data?.enabled ?? enabled,
                             ^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script '/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1350

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/flutter/bin/flutter'' finished with non-zero exit value 1

在升级Ffltter 3.16后,我希望它能为Android或iOS构建可执行文件,但它一直给出错误.

推荐答案

enough_platform_widgets包中的DecoratedPlatformTextField有一个错误. 它已经在2023年11月18日修复为this PR,因此它可能会在v0.7.4之后的下一个版本中可用.

如果需要,您可以从the GitHub repository版本开始使用修复版本,直到正式发布修复版本.

Flutter相关问答推荐

如何刷新future 的构建器时,没有OBS变量的内部在Ffltter?

如何在应用程序启动时解析和加载JSON文件?

底部导航栏项目在抖动中不更改 colored颜色

本机调试符号包含无效的目录调试符号.目前仅支持Android ABI

你能go 掉Flutter 小部件测试中的样板吗?

BoxConstraints强制使用无限宽度(列中的Listview)

使用持久的侧边菜单和顶部栏在Ffltter Web应用程序中的页面之间导航

如何在Flutter 中使用滚动展开窗口小部件

如何将WebViewWidget和WillPopScope结合起来

Flutter:无法构建iOS应用程序-找不到PigeonParser.h文件

Supabase Auth:重定向到 Google.com 而不是我的应用程序

Flutter:在 pubspec.yaml 中找不到assets资源

切换 Firebase 项目后 Flutter FirebaseAuthException 'configuration-not-found'

Flutter canvas 绘制不同 colored颜色 的原始点

应用程序和应用程序内的 webview 之间的单点登录

配置项目:firebase_core时出现问题

Getx Flutter 在更新值时抛出空错误

有任何方法可以在应用程序移动背景恢复时显示 appopenAd

Flutter :RangeError(索引):无效值:不在包含范围内0..3:4使用IndexedListView.builder

Flutter audioplayers错误-单击音频按钮时不播放音频