When overriding initState methods, initState methods that do not actively call their parent class will raise a warning error
void initState() {/ / listening input change _textController addListener (() {print(_textController.text);
});
}
Copy the code
Warning error message:
The solution
void initState() { super.initState(); / / to monitor input change _textController. AddListener (() {print(_textController.text);
});
}
Copy the code
Thanks for reading, please advise if you are wrong, thank you!