位置论证过多

时间:2019-09-06 03:37:25

标签: flutter dart

我有以下课程:

class AppState {
  final List<Exercise> exercises;
  final List<Answer> answers;
  final int currentQuestion;
  final bool isLoading;

  AppState({this.exercises, this.answers, this.currentQuestion = -1, this.isLoading = false});

  factory AppState.loading() => AppState(exercises: new List(), this.answers: new List(), currentQuestion: -1, isLoading: true);
}

我在factoryToo many positional arguments: 0 expected, but 1 found.中遇到以下错误。

班上怎么了?

0 个答案:

没有答案