get method
Displays a dialog with a htmlTitleText
and with several rows of optional
check buttons, radio buttons, text entry fields, combo boxes.
The name "get" indicates that UserInput into the above GUI elements is
returned.
buttontype
- one of DiaAttr.RADIO, DiaAttr.CHECKBOX, null(=CHECKBOX)]
See isChecked
argument for further details.
htmlTitleText
- the dialog header text.
textLabels
- the size of this array defines the number of lines displayed
by the dialog. Each line displays the respective text entry of this array.
Behind the text of each line a text entry field gets displayed with
default values filled in. The defaults must be specfied by the
argument defaultInputTexts
, which must have the same array length as
textLabels
. The width of each text entry field will be defined by the
respective entry in the widths
argument array, which also must have
the same array length as textLabels
. A width my be 0, then no text
entry field is shown for this row.
comboInfo
- Each text entry field (see above) may be followed by a
combo box GUI element, each having several entries.
Example:
Assume a dialog has 4 rows. The 2nd row should have a combo box
containing the 3 items "yes", "no", "skip"
. Then comboInfo
must
be equals to [null, "yes", "no", "skip"
, null, null].
If no combo box at all should appear in the dialog, if suffices to
set this argument to null.
NOTE 1: if the first item of combo values contains InputDialog.ENABLE_TEXTINPUT_COMBO, then the text entry field belonging to the combo box display will stay editable, otherwise it will be disabled. Example: "InputDialog.ENABLE_TEXTINPUT_COMBOyes" instead of "yes".
NOTE 2: if the first item of combo values contains InputDialog.DISABLE_COMBO_SELECTION, a selected combo item will NOT be put into the textfield the combo belongs to.
isChecked
- Any of the text labels specfied by the argument textLabels
may be preceded by a checkbox or a radio button, as defined by the
argument buttontype
. isChecked
defines the initial check state of
a radio button or checkbox by setting its entry to "true" or "false".
If an entry is set to null, no check or radio button will be displayed
just for this row. isChecked
must have the same length as textLabels
,
or it may be set to null. In this case no check or radio button at all
will be displayed in the dialog.
alternateRowColor
- if true, every second dialog row will get a different color.
buttonLabels
- at the bottom of the dialog up to 3 action buttons may
be displayed, e.g. OK, Cancel, or anything else. The length of this array
defines the number of buttons, the array values define the button texts.
This argument may be null. In this case, just one button is displayed
with the button text "OK".
Implementation
static Future<UserInput> get(
String buttontype,
String htmlTitleText,
List<String> textLabels,
List<List<String>> comboInfo,
List<String> defaultInputTexts,
List<int> widths,
List<String> isChecked,
bool alternateRowColor,
List<String> buttonLabels) async {
return InputDialog.show(
buttontype,
htmlTitleText,
textLabels,
comboInfo,
defaultInputTexts,
widths,
isChecked,
alternateRowColor,
buttonLabels);
}