Flutter TextFormFieldのパディングを設定するサンプル

環境
Windows11 pro 64bit
Flutter 3.3.7

構文

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
decoration: InputDecoration(
contentPadding: /*EdgeInsetsでパディングを設定*/,
),
decoration: InputDecoration( contentPadding: /*EdgeInsetsでパディングを設定*/, ),
decoration: InputDecoration(
  contentPadding: /*EdgeInsetsでパディングを設定*/,
),

TextFormFieldの引数「decoraiton」にInputDecorationを指定します。
InputDecorationの引数「contentPadding」にパディングを指定します。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
TextFormField(
decoration: InputDecoration(
contentPadding: EdgeInsets.all(40),
border: OutlineInputBorder(),
),
),
TextFormField( decoration: InputDecoration( contentPadding: EdgeInsets.all(40), border: OutlineInputBorder(), ), ),
TextFormField(
  decoration: InputDecoration(
    contentPadding: EdgeInsets.all(40),
    border: OutlineInputBorder(),
  ),
),

 

Flutter

Posted by arkgame