The named parameter 'child' isn't defined. in Center() constructor

后端 未结 7 777
天涯浪人
天涯浪人 2021-01-17 21:04

I ran flutter upgrade today, and now I am getting an error that says- [dart] The named parameter \'child\' isn\'t defined. The project is newly created and the default code

7条回答
  •  有刺的猬
    2021-01-17 21:18

    I just had the same issue. It looks like I changed a flutter lib file by mistake.

    To fix this, without reinstalling Flutter SDK:

    • go to your Flutter SDK installation path
    • open terminal and type: git status
    • it will show the modified files in red (ex: modified: packages/flutter/lib/src/widgets/basic.dart
    • revert modifications file using: git checkout FILE_PATH (ex: git checkout packages/flutter/lib/src/widgets/basic.dart)

提交回复
热议问题