FortniteApiIo constructor Null safety

FortniteApiIo(
  1. {required String apiKey,
  2. String language = "en"}
)

constructor for fortnite api io object

Implementation

FortniteApiIo({
  required this.apiKey,
  this.language = "en",
}) {
  [
    "en",
    "ar",
    "de",
    "es",
    "es-419",
    "fr",
    "it",
    "ja",
    "ko",
    "pl",
    "pt-BR",
    "ru",
    "tr",
    "zh-CN",
    "zh-Hant",
  ].contains(language)
      ? null
      : throw Exception("Language not supported");
}