Код: Выделить всё
class GameLevel {
final int number;
final String question;
final int answer;
final String? image;
final int difficulty;
final String hint;
final String solution;
const GameLevel({
required this.number,
required this.question,
required this.answer,
this.image,
required this.difficulty,
required this.hint,
required this.solution,
});
}
const List gameLevels = [
GameLevel(
number: 1,
question: 'whats 1 + 2',
answer: 3,
difficulty: 4,
hint: '+2',
solution: '3',
),
GameLevel(
number: 2,
question: 'whats 3 + 7',
answer: 10,
difficulty: 4,
hint: 'x3',
solution: '3 + 7 = 10',
),
Подробнее здесь: https://stackoverflow.com/questions/788 ... -be-enough