Last updated:
0 purchases
ordinal formatter
ordinal_formatter #
A simple flutter plugin to convert numbers into ordinal string using the built in native iOS and android libraries.
Example:
final ordinalString = await OrdinalFormatter().format(2) ?? ''; // ordinalString value: '2nd'
copied to clipboard
Usage #
import 'package:ordinal_formatter/ordinal_formatter.dart';
String ordinalNumber;
try {
ordinalNumber = await OrdinalFormatter().format(2, 'en_US') ?? 'Unknown number';
} on PlatformException catch (e) {
ordinalNumber = 'Formatting failed: $e';
}
copied to clipboard
Features #
✅ iOS Support
✅ Android Support
✅ Web support
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.