class CommonResponse { int? error; int? balance; String? message; String? filePath; CommonResponse({this.error, this.balance, this.message}); CommonResponse.fromJson(Map json) { error = int.tryParse(json['error']?.toString() ?? ''); balance = int.tryParse(json['balance']?.toString() ?? ''); message = json['message']?.toString(); filePath = json['bill_filepath']?.toString(); } Map toJson() { return { 'error': error, 'balance': balance, 'message': message, 'bill_filepath': filePath, }; } }