Community.fromJson constructor

Community.fromJson(
  1. dynamic json
)

Implementation

factory Community.fromJson(dynamic json) => Community(
      id: json["id"],
      name: json["name"],
      slug: json["slug"],
      description: json["description"],
      bannerImage: json["banner_image"],
      isActive: json["is_active"],
      allowPosts: json["allow_posts"],
      moderatePosts: json["moderate_posts"],
      app: json['app'] != null ? CommunityApp.fromJson(json["app"]) : null,
      createdAt: json['created_at'] != null
          ? DateTime.parse(json["created_at"])
          : null,
      updatedAt: json['updated_at'] != null
          ? DateTime.parse(json["updated_at"])
          : null,
    );