V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
thinkm
V2EX  ›  程序员

Flutter 如何全屏显示?

  •  1
     
  •   thinkm · 276 天前 · 413 次点击
    这是一个创建于 276 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如图,最下面红色标记的地方,像是系统预留的区间,flutter 有办法修改这部分区间的颜色来匹配 APP 页面颜色吗? 只有 Android 是这样,同样的一份代码,iphone 正常的

    8328f30fbdd8b75c9406bc167ebfbadb.jpeg

    x77
        1
    x77  
       276 天前
    这个是系统的 Navigation Bar (上方是 Status Bar ),这两个都归操作系统管理,想要改变风格要调用系统的 API ,也就是说要走 Flutter Plugin
    thinkm
        2
    thinkm  
    OP
       276 天前
    @x77 老哥改过吗,有推荐的 plugin 吗
    thinkm
        3
    thinkm  
    OP
       276 天前
    @x77 发现 SystemChrome 有个 API 可以改,已经改了,感谢答复
    x77
        4
    x77  
       276 天前   ❤️ 1
    @thinkm
    改过,有个国际联网的客户端( Flutter ) App 需要把导航条改成 App 的亮暗色,还抽象出一个名为 xinlake_platform 的 plugin 上架过 pub.dev ,没什么人用后来我把它下架了。

    具体的代码到 https://github.com/xinlake/privch-client-flutter 找找估计有
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3096 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 00:19 · PVG 08:19 · LAX 17:19 · JFK 20:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.