LevelPathNode constructor
LevelPathNode({
- required int level,
- required LevelState state,
- int starsEarned = 0,
- bool isCurrent = false,
Implementation
LevelPathNode({
required this.level,
required this.state,
this.starsEarned = 0,
this.isCurrent = false,
}) {
if (level < 1) {
throw ArgumentError.value(level, 'level', 'must be at least 1');
}
if (starsEarned < 0 || starsEarned > 3) {
throw ArgumentError.value(
starsEarned,
'starsEarned',
'must be between 0 and 3',
);
}
}