build method

  1. @override
Map<String, Object?> build()
override

Implementation

@override
Map<String, Object?> build() => {
      ...super.build(),
      if (type != null) 'type': type!.value,
      if (!identical(topic, sentinelString)) 'topic': topic,
      if (isNsfw != null) 'nsfw': isNsfw,
      if (!identical(rateLimitPerUser, sentinelDuration)) 'rate_limit_per_user': rateLimitPerUser?.inSeconds,
      if (!identical(parentId, sentinelSnowflake)) 'parent_id': parentId?.toString(),
      if (!identical(defaultAutoArchiveDuration, sentinelDuration)) 'default_auto_archive_duration': defaultAutoArchiveDuration?.inMinutes,
      if (defaultThreadRateLimitPerUser != null) 'default_thread_rate_limit_per_user': defaultThreadRateLimitPerUser!.inSeconds,
    };