How to check object in model class when its null sometime in response in flutter

Viewed 23
1 Answers

please try with this

if(json['subscription'] !=null) { subscription = Subscription.fromJson(json['subscription']); }
Related