Skip to content

Text position is not centered in PopupMenuItem #25782

@xia-weiyang

Description

@xia-weiyang

It's a bug.

2018-12-26 22-11-35

Text position is not cented in PopupMenuItem When I set the language to Chinese.

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Demo',
      localizationsDelegates: [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: [
        const Locale('zh', 'CN'),
      ],
      locale: const Locale('zh', 'CN'),
      home: LaunchPage(),
    );
  }

I am sure this is the reason, because it wokes fine when I commented out this code. It's like gallery.

It has no effect when I am try to use padding or center warp this text widget. I don't know why, but I hope
to resove this problem.

Logs

[✓] Flutter (Channel beta, v1.0.0, on Linux, locale zh_CN.UTF-8)
    • Flutter version 1.0.0 at /home/xia/develop/flutter/flutter
    • Framework revision 5391447fae (4 周前), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /home/xia/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at:
      /home/xia/develop/tool/android-studio-ide-181.5014246-linux/android-studio
      /jre/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] Android Studio (version 3.2)
    • Android Studio at
      /home/xia/develop/tool/android-studio-ide-181.5014246-linux/android-studio
    • Flutter plugin version 31.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)

[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
    • IntelliJ at /home/xia/develop/tool/ideaIU-2018.2.4/idea-IU-182.4505.22
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API
      28) (emulator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: fidelityMatching the OEM platforms betterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions