carp-dk / carp-dk/flutter-plugins

[weather] Add Support for LanguageCode to WeatherFactorys constructor.

Open
#334 1 comment 1 reaction 0 assignees View on GitHub
improvement
Dominant language
Dart
Stars
608
Forks
735
Avg merge
1m
Merged PRs (30d)
3

Description

### Description
I would like to just pass the languagecode to the WeatherFactory instead of Language enum. Is there a special reason why this enum was introduced? Cause in _buildUrl the enum is converted to languagecode anyway. So for me its unnecessary complexity to convert the `Localizations.localeOf(context).languageCode` to packages Language enum and then the packages just convert it back to languagecode.

Alternative, please add a constructor `.fromLanguageCode` to the Language enum.

Best Regards
Micha

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.