FormatException: Unexpected end of input (at character 2564)

21 views Asked by At

this error showed to me when i fetch data sometimes it fetch data correctly and sometimes not

     Exception: DioException [unknown]: null
    FormatException: Unexpected end of input (at character 2564)
I/flutter ( 2448): ...02:54:02.000000Z","updated_at":"2024-03-12T02:54:02.000000Z"}],"status":200

i used everything here

 BlocProvider<AppointmentCubit>(
          create: (BuildContext context) =>
              AppointmentCubit(AppointmentRepo(
                  apiService: ApiService(Dio(BaseOptions(
                connectTimeout: const Duration(minutes: 1),
                receiveTimeout: const Duration(minutes: 1),
                baseUrl: ApiConstants.apiBaseUrl,
                responseType: ResponseType.plain,
                contentType: 'application/json',
                headers: {
                  'Content-Type': 'application/json',
                  'Accept': 'application/json',
                  'Charset': 'utf-8'
                },

                // // will not throw errors
              )))))),

this error in dio or what

0

There are 0 answers