$new static method

$Value? $new(
  1. Runtime runtime,
  2. $Value? thisValue,
  3. List<$Value?> args
)

Wrapper for the DialogTextField.new constructor

Implementation

static $Value? $new(Runtime runtime, $Value? thisValue, List<$Value?> args) {
  return $DialogTextField.wrap(
    DialogTextField(
      initialText: args[0]?.$value,
      hintText: args[1]?.$value,
      obscureText: args[2]?.$value ?? false,
      validator: (String? value) {
        return (args[3]! as EvalCallable?)?.call(runtime, null, [
          if (value == null) const $null() else $String(value),
        ])?.$value;
      },
      keyboardType: args[4]?.$value,
      textCapitalization: args[5]?.$value ?? TextCapitalization.none,
      prefixText: args[6]?.$value,
      suffixText: args[7]?.$value,
      minLines: args[8]?.$value,
      maxLines: args[9]?.$value ?? 1,
      maxLength: args[10]?.$value,
      autocorrect: args[11]?.$value ?? true,
      spellCheckConfiguration: args[12]?.$value,
    ),
  );
}