FTextInput<T extends App<T>> constructor

FTextInput<T extends App<T>>(
  1. T app, {
  2. String? key,
  3. String initialText = '',
  4. String placeholder = '',
  5. int? maxLength,
  6. bool obscureText = false,
  7. FTextInputStyle inputStyle = .flat,
  8. int fontSize = 16,
  9. int fontSpacing = 1,
  10. void onChangedFn(
    1. FTextInput<T> self,
    2. String text
    )?,
  11. void onSubmitFn(
    1. FTextInput<T> self,
    2. String text
    )?,
  12. String getClipboardTextFn()?,
  13. Vector2D? size,
  14. ColorD? borderOverride,
})

Implementation

FTextInput(super.app, {
  super.key,
  String initialText = '',
  this.placeholder   = '',
  this.maxLength,
  this.obscureText   = false,
  this.inputStyle    = .flat,
  this.fontSize      = 16,
  this.fontSpacing   = 1,
  this.onChangedFn,
  this.onSubmitFn,
  this.getClipboardTextFn,
  Vector2D? size,
  this.borderOverride,
}) {
  _text = initialText;
  _cursorIndex = initialText.length;
  if (size != null) this.size = size;
}