j'ai une bd flutter pour sqflite : 
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';

class SqliteService {
  Future<void> onCreate(Database db, int version) async {
    await db.execute("""
          CREATE TABLE Aventure (
            idAventure INTEGER PRIMARY KEY AUTOINCREMENT, 
            nomJoueur TEXT NOT NULL
          )
        """);
    await db.execute("""
          CREATE TABLE Difficulte (
            idDifficulte INTEGER PRIMARY KEY AUTOINCREMENT, 
            nom TEXT NOT NULL, 
            nbTentative INTEGER NOT NULL, 
            valeurMax INTEGER NOT NULL
          )
        """);
    await db.execute("""
          CREATE TABLE Niveau (
            idNiveau INTEGER PRIMARY KEY AUTOINCREMENT, 
            palier INTEGER NOT NULL, 
            idDifficulte INTEGER NOT NULL,
            FOREIGN KEY(idDifficulte) REFERENCES Difficulte(idDifficulte)
          )
        """);
    await db.execute("""
          CREATE TABLE Partie (
            idPartie INTEGER PRIMARY KEY AUTOINCREMENT, 
            score INTEGER NOT NULL, 
            nbMystere INTEGER NOT NULL, 
            nbEssaisJoueur INTEGER NOT NULL, 
            gagne INTEGER NOT NULL, 
            dateDebut TEXT NOT NULL, 
            dateFin TEXT NOT NULL,
            idAventure INTEGER,
            idNiveau INTEGER,
            FOREIGN KEY(idAventure) REFERENCES Aventure(idAventure),
            FOREIGN KEY(idNiveau) REFERENCES Niveau(idNiveau)
          )
        """);
    await db.execute("""
          CREATE TABLE Effectuer (
            idAventure INTEGER NOT NULL, 
            idPartie INTEGER NOT NULL, 
            idNiveau INTEGER NOT NULL, 
            complete INTEGER NOT NULL,
            PRIMARY KEY(idAventure, idPartie, idNiveau),
            FOREIGN KEY(idAventure) REFERENCES Aventure(idAventure),
            FOREIGN KEY(idPartie) REFERENCES Partie(idPartie),
            FOREIGN KEY(idNiveau) REFERENCES Niveau(idNiveau)
          )
        """);

    await db.insert(
        'Difficulte', {'nom': 'Facile', 'nbTentative': -1, 'valeurMax': 50});
    await db.insert(
        'Difficulte', {'nom': 'Moyen', 'nbTentative': 15, 'valeurMax': 150});
    await db.insert('Difficulte',
        {'nom': 'Difficile', 'nbTentative': 10, 'valeurMax': 300});
  }

  Future<Database> initializeDB() async {
    return openDatabase(
      join(await getDatabasesPath(), 'aventure.db'),
      onCreate: onCreate,
      onUpgrade: (db, oldVersion, newVersion) async {
        await db.execute("""
        DROP TABLE IF EXISTS Aventure;
        DROP TABLE IF EXISTS Difficulte;
        DROP TABLE IF EXISTS Niveau;
        DROP TABLE IF EXISTS Partie;
        DROP TABLE IF EXISTS Effectuer;
      """);
        await onCreate(db, newVersion);
      },
      version: 2,
    );
  }
}
et j'ai cette page : 
import 'package:flutter/material.dart';
import 'package:mobile_tp/models/Difficulte.dart';
import 'package:mobile_tp/models/Niveau.dart';
import 'package:mobile_tp/models/Partie.dart';
import 'package:mobile_tp/screens/MysteryNumberScreen.dart';
import 'package:mobile_tp/services/AventureDB.dart';
import 'package:mobile_tp/services/DifficulteDB.dart';
import 'package:mobile_tp/services/EffectuerDB.dart';
import 'package:mobile_tp/services/NiveauDB.dart';
import 'package:mobile_tp/services/PartieDB.dart';
import 'package:sqflite/sqflite.dart';

class PageNiveaux extends StatefulWidget {
  final int totalNiveaux;
  final int idAventure;
  final Future<Database> database;

