I have this error when I try to run Alignment.
CodePudding user response:
The final keyword stands for constant. Since it is a constant, not a variable, initialization is required. Remove the final keyword.
Because final is a constant keyword, its value cannot be changed.
There are two main keywords for constants: const and final. const is defined at compile time and final is defined at runtime.
CodePudding user response:
Just Remove final keyword .
otherwise you can not assign any value to alignment variable.
like this.
AlignmentDirectional alignment;
