You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/models/new_models/swipe_model.dart

67 lines
1.3 KiB
Dart

class SwipeModel {
final bool data;
final String message;
final String? title;
final String? innerMessage;
final int responseCode;
final bool isSuccess;
SwipeModel({
required this.data,
required this.message,
this.title,
this.innerMessage,
required this.responseCode,
required this.isSuccess,
});
factory SwipeModel.fromJson(Map<String, dynamic> json) {
return SwipeModel(
data: json['data'] as bool,
message: json['message'] as String,
title: json['title'] as String?,
innerMessage: json['innerMessage'] as String?,
responseCode: json['responseCode'] as int,
isSuccess: json['isSuccess'] as bool,
);
}
Map<String, dynamic> toJson() {
return {
'data': data,
'message': message,
'title': title,
'innerMessage': innerMessage,
'responseCode': responseCode,
'isSuccess': isSuccess,
};
}
}
class Swipe {
final int swipeTypeValue;
final String value;
final double ?latitude;
final double ?longitude;
Swipe({
required this.swipeTypeValue,
required this.value,
required this.latitude,
required this.longitude,
});
Map<String, dynamic> toJson() {
return {
'swipeTypeValue': swipeTypeValue,
'value': value,
'latitude': latitude,
'longitude': longitude,
};
}
}