键盘隐藏了我的ListView(GroupedListView)。我认为这是因为ExpandedWidget。
我的身体:
Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: GroupedListView<dynamic, String>(
controller: _scrollController,
keyboardDismissBehavior:
ScrollViewKeyboardDismissBehavior.onDrag,
physics: const BouncingScrollPhysics(
parent: AlwaysScrollableScrollPhysics()),
itemBuilder: (context, message) {
return ListTile(
title: ChatBubble(message),
);
},
elements: messages,
groupBy: (message) => DateFormat('MMMM dd,yyyy')
.format(message.timestamp.toDate()),
groupSeparatorBuilder: (String groupByValue) =>
getMiddleChatBubble(context, groupByValue),
itemComparator: (item1, item2) =>
item1.timestamp.compareTo(item2.timestamp),
useStickyGroupSeparators: false,
floatingHeader: false,
order: GroupedListOrder.ASC,
),
),
),
WriteMessageBox(
group: group,
groupId: docs[0].id,
tokens: [widget.friendToken])
],
);
Run Code Online (Sandbox Code Playgroud)
为什么resizeToAvoidBottomInset不起作用?
我已经向 Flutter …
在以下情况下,Flutter 重建/重绘如何工作:
每次有状态小部件状态发生变化时,有状态小部件内的无状态小部件是否都会渲染?
有状态小部件可以在无状态小部件内更改吗?它如何影响无状态小部件?
Google Play 已将我的应用程序从生产环境中删除。我做了一些更改并想将新版本上传到Internal testing.
在 参考资料Publishing overview部分中我可以看到两个版本。生产中的旧版本和内部测试中的新修复版本。
我想要Send for review我的新版本,但我不想发送我的旧版本。
如何从 中删除旧版本Publishing overview?我可以指定只查看新版本吗?
我试图比较 Flutter 中的两个应用程序版本:
final v1 = "1.0.0";
final v2 = "1.0.1";
Run Code Online (Sandbox Code Playgroud)
我如何声明哪个版本比另一个版本大?
我正在PopupMenuButton我的应用程序中使用。我想showDialog点击一个PopupMenuItem.
我的PopupMenuItem:
PopupMenuItem(
child: Text("Show dialog"),
onTap: () {
showDialog(
context: context,
barrierColor: Colors.black26,
builder: (context) => AlertDialog(
...
)
},
),
Run Code Online (Sandbox Code Playgroud)
onSelected在里面使用也PopupMenuButton不起作用。
我想RefreshIndicator用布尔参数标记我的。
是否可以?有什么窍门呢?因为没有太多选择...
return RefreshIndicator(
onRefresh: () async {
return Future.value();
},
backgroundColor: Colors.white,
color: Colors.pink,
strokeWidth: 2.75,
child: SingleChildScrollView(...)
)
Run Code Online (Sandbox Code Playgroud)
我正在尝试将我的 Flutter 应用程序包从 Mac 上传到 Google Play,但收到有关添加“调试符号”的警告:
此应用程序包包含本机代码,并且您尚未上传调试符号。我们建议您上传符号文件,以便更轻松地分析和调试崩溃和 ANR。
根据这个答案,我需要压缩这三个文件夹并将其作为“调试符号”上传。
但是,在尝试上传压缩文件时出现上述错误:
本机调试符号包含无效目录 __MACOSX。仅支持 Android ABI。
问题是什么?我应该怎么办?
我的查询是:
snapshot = await FirebaseFirestore.instance
.collection('dialogs')
.where('active', isEqualTo: true)
.where('users', arrayContains: globals.user.userId)
.where('readers', whereNotIn: [globals.user.userId])
.orderBy('priority')
.limit(1)
.get();
Run Code Online (Sandbox Code Playgroud)
我收到上述异常:
未处理的异常:[cloud_firestore/unknown] 解析查询参数时出错,有关详细信息,请参阅本机日志。
not-in、 或array-contains-any子句。您不能在同一个查询中组合这些运算符。就我而言,一切都应该没问题。
我也尝试了几件事:
whereNotIn行,一切都很好。arrayContains行,一切都很好。为什么我会收到查询解析异常?谢谢
我正在使用 FCM 检测卸载。如果我收到NotRegistered token发送通知,我认为该应用程序已被卸载。
在 Android 上一切正常,而在 IOS 上我总是收到success回复,即使应用程序已经卸载了好几天。
我已经读到可以使用 来检测卸载APNs feedback Service,其中 Apple 报告了任何不活动的令牌。
我还阅读了 Firebase 官方文档:
content_available - 在 iOS 上,使用此字段表示 APNs 负载中的内容可用。当发送通知或消息并将此设置为 true 时,会唤醒不活动的客户端应用程序,并且消息通过 APNs 作为静默通知而不是通过 FCM 连接服务器发送。
为了通过 APN 发送通知,我尝试使用 发送推送通知content_available: true,但我无法NotRegistered token在 IOS 上重现错误。它仍然返回一条success消息。
我正在使用sendMulticast. 我的有效载荷:
const payload = {
notification: {
title: text,
},
android: {
priority: "high",
ttl: 60 * 60 * …Run Code Online (Sandbox Code Playgroud) apple-push-notifications node.js ios firebase-cloud-messaging
我正在为 Android 和 IOS 开发 Flutter 应用程序。我正在使用firebase_analytics 8.2.0 包收集分析。
我已经按照包文档中的描述配置了我的应用程序。我的Podfile开头是$FirebaseAnalyticsWithoutAdIdSupport = true.
问题是我只能接收 Android 分析。
我的代码:
final FirebaseAnalytics analytics = FirebaseAnalytics();
void onGroupCreate(String groupId, double totalInvites, bool isStatus) {
analytics.logEvent(
name: "create_group",
parameters: <String, dynamic>{
'user_id': globals.user.userId,
'group_id': groupId,
'total_invites': totalInvites,
'is_status': isStatus
},
);
}
Run Code Online (Sandbox Code Playgroud)
我的info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>AppName</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key> …Run Code Online (Sandbox Code Playgroud)