Igot this error while working on a flutter project where im trying to get profile description data from a laravel backend. backend is working fine (tested with postman) but since im new to flutter I cant figure out the problem, here's my flutter function:
```
Future<void> onInit() async {
super.onInit();
var data = Get.parameters;
print(data);
state.to_name.value = data["to_name"] ?? "";
state.to_avatar.value = data["to_avatar"] ?? "";
state.to_token.value = data["to_token"] ?? "";
log("to token... ${state.to_token}");
//to get desciption
LoginRequestEntity getProfileRequestEntity = new LoginRequestEntity();
getProfileRequestEntity.token = state.to_token.value;
var result = await UserAPI.get_Profile_description(params: getProfileRequestEntity);
print("CODE ${result.code}.. MESSAGE ${result.msg}.... DATA ${result.data}");
if (result.code == 0) {
print("recieved");
}
```
logs :
```
I/flutter (14441): ** Instance "ChatProfileController" has been created. isError: [false]
I/flutter (14441): ** Instance “ChatProfileController” has been initialized. isError: [false]
E/flutter (14441): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type ‘_Map<String, dynamic>’ is not a subtype of type ‘String?’
E/flutter (14441): #0 new BaseResponseEntity.fromJson (package:chatty/common/entities/base.dart:17:19)
E/flutter (14441): #1 UserAPI.get_Profile_description (package:chatty/common/apis/user.dart:31:31)
E/flutter (14441):
E/flutter (14441): #2 ChatProfileController.onInit (package:chatty/pages/message/chat/chatprofile/controller.dart:40:18)
E/flutter (14441):
E/flutter (14441):
“`
Aziz Sdiri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.