小编Bre*_*dan的帖子

Flutter 3.0.0 中 TextField 隐藏在键盘后面

我不明白CustomScrollView正常工作。

\n

在 flutter 2.13.0-0.2.pre 之前,点击 a 内的 TextFieldsCustomScrollView在打开时自动调整键盘上方的 TextField。

\n

将我的 flutter 版本降级到2.11.0-0.1.pre并在 上运行应用程序时Android version 11,滚动视图按预期工作 - 即使没有Scaffold通过添加来调整小部件resizeToAvoidBottomInset: false- 当用户点击 TextField 时,键盘就会出现,用户可以按预期滚动到底部。

\n

然而升级到 Flutter 3.0.0 后,情况发生了变化。当我点击文本字段并且键盘出现时,我无法滚动到屏幕底部。事实上,滚动根本不起作用。

\n

这是一个非常长的表单示例,包含大约 26 个文本字段。点击第 25 个文本字段将打开覆盖该文本字段的键盘。

\n
@override\nWidget build(BuildContext context) {\n  return Scaffold(\n    backgroundColor: const Color(0xff185C66),\n    resizeToAvoidBottomInset: true,\n    body: CustomScrollView(\n      shrinkWrap: true,\n      clipBehavior: Clip.antiAlias,\n      controller: ScrollController(),\n      scrollDirection: Axis.vertical,\n      slivers: [\n        SliverPadding(\n          padding: EdgeInsets.symmetric(horizontal: App.sidePadding),\n          sliver: SliverList(\n            delegate: SliverChildListDelegate.fixed([\n              SafeArea(\n                bottom: …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-layout flutter-listview flutter-ios flutter-android

9
推荐指数
1
解决办法
3016
查看次数

您的配置文件不可序列化

我跑了

php artisan config:cache
Run Code Online (Sandbox Code Playgroud)

在我的终端上,我得到了LogicException

LogicException  : Your configuration files are not serializable.

at C:\xampp\htdocs\penschool\vendor\laravel\framework\src\Illuminate\Foundation\Console\ConfigCacheCommand.php:68

 64|             require $configPath;
 65|         } catch (Throwable $e) {
 66|             $this->files->delete($configPath);
 67|
 68|             throw new LogicException('Your configuration files are not serializable.', 0, $e);
 69|         }
 70|
 71|         $this->info('Configuration cached successfully!');
 72|     }

 Exception trace:

1   Error::("Call to undefined method Closure::__set_state()")
  C:\xampp\htdocs\penschool\bootstrap\cache\config.php:241

2   require()
  C:\xampp\htdocs\penschool\vendor\laravel\framework\src\Illuminate\Foundation\Console\ConfigCacheCommand.php:64

Please use the argument -v to see more details.
Run Code Online (Sandbox Code Playgroud)

在运行此命令之前,我从未遇到过此错误。请任何帮助将不胜感激。谢谢。

config laravel-5

4
推荐指数
2
解决办法
3592
查看次数