matchesLocale static method
Check if the current locale matches a specific locale
Implementation
static bool matchesLocale(BuildContext? context, String languageCode,
[String? countryCode]) {
final currentLocale = getCurrentLocale(context: context);
if (countryCode != null) {
return currentLocale.languageCode == languageCode &&
currentLocale.countryCode == countryCode;
}
return currentLocale.languageCode == languageCode;
}