  PageNiveaux({
    Key? key,
    required this.totalNiveaux,
    required this.idAventure,
    required this.database,
  }) : super(key: key);

  @override
  _PageNiveauxState createState() => _PageNiveauxState();
}

class _PageNiveauxState extends State<PageNiveaux> {
  late List<Niveau> doneLevels = [];
  late AventureDB aventureDB;
  late PartieDB partieDB;
  late EffectuerDB effectuerDB;
  late NiveauDB niveauDB;
  late DifficulteDB difficulteDB;

  @override
  void initState() {
    super.initState();
    aventureDB = AventureDB(database: widget.database);
    partieDB = PartieDB(database: widget.database);
    effectuerDB = EffectuerDB(database: widget.database);
    niveauDB = NiveauDB(database: widget.database);
    difficulteDB = DifficulteDB(database: widget.database);
    loadLevels();
  }

  Future<void> loadLevels() async {
    final levels = await aventureDB.getLevelsWon(widget.idAventure);
    setState(() {
      doneLevels = levels;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Aventure'),
      ),
      body: Center(
        child: SingleChildScrollView(
          child: Column(
            children: List.generate(widget.totalNiveaux * 2 - 1, (index) {
              if (index % 2 == 0) {
                int niveau = widget.totalNiveaux - index ~/ 2;
                bool niveauGagne =
                    doneLevels.any((niveauGagne) => niveauGagne.id == niveau);
                bool niveauPrecedentGagne = niveau == 1 ||
                    doneLevels
                        .any((niveauGagne) => niveauGagne.id == niveau - 1);
                return GestureDetector(
                  onTap: niveauPrecedentGagne
                      ? () async {
                          List<Difficulte> allDifficulties =
                              await difficulteDB.getAll();
                          allDifficulties.forEach((difficulte) {
                            print(
                                'Difficulte id: ${difficulte.id}, nom: ${difficulte.nomDifficulte}, nbTentatives: ${difficulte.nbTentatives}, valeurMax: ${difficulte.valeurMax}');
                          });
                          int idDifficulte;
                          if (niveau <= 3) {
                            idDifficulte = 1;
                          } else if (niveau <= 7) {
                            idDifficulte = 2;
                          } else {
                            idDifficulte = 3;
                          }
                          Difficulte difficulte =
                              await niveauDB.getDifficulteById(idDifficulte);
                          Partie nouvellePartie = Partie(
                            score: 0,
                            nbMystere: difficulte.valeurMax,
                            nbEssais: difficulte.nbTentatives,
                            gagnee: false,
                            dateDebut: DateTime.now(),
                            dateFin: DateTime.now(),
                            idAventure: widget.idAventure,
                            idNiveau: niveau,
                          );
                          int idNouvellePartie =
                              await partieDB.add(nouvellePartie);
                          Navigator.push(
                            context,
                            MaterialPageRoute(
                              builder: (context) => MysteryNumberScreen(
                                database: widget.database,
                                idPartie: idNouvellePartie,
                                idNiveau: niveau,
                                idDifficulte: difficulte.id,
                                idAventure: widget.idAventure,
                                effectuerDB: effectuerDB,
                              ),
                            ),
                          );
                        }
                      : null,
                  child: CircleAvatar(
                    backgroundColor: niveauGagne ? Colors.green : Colors.grey,
                    child: Text(niveau.toString()),
                  ),
                );
              } else {
                return SizedBox(height: 20);
              }
            }),
          ),
        ),
      ),
    );
  }
}
mais ça m'envoie cette erreur : 
E/flutter (31910): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: No difficulty found with id 1
E/flutter (31910): #0      NiveauDB.getDifficulteById (package:mobile_tp/services/NiveauDB.dart:39:7)
E/flutter (31910): <asynchronous suspension>
E/flutter (31910): #1      _PageNiveauxState.build.<anonymous closure>.<anonymous closure> (package:mobile_tp/screens/PageNiveaux.dart:90:31)
E/flutter (31910): <asynchronous suspension>
E/flutter (31910): 
et je ne comprends pas pourquoi