Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

docs.flutter.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.

Learn more

Flutter 3.41 is live! Check out theFlutter 3.41 blog post!

Remove invalid parameters forInputDecoration.collapsed

'InputDecoration.collapsed' constructor parameters 'floatingLabelBehavior' and 'floatingLabelAlignment' are deprecated without replacement because they have no effect.

Important

Summary

#

InputDecoration.collapsed invalid parametersfloatingLabelBehavior andfloatingLabelAlignment are deprecated.

Background

#

InputDecoration.collapsed constructor is used to create a minimal decoration without a label.

The parametersfloatingLabelAlignment andfloatingLabelBehavior have no effect because an input decoration created usingInputDecoration.collapsed has no label.

Migration guide

#

To migrate, remove usage offloatingLabelBehavior andfloatingLabelAlignment parameters when calling theInputDecoration.collapsed constructor. Those parameters had no effect.

Code before migration:

dart
InputDecoration.collapsed(hintText:'Hint',floatingLabelAlignment:FloatingLabelAlignment.center,floatingLabelBehavior:FloatingLabelBehavior.auto,),

Code after migration:

dart
InputDecoration.collapsed(hintText:'Hint',),

Timeline

#

Landed in version: 3.24.0-0.1.pre
In stable release: 3.27.0

References

#

API documentation:

Relevant issues:

Relevant PRs:

Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-10-28.View source orreport an issue.


[8]ページ先頭

©2009-2026 Movatter.jp