Generator cannot target libraries that have not been migrated to null-safety

I found out that json_serializable >=4.0.0 depends on json_annotation >=4.0.0 <4.1.0
and the json_annotation: ^4.0.0 includes Null Safety but json_serializable: ^4.0.2 does not, so the error is occurring.

So I downgraded both packages:

json_annotation: 3.1.1

and

json_serializable: 3.5.1

And they work again properly.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)