Home > Blockchain >  type 'Null' is not a subtype of type 'List<int>' in type cast in flutter
type 'Null' is not a subtype of type 'List<int>' in type cast in flutter

Time:10-01

I am having a strange problem. I don't think that there is any problem with the url of image. Problem happens when I restart the simulator

Update It seems the the image is expired How can I catch this exception?

I am just calling a network image

return CircleAvatar(
                      radius: 40.0,
                      backgroundImage: NetworkImage(
                          sessionControl.currentUser.value.picture),
                      backgroundColor: Colors.transparent,
                    );

Error log

Launching lib/main.dart on iPhone 13 in debug mode...
Xcode build done.                                           13.5s
Connecting to VM Service at ws://127.0.0.1:57758/38wgT4iPnbk=/ws
flutter: Check 1 : Is Amplify SetState set to true ? false
[GETX] Instance "GetMaterialController" has been created
[GETX] Instance "GetMaterialController" has been initialized
flutter: Check 1 : Is Amplify SetState set to true ? true
flutter: Session Sign In Status = true
flutter: Check 1 : Is Amplify SetState set to true ? true
[GETX] Instance "HomeController" has been created
[GETX] Instance "HomeController" has been initialized
flutter: Requested for pulling current user info
[GETX] Instance "SessionController" has been created
[GETX] Instance "SessionController" has been initialized
flutter: Printing session control picture :
flutter: Printing session control picture :
flutter: Printing session control picture : https://dontak4d751b4dd50548f1b4819e95919c2d17220339-oxlnewenv.s3.ap-southeast-2.amazonaws.com/public/Aaronimage_picker_29FADB72-2761-4BB9-89B0-9EFA849305BA-33481-0000009746CE94EE.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=/20210930/ap-southeast-2/s3/aws4_request&X-Amz-Date=20210930T195105Z&X-Amz-Expires=17999&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEHQaDmFwLXNvdXRoZWFzdC0yIkYwRAIgJGnlBRuLiHfiSRjwIH8XnKYWqrmIPMfdOcchb8P878sCIBmI362NDDXenQUm           
  • Related