balabalaguguji
V2EX  ›  Flutter

flutter 底部导航栏会有个小黑条怎么解决

  •  
  •   balabalaguguji · Mar 20, 2024 · 2757 views
    This topic created in 966 days ago, the information mentioned may be changed or developed.

    试过这个代码

    systemNavigationBarColor: Colors.transparent

    也尝试改过 style.xml

    @android:color/transparent

    都没效果

    4 replies  •  2024-04-11 11:03:04 +08:00
    indexError
    indexError
    Mar 20, 2024 via Android
    1
    盲猜 手机自带的
    ybz
    ybz
    PRO
    Mar 20, 2024
    2
    你可以在 Flutter 的 GitHub 仓库提交 issue ,提供最小复现步骤,我可以尝试帮你解决。即使我解决不了也会有更专业的人士帮助你。
    balabalaguguji
    balabalaguguji
    OP
    Mar 21, 2024
    3
    @indexError 是手机自带的
    PopeyeLau
    PopeyeLau
    Apr 11, 2024
    4
    ```dart
    if (Platform.isAndroid) {
    SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent),
    );
    await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
    }
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2299 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:55 · PVG 20:55 · LAX 04:55 · JFK 07:55
    ♥ Do have faith in what you're doing.