diff --git a/pkgs/intl4x/README.md b/pkgs/intl4x/README.md index 047a70fa..b94a3d0d 100644 --- a/pkgs/intl4x/README.md +++ b/pkgs/intl4x/README.md @@ -36,10 +36,12 @@ import 'package:intl4x/ecma_policy.dart'; import 'package:intl4x/intl4x.dart'; import 'package:intl4x/number_format.dart'; -final numberFormat = Intl( - ecmaPolicy: const AlwaysEcma(), - defaultLocale: Locale(language: 'en', country: 'US'), -).numberFormat(NumberFormatOptions.percent()); - -print(numberFormat.format(0.5)); // prints 50% +void main() { + final numberFormat = Intl( + ecmaPolicy: const AlwaysEcma(), + locale: const Locale(language: 'en', region: 'US'), + ).numberFormat(NumberFormatOptions.percent()); + + print(numberFormat.format(0.5)); // prints 50% +} ```