Flutter: 应用栏标题居中对齐

创建于 2016-07-30  ·  3评论  ·  资料来源: flutter/flutter

重现步骤

查看颤振库,看到应用栏标题居中对齐。

标题以前是左对齐的,我认为这是正确的默认设置。

颤振医生

[✓] Flutter (on Mac OS, channel master)
    • Flutter at /Users/drewwarren/flutter
    • Framework revision 2b3099c814 (4 hours ago), engine revision c4b2e675b1

[x] Android toolchain - develop for Android devices
    x Android Studio / Android SDK not found. Download from https://developer.android.com/sdk/
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).

[✓] iOS toolchain - develop for iOS devices (Xcode 7.3.1)
    • XCode at /Applications/Xcode.app/Contents/Developer
    • Xcode 7.3.1, Build version 7D1014

[✓] Atom - a lightweight development environment for Flutter
    • flutter plugin version 0.2.3
    • dartlang plugin version 0.6.27

最有用的评论

@abarth最近使标题在 iOS 上居中对齐。 它们在 Android 上仍然是左对齐的。 您可以使用 AppBar(centerTitle=false) 覆盖此自动平台行为。
https://docs.flutter.io/flutter/material/AppBar-class.html
默认行为是匹配平台约定。

所有3条评论

@abarth最近使标题在 iOS 上居中对齐。 它们在 Android 上仍然是左对齐的。 您可以使用 AppBar(centerTitle=false) 覆盖此自动平台行为。
https://docs.flutter.io/flutter/material/AppBar-class.html
默认行为是匹配平台约定。

https://github.com/flutter/flutter/pull/5039是 PR btw。 关闭“按预期工作”,但如果您不同意,请随时重新打开。

此页面是否有帮助?
0 / 5 - 0 等级