flutter - 没有为“Stack”类定义 getter ClipBehavior
问题描述
我正在尝试运行包含“堆栈”的应用程序,但它给了我一个错误,即:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/convex_bottom_bar-2.6.0/lib/src/stack.dart:43:25: Error: The getter 'ClipBehavior' isn't defined for the class 'Stack'.
- 'Stack' is from 'package:convex_bottom_bar/src/stack.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/convex_bottom_bar-2.6.0/lib/src/stack.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'ClipBehavior'.
clipBehavior: ClipBehavior,
^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/convex_bottom_bar-2.6.0/lib/src/stack.dart:53:21: Error: The getter 'ClipBehavior' isn't defined for the class 'Stack'.
- 'Stack' is from 'package:convex_bottom_bar/src/stack.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/convex_bottom_bar-2.6.0/lib/src/stack.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'ClipBehavior'.
clipBehavior: ClipBehavior,
^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/convex_bottom_bar-2.6.0/lib/src/stack.dart:70:25: Error: The getter 'ClipBehaviorehavior' isn't defined for the class '_RenderStack'.
- '_RenderStack' is from 'package:convex_bottom_bar/src/stack.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/convex_botvex_bottom_bar-2.6.0/lib/src/stack.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'ClipBehavior'.
clipBehavior: ClipBehavior,
^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 25s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 26.5s
Exception: Gradle task assembleDebug failed with exit code 1
我的颤振医生很好,没有错误,我的颤振 sdk 是最新版本。我队友的应用程序在她身上运行良好。请帮忙
解决方案
这就是诀窍。谢谢
clipBehavior: Clip.none,
推荐阅读
- mysql - 用特定条件表示 MYSQL 结果
- javascript - 从 Helper 组件更新组件状态
- python - 重新格式化 pandas 表 - 我想要一个支点吗?
- visual-studio - 运行“react-native run-windows”时如何修复构建错误
- tensorflow - 如果验证准确性比上一个时期有所提高,如何编写自定义回调以在每个时期保存模型
- python - Bert 模型在 google colab 上给出 CUDA 内存不足错误
- time-complexity - 给定代码的时间复杂度是多少
- python - 如何绘制二项式函数?
- java - 处理:意外令牌
- c++ - 如何在 C++ Visual Studio 中获得此输出?