为什么这段代码:
class _SequentialTextPageState {
String jsonTextPref = 'seqtext';
int jsonTextSuff = 10;
String jsonText = jsonTextPref + jsonTextSuff.toString();
}
Run Code Online (Sandbox Code Playgroud)
产生这些错误?
Error: The instance member 'jsonTextPref' can't be accessed in an initializer.
Error: The instance member 'jsonTextSuff' can't be accessed in an initializer.
Run Code Online (Sandbox Code Playgroud)
在我看来,String和之间的串联int是正确的吗?
dart ×1