Quiz-App-Flutter
Quiz-App-Flutter copied to clipboard
Why is the VSCode report an error "Evaluation of this constant expression throws an exception."
I'm a beginner of flutter. download from git . after run "flutter pub get" ,the VsCode report an error “Evaluation of this constant expression throws an exception.“

It's because you defined kPrimaryGradient as constant. Generally, in order to have a widget that is compile-time constant, all of its properties should also be compile-time constants.