Flutter TextFormFieldにプレースホルダーを表示するサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
TextFormFieldにプレースホルダーを表示するには、引数「decoration」を使います。
使用 ...
Flutter TextFormFieldのフォーカスを外すサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
TextFormFieldのフォーカスを外すには、FocusNodeを使います。
作成方法
1.F ...
Flutter TextFormFieldのエラーメッセージを削除する方法
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
validator: (value) {
return ”;
},
TextFor ...
Flutter TextFormFieldのテキストを取得するサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
TextFormFieldのテキストを取得するには、TextEditingControllerを使います。 ...
Flutter Textのテキストを右寄せにするサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
textAlign: TextAlign.right,
Textのテキストを右寄せにするには、引数「textA ...
Flutter Textの下線を2重線にするサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
decorationStyle: TextDecorationStyle.double,
Textの下線を2重 ...
Flutter DropdownButtonの背景色を変えるサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
Container(
color:/*背景色*/,
child: DropdownButton( ...
Flutter アイコンボタンを無効にするかどうかを判断するサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
onPressed: _isDisabled ? null : () {},
アイコンボタンを無効にするかどう ...
Flutter アイコンボタンを無効にするサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
onPressed: null,
アイコンボタンを無効にするには、引数「onPressed」に「null」を指 ...
Flutter アイコンボタン(IconButton)を角丸にするサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
borderRadius: BorderRadius.circular(xxx),
BoxDecoration ...
Flutter 横スクロールのListViewでCardを使うサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
SizedBox(
width: 横幅,
child: Card(),//CardをSizedBoxの ...
Flutter SingleChildScrollview内でListViewを使うサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
SingleChildScrollview内でListViewを使うには、まず引数「shrinkWrap」に「true ...
Flutter AlertDialogを円にするサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
shape: CircleBorder(),
AlertDialogを円にするには、引数「shape」に「Ci ...
Flutter Cardに最小の横幅を設定するサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
child: ConstrainedBox( constraints: BoxConstraints( minWidth ...Flutter GridViewの要素をタップできるようにするサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
GestureDetector(
onTap: (){
//処理コード
},
Grid ...
Flutter DatePickerでTextFormFieldに入力する方法
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
TextFormFieldに設定したTextEditinControllerのtextプロパティに、選択した日付を代入 ...
Flutter InputDecorationを使ってTextFormFieldのバリデーションエラーテキストの色を設定する
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
decoration: InputDecoration( errorStyle: TextStyle( color: x ...Flutter TextFormFieldの下線の色を設定するサンプル
環境
Windows11 pro 64bit
Flutter 3.3.7
構文
1.通常時の下線の色を設定する