小编Ble*_*len的帖子

如何使 BottomNavigationBar 不粘在键盘颤动的顶部?

所以我想让BottomNavigationBar在键盘上的粘贴停止。我努力了:

resizeToAvoidBottomPadding: false; (or true both not working), 
Run Code Online (Sandbox Code Playgroud)

底部导航栏粘在键盘上的问题是,当我尝试输入某些内容时,建议不清晰可见,因为它被屏幕内容隐藏,而且它在另一个页面上有一个嵌套的应用程序栏,这反过来又使其变得非常困难要输入并查看建议,我正在寻找一些滚动。

这是我的代码:

@override
void initState() {
super.initState();

getUser();

//PostController().getUser(widget.auth.getCurrentUser());
pages = [Home(), Search(), NewPostPage(), Notifications(), Profile()];
}

@override
Widget build(BuildContext context) {
return new Scaffold(
   resizeToAvoidBottomPadding: true,
  body: Home(context),
);
}

Widget Home(context) {
var bottomOptions = <BottomNavigationBarItem>[];
for (var i = 0; i < widget.bottomItems.length; i++) {
  var d = widget.bottomItems[i];
  bottomOptions.add(
    new BottomNavigationBarItem(
      icon: d.icon,
      title: Padding(
        padding: const EdgeInsets.fromLTRB(3, 3, 3, 0),
        child: new Text(d.title, style: TextStyle(fontSize: 12.0)),
      ), …
Run Code Online (Sandbox Code Playgroud)

flutter

5
推荐指数
1
解决办法
6232
查看次数

FIRESTORE (7.14.3) 内部断言失败:值必须为未定义或 Uint8Array

我的脚本不断引发此错误。我编写的代码用于测试 Firestore 安全规则。\n我基本上想在向其中添加 javascript 函数的同时测试我的 Firestore 安全性。可以在 firestore 控制台中编写规则并立即保存它们,但我想使用 IDE - VS 代码。

\n\n

我想知道如何修复“FIRESTORE (7.14.3) 内部断言失败:值必须是未定义或 Uint8Array”。我已经更新了我的 npm,并且还尝试了我在 Github 上找到的答案,该答案要求我先安装“npm i jest-environment-uint8array”。它不起作用。我也尝试过使用“ TextEncoder” \n例如: var uint8array = new TextEncoder("utf-8").encode("Posts");\n var string = new TextDecoder("utf-8").decode(uint8array );\n效果不太好。如果你们能彻底回答我,我将非常感激,因为我只是一个新手。

\n\n

我的测试代码是

\n\n
const { setup, teardown } = require("./helpers");\n\ndescribe("General Safety Rules", () => {\n  afterEach(async () => {\n    await teardown();\n  });\n\n  test("should deny a read to the posts collection", async () => {\n    const db = await setup();\n    const postsRef = db.collection("Posts");\n    await …
Run Code Online (Sandbox Code Playgroud)

javascript node.js firebase-security flutter google-cloud-firestore

5
推荐指数
1
解决办法
4696
查看次数