friend_relation.dart 639 B

123456789101112131415161718192021222324
  1. import 'package:sport/bean/user_friend.dart';
  2. class FriendRelation {
  3. UserFriend? followDetail;
  4. String? relation;
  5. FriendRelation({this.followDetail, this.relation});
  6. FriendRelation.fromJson(Map<String, dynamic> json) {
  7. if (json['followDetail'] != null) {
  8. followDetail = UserFriend.fromJson(json['followDetail']);
  9. }
  10. relation = json['relation'];
  11. }
  12. Map<String, dynamic> toJson() {
  13. final Map<String, dynamic> data = new Map<String, dynamic>();
  14. if (this.followDetail != null) {
  15. data['followDetail'] = this.followDetail!.toJson();
  16. }
  17. data['relation'] = this.relation;
  18. return data;
  19. }
  20. }