Skip to content

Commit

Permalink
fix readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Jul 20, 2023
1 parent a279667 commit d961402
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkgs/intl4x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%
}
```

0 comments on commit d961402

Please sign in to comment.