意見交換
実現したいこと
TextFieldのHintTextを設定すると中央寄せが効かなくなります。
textAlignVertical: TextAlignVertical.centerは指定しており、HintTextを指定する前は無事中央寄せすることができているのですが、HintTextを指定すると突然上寄せになってしまします。
これはどうしたらHintTextを中央寄せさせることができるのでしょうか?
これがHintTextを指定すると
こうなります。
(こうみるとHiintTextがない時も微妙に中央ではない。。。)
該当のソースコード
TextField( textAlignVertical: TextAlignVertical.center, controller: _controller, decoration: InputDecoration( // hintText: 'みつける', // hintStyle: TextStyle( // fontSize: deviceWight * 0.035, // color: const Color.fromARGB(255, 157, 157, 157), // ) , enabledBorder: InputBorder.none, focusedBorder: InputBorder.none, ), onSubmitted: (text) => _submission(text), ),
補足情報(FW/ツールのバージョンなど)
[✓] Flutter (Channel stable, 3.7.7, on macOS 13.1 22C65 darwin-arm64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.73.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2023/03/12 11:55