从 back4app 数据库的 class 获取对象时出现问题 仅 FLUTTER
Problem with Getting object from class of back4app database FLUTTER ONLY
我对此变得愚蠢
Future Object1() async{
final object1 = await ParseObject('Announcement')..objectId='vG1WZeVHkV';
var mal = await object1.get('an1');
await print(mal);
}
以防万一你问那个结果
I/flutter ( 9123): null
当我希望如此时url(它是 back4app 中用于图像的文件列)
"an1":{"__type":"File","name":"6c128c064142552b8c3a5e2ac016bc1d_1.jpg","url":"https://parsefiles.back4app.com/nQ1FGO9uklC7f9eMKYDuA16pvAjamCYnbI6xD2Zy/6c128c064142552b8c3a5e2ac016bc1d_1.jpg"}
(注意我是通过使用 object1.fetch() 得到的)
所以有人可以帮助我吗???
应该是:
Future Object1() async {
final object1Response = await ParseObject('Announcement').getObject('vG1WZeVHkV');
if (object1Response.success) {
final object1 = object1Response.result;
var mal = await object1.get('an1');
print(mal);
}
}
我对此变得愚蠢
Future Object1() async{
final object1 = await ParseObject('Announcement')..objectId='vG1WZeVHkV';
var mal = await object1.get('an1');
await print(mal);
}
以防万一你问那个结果
I/flutter ( 9123): null
当我希望如此时url(它是 back4app 中用于图像的文件列)
"an1":{"__type":"File","name":"6c128c064142552b8c3a5e2ac016bc1d_1.jpg","url":"https://parsefiles.back4app.com/nQ1FGO9uklC7f9eMKYDuA16pvAjamCYnbI6xD2Zy/6c128c064142552b8c3a5e2ac016bc1d_1.jpg"}
(注意我是通过使用 object1.fetch() 得到的)
所以有人可以帮助我吗???
应该是:
Future Object1() async {
final object1Response = await ParseObject('Announcement').getObject('vG1WZeVHkV');
if (object1Response.success) {
final object1 = object1Response.result;
var mal = await object1.get('an1');
print(mal);
}
}