The argument type 'int?' can't be assigned to the parameter type 'int'

bonjour à tous j’ai une erreur The argument type ‹ int? › can’t be assigned to the parameter type ‹ int › au niveau de mes code (_isFav = await _addToFavorite(_productDetail.id):wink: et (_productDetail.isFavourite = !_productDetail.isFavourite;)
IconButton(
onPressed: () async {
if (global.user.id == null) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => SignInScreen(
a: widget.analytics,
o: widget.observer,
)),
);
} else {
bool _isFav;
_isFav = await _addToFavorite(_productDetail.id);
if (_isFav) {
productDetail.isFavourite = !productDetail.isFavourite;
}
}
setState(() {});
},