Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No public description #771

Merged
1 commit merged into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkgs/intl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.20.0-dev
* Type `numberFormatSymbols` as a `Map<String, NumberSymbols>`.

## 0.19.0
* Update to CLDR v44.
* Update to CLDR v43.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl/lib/number_symbols_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ library number_symbol_data;
import "number_symbols.dart";

/// Map from locale to [NumberSymbols] used for that locale.
Map<dynamic, dynamic> numberFormatSymbols = <String, NumberSymbols>{
Map<String, NumberSymbols> numberFormatSymbols = <String, NumberSymbols>{
// Number formatting symbols for locale af.
"af": new NumberSymbols(
NAME: "af",
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl/lib/src/intl/compact_number_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class _CompactNumberFormat extends NumberFormat {
// Initialization copied from `NumberFormat` constructor.
// TODO(davidmorgan): deduplicate.
locale = helpers.verifiedLocale(locale, NumberFormat.localeExists, null)!;
var symbols = numberFormatSymbols[locale] as NumberSymbols;
var symbols = numberFormatSymbols[locale]!;
var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0);
var zeroOffset = localeZero - constants.asciiZeroCodeUnit;
name ??= symbols.DEF_CURRENCY_CODE;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl/lib/src/intl/number_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class NumberFormat {
bool lookupSimpleCurrencySymbol = false,
bool isForCurrency = false}) {
locale = helpers.verifiedLocale(locale, localeExists, null)!;
var symbols = numberFormatSymbols[locale] as NumberSymbols;
var symbols = numberFormatSymbols[locale]!;
var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0);
var zeroOffset = localeZero - constants.asciiZeroCodeUnit;
name ??= symbols.DEF_CURRENCY_CODE;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: intl
version: 0.19.0
version: 0.20.0-dev
description: >-
Contains code to deal with internationalized/localized messages, date and
number formatting and parsing, bi-directional text, and other
Expand Down
Loading