TextField constructor

TextField({
  1. bool password = false,
})

Implementation

TextField({bool password = false}) : super('TextField') {
  nodeRoot.style
    ..display = 'flex'
    ..textAlign = 'center'
    ..justifyContent = 'center';
  if (password) {
    textInput = PasswordInputElement();
  }
  textInput.style
    ..width = '100%'
    ..flexGrow = '1';
  nodeRoot.setAttribute('Name', 'TextField');
  nodeRoot.children.add(textInput);
  textInput.onInput.listen((event) {
    fireValueChange(value, value);
  });
}