在遇到糟糕的问题后,我最终将我的项目转移到了另一个项目中。但是现在,在尝试运行我的程序后,它给出了这个错误,这是我以前从未见过的。而且,我没有编辑这些代码,因为它们是库。
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.0.3/lib/src/widget/app_bar.dart:147:57: Error: No named parameter with the name 'nullOk'.
final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);
^^^^^^
../../Developer/flutter/packages/flutter/lib/src/material/scaffold.dart:1918:24: Context: Found this candidate, but the arguments don't match.
static ScaffoldState of(BuildContext context) {
^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.4.0/lib/src/components/app_bar.dart:32:57: Error: No named parameter with the name 'nullOk'.
final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);
^^^^^^
../../Developer/flutter/packages/flutter/lib/src/material/scaffold.dart:1918:24: Context: Found this candidate, but the arguments don't match.
static ScaffoldState of(BuildContext context) {
^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.4.0/lib/src/components/text_field.dart:953:32: Error: No named parameter with the name 'nullOk'.
MediaQuery.of(context, nullOk: true)?.navigationMode ??
^^^^^^
../../Developer/flutter/packages/flutter/lib/src/widgets/media_query.dart:818:25: Context: Found this candidate, but the arguments don't match.
static MediaQueryData of(BuildContext context) {
^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.4.0/lib/src/neumorphic/theme.dart:390:52: Error: No named parameter with the name 'nullOk'.
_cupertinoOverrideTheme.resolveFrom(context, nullOk: nullOk),
^^^^^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.0.3/lib/src/widget/app_bar.dart:147:57: Error: No named parameter with the name 'nullOk'.
final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);
^^^^^^
../../Developer/flutter/packages/flutter/lib/src/material/scaffold.dart:1918:24: Context: Found this candidate, but the arguments don't match.
static ScaffoldState of(BuildContext context) {
^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.4.0/lib/src/components/app_bar.dart:32:57: Error: No named parameter with the name 'nullOk'.
final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);
^^^^^^
../../Developer/flutter/packages/flutter/lib/src/material/scaffold.dart:1918:24: Context: Found this candidate, but the arguments don't match.
static ScaffoldState of(BuildContext context) {
^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.4.0/lib/src/components/text_field.dart:953:32: Error: No named parameter with the name 'nullOk'.
MediaQuery.of(context, nullOk: true)?.navigationMode ??
^^^^^^
../../Developer/flutter/packages/flutter/lib/src/widgets/media_query.dart:818:25: Context: Found this candidate, but the arguments don't match.
static MediaQueryData of(BuildContext context) {
^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/neumorphic-0.4.0/lib/src/neumorphic/theme.dart:390:52: Error: No named parameter with the name 'nullOk'.
_cupertinoOverrideTheme.resolveFrom(context, nullOk: nullOk),
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
^^^^^^
以下是我的pubspec.yaml文件:
name: Test
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
rflutter_alert: ^1.0.3
flutter:
sdk: flutter
mqtt_client: ^8.0.0
provider: ^4.3.2+2
get_it: ^5.0.1
vibration: ^1.7.2
clay_containers: ^0.2.2
local_auth: ^0.6.2+1
flutter_secure_storage: ^3.3.3
neumorphic: ^0.4.0
shared_preferences: ^0.5.8
flutter_neumorphic: ^3.0.3
cupertino_icons: ^0.1.3
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:
uses-material-design: true
assets:
- images/homestadelogo.png
- images/morning.png
fonts:
- family: OpenSans
fonts:
- asset: fonts/assets/fonts/OpenSans.ttf
- family: myLamp
fonts:
- asset: fonts/assets/fonts/mylamp.ttf
我该怎么做?如果你需要更多细节,直接问我就好了。