TextEditingController constructor

TextEditingController({
  1. String? text,
})

Implementation

TextEditingController({String? text})
  : _value = TextEditingValue(
      text: text ?? '',
      selection: TextSelection.collapsed(
        offset: (text ?? '').characters.length,
        line: (text ?? '').split('\n').length - 1,
        column: (text ?? '').split('\n').last.characters.length,
      ),
    );