import 'package:flutter/material.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 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 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 toJson() { return { 'swipeTypeValue': swipeTypeValue, 'value': value, 'latitude': latitude, 'longitude': longitude, }; } }