参考 这个回答, 我用 Scaffold + bottomSheet 简单实现了一个,但有个问题,就是使用 image_picker 选取图片后,自定义的 KeyboardBar(bottomSheet)会被键盘遮住一部分,具体可以看我提的 issue。
参考 这个回答 重新实现了一下,也是一模一样的问题,似乎是 Flutter 的 MediaQuery.of(context).viewInsets.bottom 出现了 BUG 。
相关 issue:
- https://github.com/flutter/flutter/issues/138346
- https://github.com/flutter/flutter/issues/134798
- https://github.com/flutter/flutter/issues/133537
现在 App 着急上线,但不知道 Flutter 什么时候能修复这个 BUG ,是否还有其它方式能实现相同的功能呢?