getOrdinalRules function
Implementation
String? getOrdinalRules(int number, String? localeCode) {
if (localeCode == null) {
return null;
}
final ordinalFormatter = js.JsObject(
js.context['Intl']['PluralRules'],
[
localeCode,
js.JsObject.jsify({'type': 'ordinal'}),
],
);
final ordinalRules = ordinalFormatter.callMethod('select', [number]);
return ordinalRules;
}