当我尝试在path_provider中使用蜂窝时,我的Flutter项目中出现了这个错误。有没有办法解决这个问题,因为我尝试了在测试版和主频道之间切换,并将flutter sdk min设置为2.11。 调用path_provider.getApplicationDocumentsDirectory();时显示此错误 Unhandled Exception: Null check operator used on a null value
#0 MethodChannel.binaryMessenger (package:flutter/src/services/platform_
当我尝试添加颤动时_svg依赖在我的项目中添加SVG格式的图片,它抛出了一个错误,如下所示: ? /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.19.2+1/lib/src/picture_provider.dart:57:59: Error: No named parameter with the name 'nullOk'.
context != null ? Localizations.localeOf(context, nullOk: true) : null,
当我尝试加载从图库中选择的图像以在第一次运行时显示在我的应用程序上时,它出现了这个错误。 ======== Exception caught by image resource service ================================================
The following assertion was thrown resolving an image codec:
Unable to load asset: /data/user/0/com.example.app_test/cache/image_picker549486614866537974
当从.json执行文件时,我在flutter和dart中编程时出现此错误。有人知道如何修复它吗? ════════ Exception caught by image resource service ════════════════════════════
The following NoSuchMethodError was thrown resolving an image codec:
The getter 'length' was called on null.
Receiver: null
Tried calling: length
When the excep
当我试图使用 库:预缓存SVG文件时,出现了以下错误
> flutter: ══╡ EXCEPTION CAUGHT BY SVG ╞═══════════════════════════════════════════════════════════════════════
> flutter: The following _CastError was thrown resolving a single-frame picture stream:
> flutter: Null check operator used on a null value
在null.Receiver: nullTried调用:uid时调用了getter 'uid‘时出现此错误 当我试图从任何屏幕上注销时,“除了主屏幕”, 这个问题有什么解决办法吗?? 包装器: class Wrapper extends StatelessWidget {
@override
Widget build(BuildContext context) {
final user = Provider.of<User_fb>(context);
// return home or login
if (user == null) {
我正在尝试使用path_provider来保存html文件。下面是我的函数:
Future<Null> createHtmlFile(String content) async {
// Get the system temp directory.
final directory = await getApplicationDocumentsDirectory();
var file = await File(
'${directory.path}/html/webpage${DateTime.now().toStri
我想使用包来管理我的路由,但是在安装和配置它之后,我无法运行我的应用程序并在控制台上接收以下错误。
: Error: Property 'window' cannot be accessed on 'WidgetsBinding?' because it is potentially null.
../…/provider/auto_route_information_provider.dart:20
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart&
安装火焰后,当我在flutter中运行我的应用程序时(flutter run)。我得到了一个关于null安全的长错误:
Running Gradle task 'assembleDebug'...
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flame
- package:ordered_set
- package:box2d_flame
- package:audioplaye
我想在flutter项目中使用provider package(4.0),但是我得到了“尝试使用Provider with a subtype of Listenable/Stream”错误/警告。
我的星座:
我有一个Api()类,它包含用于firebase-cloudstorage的基本CRUD功能。
我有一个EventService()-class,它使用带有具体参数的Api()-class。
对于我的视图,我有一个名为EventOverviewModel的ViewModel类,它使用EventService。
我的提供程序配置如下所示:
List<SingleChildWidge
有什么问题吗?我不能用这种方法。
错误码Too many positional arguments: 0 expected, but 1 found. Try removing the extra arguments.
在stat_managerment.dart中,我使用了这种方法。
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
final userLogged = StateProvider
当我试图在android上运行终端中的“颤振运行”应用程序时,我会得到以下错误.
/C:/Users/Acer/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/provider-3.2.0/lib/src/delegate_widget.dart:194:18: Error: Superclass has no method named 'inheritFromElement'.
return super.inheritFromElement(ancestor, aspect: aspect);
我有一个小部件,它向返回地图的api发出请求。我想做的不是每次加载小部件时都发出相同的请求,并将列表保存到appState.myList。但。当我在FutureBuilder中执行此appState.myList = snapshot.data;时,我得到以下错误:
flutter: ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
flutter: The following assertion was thrown while dispat
我正在使用Rest构建简单的身份验证。函数正在工作,但是当我得到令牌时,我想在应用程序的mainPage上移动。为此,我使用使用者使用bool值构建主页,当令牌存在时,我将从_auth.token中获得这个值,但它正在返回堆栈溢出错误。
The following StackOverflowError was thrown building Consumer<Auth>(dirty, dependencies:
[_InheritedProviderScope<Auth>]):
Stack Overflow
The relevant error-causing widg
此屏幕是一个抽屉屏幕,它接受身份验证块,以便为用户提供信息并使其能够注销。尽管我使用的是正确的提供商,但我还是收到了这个错误 The following ProviderNotFoundError was thrown building Pets4allDrawer(dirty):
I/flutter (32011): Error: Could not find the correct Provider<AuthService> above this Pets4allDrawer Widget
I/flutter (32011): To fix, please:
I/flutte
我想在背景中设置图像,我已经在项目名称下创建了一个资产文件夹,并将图像粘贴在其中,我编写了下面的代码。但它显示出这样的错误,
I/flutter (13556):
I/flutter (13556): When the exception was thrown, this was the stack:
I/flutter (13556): #0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:221:7)
I/flutter (13556): <asynchronous susp