FormButton constructor

const FormButton(
  1. String label, {
  2. Key? key,
  3. VoidCallback? onPressed,
  4. bool enabled = true,
  5. Widget? icon,
  6. FormStyle? style,
})

Create buttons for forms.

Specify the label to be displayed on the button in label.

The onPressed allows you to describe the process when the button is pressed.

If icon is specified, an icon is displayed to the left of the label.

If enabled is set to false, the button cannot be pressed.

The style of the button can be changed by specifying style.

フォーム用のボタンを作成します。

labelにボタンに表示するラベルを指定します。

onPressedでボタンが押された場合の処理を記述できます。

iconを指定した場合は、ラベルの左側にアイコンが表示されます。

enabledfalseにした場合ボタンが押せなくなります。

styleを指定するとボタンのスタイルを変更することが可能です。

Implementation

const FormButton(
  this.label, {
  super.key,
  this.onPressed,
  this.enabled = true,
  this.icon,
  this.style,
});