FormMapFieldPicker constructor

FormMapFieldPicker({
  1. required String defaultKey,
  2. required Map<String, String> data,
  3. Color? backgroundColor,
  4. Color? color,
  5. String confirmText = "Confirm",
  6. String cancelText = "Cancel",
})

Class that defines the picker style for selection from Map.

Pass Map<String, String> to data. Key in Map is the ID for selection and Value is the display label for selection.

If defaultKey is not in the key of data, an error will occur.

Mapから選択するためのピッカースタイルを定義するクラス。

Map<String, String>dataに渡します。 MapのKeyが選択用のID、Valueが選択用の表示ラベルになります。

defaultKeydataのキーにない場合エラーになります。

Implementation

FormMapFieldPicker({
  required this.defaultKey,
  required this.data,
  this.backgroundColor,
  this.color,
  this.confirmText = "Confirm",
  this.cancelText = "Cancel",
}) : assert(
        data.containsKey(defaultKey),
        "[defaultId] is not included in [data].",
      );