どうも、ちょげ(@chogetarou)です。
文字入力欄を作る「TextFieldウェジェット」に枠線を付ける方法を解説します。
方法

TextFieldウェジェットに枠線を付けるには、「InputDecoration」の「border引数」を使います。
TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
),
)
「InputDecoration」の「border引数」に、「OutlineInputBorder」を指定します。
そうすることで、TextFieldに枠線を付けることが出来ます。

まとめ
TextFieldに枠線を付けるには、「InputDecoration」の「border引数」に、「OutlineInputBorder」を指定します。
また、枠線の細かい設定を行う場合は、「OutlineInputBorder」の引数を使います。

You.com | AI Search Infrastructure for Enterprise Teams
Skip the groundwork with our AI-ready API platform and ultra-specific vertical indexes, delivering advanced search capab...
OutlineInputBorder class - material library - Dart API
API docs for the OutlineInputBorder class from the material library, for the Dart programming language.


コメント