草庐IT

method_descriptor

全部标签

ios - UICollectionView registerClass : forCellWithReuseIdentifier method breaks UICollectionView

registerClass:forCellWithReuseIdentifier:方法的作用是什么?根据Apple的开发者文档,它应该是"Registeraclassforuseincreatingnewcollectionviewcells."当我尝试在我的项目中使用它时,我得到了一个黑色的CollectionView。当我删除它时,一切正常。#definecellId@"cellId"#import"ViewController.h"#import"Cell.h"@interfaceViewController()@property(weak,nonatomic)IBOutletU

ios - xcodebuild-exportArchive : exportOptionsPlist error for key 'method' : expected one of {}

我正在使用命令行xcodebuild工具从我的存档中导出临时分发ipa文件,如下所示:xcodebuild-exportArchive-archivePath/path/Archive.xcarchive-exportPath/path-exportOptionsPlist/path/options.plist但是,此命令因错误而失败exportArchive:exportOptionsPlisterrorforkey'method':expectedoneof{},butfoundad-hoc无论我在导出选项plist中提供什么“方法”,它总是会失败并出现此错误。如果我从plist文

firebase - 我收到一个错误 NoSuchMethodError : The method currentUser was called on null. FLUTTER

我正在尝试检查用户是否已登录,我已经使用firebase验证了我的flutter应用程序,我希望用户的状态将应用程序重定向到登录页面或主页,但我可以'运行应用程序,它在红色屏幕上显示错误,错误是:NoSuchMethodError:在null上调用了方法“currentUser”。接收者:空尝试调用:currentUser()我看到了解决方案here但我没有正确理解它当前用户函数:FuturecurrentUser()async{FirebaseUseruser=await_firebaseAuth.currentUser();returnuser!=null?user.uid:nul

firebase - 未处理的异常 : NoSuchMethodError: The method 'split' was called on null

这是一个简单的联系人应用程序,允许添加查看和编辑个人的联系方式。我无法完全理解这里的错误。classViewContactextendsStatefulWidget{finalStringid;ViewContact(this.id);@override_ViewContactStatecreateState()=>_ViewContactState(this.id);}class_ViewContactStateextendsState{DatabaseReference_databaseReference=FirebaseDatabase.instance.reference();

flutter : NoSuchMethodError: The method 'showSnackBar' was called on null

我在使用_showSnackbar时遇到了一些问题,我看到以下错误:Exceptionhasoccurred.NoSuchMethodError(NoSuchMethodError:Themethod'showSnackBar'wascalledonnull.Receiver:nullTriedcalling:showSnackBar(Instanceof'SnackBar'))但我确定我已经为ShowSnackbar创建了GlobalKey:final_scaffoldKey=GlobalKey();这是我的功能showsnackbarvoid_showSnackBar(BuildC

android - 从应用程序 : Method not found , 收到错误 -32601 Android 中的 Flutter 升级问题

升级flutter后,当我构建我的应用程序时,我开始收到以下错误:Executionfailedfortask':app:processDebugManifest'.[+5ms]>Manifestmergerfailed:Attributemeta-data#android.support.VERSION@valuevalue=(25.4.0)from[com.android.support:appcompat-v7:25.4.0]AndroidManifest.xml:28:13-35[+23ms]isalsopresentat[com.android.support:support

flutter - 抛出另一个异常 : NoSuchMethodError: The method '*' was called on null

我在将项目添加到CardList并尝试使用轮播显示它时遇到问题。该项目已添加到列表中,但当我尝试通过轮播查看它时,显示错误:I/flutter(12255):抛出另一个异常:NoSuchMethodError:Themethod'*'wascalledonnull.我已尝试不留下任何未初始化的内容,正如我在类似案例中读到的有关此问题的内容,但这无济于事。您可以在我的Github个人资料上查看我的代码:https://github.com/varamsky/notes这是模拟器屏幕的图像。enterimagedescriptionhere 最佳答案

flutter - NoSuchMethodError : The method 'map' was called on null 错误

有时animals.relatives是空的,所以t.name返回null,这是导致问题的原因我尝试了ifelse语句和trycatch,但我猜它在小部件内部不起作用?我不确定为什么它不起作用Column(children:[Text(animals.name),Text(animals.desc),Text("Relatives:"),Row(children:animals.relatives.map((t)=>FilterChip(label:Text(t.name),onSelected:(b){})).toList(),),]),如果t.name为null,我不希望其上方的行

dart - Flutter Sqflite 错误说 The method 'query' was called on null

我正在尝试从网络中获取一些数据并将其存储在sqlite数据库中。以下是模型类classStudentModel{intstatus;Stringmsg;StudentModelDatastudentModelData;StudentModel({this.status,this.msg,this.studentModelData});StudentModel.fromJson(Mapjson){status=json['status'];msg=json['msg'];studentModelData=json['data']!=null?newStudentModelData.fro

dart - 如何使用 Dart 的 Difference Method 和 DateTime 使用动态日期?

我正在构建的应用程序使用一种使用DurationDifference和DateTime的“Dayssince”计数器,但我希望计数器在默认情况下他们开始使用该应用程序的那一天开始,并且可以选择放入任何一个他们想要的日期。我的问题是,我如何动态生成计数器的开始日期作为他们开始使用该应用程序的日期,这是否可以通过数据库最简单地实现? 最佳答案 好的,所以从我的角度来看,使用shared_preferences似乎是一个很好的方法。共享首选项允许为用户存储一些键/值对,它是持久的,您可以更新它。这是包裹:https://pub.dartl