In a Flutter app I'm developing I use Retrofit.dart package for networking.
I used @Multipart and @Part annotations to send a Multipart POST request with an image file.
I recently updated some package versions in pubspec.yaml
. After that I get an error saying >Undefined name Multipart used as an annotation. and >Undefined name Part used as an annotation
I can't find any info on Multipart requests in the documentation they have given with the package.
Can anyone explain whats wrong with what I'm doing or is there any alternative way to send multipart requests with flutter-retrofit
@MultiPart()
@POST(EditProfile) //URL
Future<LoginResponse> editProfile(@Part(name: 'name') String name,
@Part(name: 'email') String email, @Part(name: 'image') File image);
Please update your pubspec.yml with an explicit version code.
And DO NOT enable null-safety currently.