Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FormBuilderDropdown]: wrong alignment when using flutter sdk 3.22.0 #1398

Closed
2 of 7 tasks
VinhNgT opened this issue May 24, 2024 · 3 comments
Closed
2 of 7 tasks

[FormBuilderDropdown]: wrong alignment when using flutter sdk 3.22.0 #1398

VinhNgT opened this issue May 24, 2024 · 3 comments
Labels
bug Something isn't working originates from dependency The issue originates from package dependency

Comments

@VinhNgT
Copy link

VinhNgT commented May 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

9.2.1

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

Flutter doctor
[✓] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22631.3593], locale en-US)
    • Flutter version 3.22.0 on channel stable at F:\libs\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (2 weeks ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\victo\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Zulu\zulu-17\bin\java
    • Java version OpenJDK Runtime Environment Zulu17.50+19-CA (build 17.0.11+9-LTS)
    • All Android licenses accepted.

[✓] Android Studio (version 2023.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)

[✓] VS Code (version 1.89.1)
    • VS Code at C:\Users\victo\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[✓] Connected device (1 available)
    • Redmi Note 8 (mobile) • 139ed888 • android-arm64 • Android 13 (API 33)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Minimal code example

Code sample
FormBuilderDropdown<String>(
  name: 'hello_world',
  autovalidateMode: AutovalidateMode.onUserInteraction,
  decoration: const InputDecoration(
    hintText: 'Hello world',
    suffixIcon: Icon(
      Symbols.expand_more,
    ),
  ),
  icon: const SizedBox.shrink(),
  items: const [
    DropdownMenuItem(
      value: '1',
      child: Text('Option 1'),
    ),
    DropdownMenuItem(
      value: '2',
      child: Text('Option 2'),
    ),
  ],
),

Current Behavior

The hint text alignment of FormBuilderDropdown is wrong in Flutter SDK 3.22.0:

sdk_3 22 0

Expected Behavior

Downgrade to Flutter SDK 3.19.6 fixed the issue

sdk_3 19 6

Steps To Reproduce

Upgrade Flutter SDK to 3.22.0

Aditional information

No response

@VinhNgT VinhNgT added the bug Something isn't working label May 24, 2024
@deandreamatias
Copy link
Collaborator

deandreamatias commented May 25, 2024

Hi!
Can test with original Flutter dropdown to know if the bug is the same?
Maybe had some issue related https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+DropdownButtonFormField+hintText

@VinhNgT
Copy link
Author

VinhNgT commented May 25, 2024

It seems that it's the problem of Flutter itself:
flutter/flutter#148532

I will investigate tomorrow since it's getting late where i live.

@VinhNgT VinhNgT closed this as completed May 27, 2024
@VinhNgT
Copy link
Author

VinhNgT commented May 27, 2024

Yep, confirmed to be from Flutter:

DropdownButtonFormField(
  decoration: const InputDecoration(
    hintText: 'Language',
    alignLabelWithHint: false,
  ),
  items: const [
    DropdownMenuItem(
      value: 'vi',
      child: Text('Tiếng Việt'),
    ),
    DropdownMenuItem(
      value: 'en',
      child: Text('English'),
    ),
  ],
  icon: const Icon(
    Icons.keyboard_arrow_down_rounded,
  ),
  onChanged: (value) {},
),

flutter_stock

@deandreamatias deandreamatias added the originates from dependency The issue originates from package dependency label May 27, 2024
deandreamatias added a commit that referenced this issue Sep 3, 2024
fix: #1398 add hint to FormBuilderDropdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working originates from dependency The issue originates from package dependency
Projects
None yet
Development

No branches or pull requests

2 participants