FormMapFieldPicker constructor
FormMapFieldPicker({})
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が選択用の表示ラベルになります。
defaultKey
がdata
のキーにない場合エラーになります。
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].",
);