According to knock Flutter Chinese network codes
class RandomWords extends StatefulWidget { @override State<StatefulWidget> createState() { // TODO: implement createState return new RandomWordState(); } } class RandomWordState extends State<RandomWords>{ @override Widget build(BuildContext context) { // TODO: implement build final wordPair=new WordPair.random(); return new Text(wordPair.asCamelCase); } }
Save error:
Each child must be laid out exactly once
The code initially thought he was wrong, then up to the beginning of the revocation, save, or error
The final restart, that is, click on the triangle run successfully
Return to the code above, re-run the code, run successfully
So it should be required to restart