toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'username': username,
    'email': email,
    'phone': phone,
    'profile_pic': profilePic,
    'role_id': roleId,
    'is_active': isActive,
    'role': role?.toJson(),
  };
}