79411903

Date: 2025-02-04 13:47:54
Score: 1
Natty:
Report link

The correct way is to check first whether the reLoadPage variable is bool or not so that you can check its type.

final reLoadPage = null;
if((reLoadPage is bool) ? reLoadPage : false){
print("Can reLoadPage");
}
else{
print("Can Not reLoadPage");
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Nitesh Wadhwani