Skip to content

Commit fbbb817

Browse files
author
Gökberk Bardakçı
committed
minor fix for flutter version
1 parent 25722bd commit fbbb817

File tree

4 files changed

+81
-110
lines changed

4 files changed

+81
-110
lines changed

example/ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ EXTERNAL SOURCES:
1414
:path: ".symlinks/plugins/locale_plus/ios"
1515

1616
SPEC CHECKSUMS:
17-
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
17+
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
1818
locale_plus: 89c741a60ee3bad68ddbb86c172ed45db98a5ae3
1919

2020
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

example/pubspec.lock

+50-83
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,58 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
9-
url: "https://pub.dev"
8+
url: "https://pub.dartlang.org"
109
source: hosted
11-
version: "2.10.0"
10+
version: "2.8.2"
1211
boolean_selector:
1312
dependency: transitive
1413
description:
1514
name: boolean_selector
16-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17-
url: "https://pub.dev"
15+
url: "https://pub.dartlang.org"
1816
source: hosted
19-
version: "2.1.1"
17+
version: "2.1.0"
2018
characters:
2119
dependency: transitive
2220
description:
2321
name: characters
24-
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
25-
url: "https://pub.dev"
22+
url: "https://pub.dartlang.org"
23+
source: hosted
24+
version: "1.2.0"
25+
charcode:
26+
dependency: transitive
27+
description:
28+
name: charcode
29+
url: "https://pub.dartlang.org"
2630
source: hosted
27-
version: "1.2.1"
31+
version: "1.3.1"
2832
clock:
2933
dependency: transitive
3034
description:
3135
name: clock
32-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33-
url: "https://pub.dev"
36+
url: "https://pub.dartlang.org"
3437
source: hosted
35-
version: "1.1.1"
38+
version: "1.1.0"
3639
collection:
3740
dependency: transitive
3841
description:
3942
name: collection
40-
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
41-
url: "https://pub.dev"
43+
url: "https://pub.dartlang.org"
4244
source: hosted
43-
version: "1.17.0"
44-
crypto:
45-
dependency: transitive
46-
description:
47-
name: crypto
48-
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
49-
url: "https://pub.dev"
50-
source: hosted
51-
version: "3.0.2"
45+
version: "1.15.0"
5246
cupertino_icons:
5347
dependency: "direct main"
5448
description:
5549
name: cupertino_icons
56-
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
57-
url: "https://pub.dev"
50+
url: "https://pub.dartlang.org"
5851
source: hosted
5952
version: "1.0.5"
6053
fake_async:
6154
dependency: transitive
6255
description:
6356
name: fake_async
64-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
65-
url: "https://pub.dev"
57+
url: "https://pub.dartlang.org"
6658
source: hosted
67-
version: "1.3.1"
59+
version: "1.2.0"
6860
flutter:
6961
dependency: "direct main"
7062
description: flutter
@@ -74,8 +66,7 @@ packages:
7466
dependency: "direct dev"
7567
description:
7668
name: flutter_lints
77-
sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
78-
url: "https://pub.dev"
69+
url: "https://pub.dartlang.org"
7970
source: hosted
8071
version: "1.0.4"
8172
flutter_test:
@@ -87,24 +78,14 @@ packages:
8778
dependency: transitive
8879
description:
8980
name: intl
90-
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
91-
url: "https://pub.dev"
81+
url: "https://pub.dartlang.org"
9282
source: hosted
9383
version: "0.17.0"
94-
js:
95-
dependency: transitive
96-
description:
97-
name: js
98-
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
99-
url: "https://pub.dev"
100-
source: hosted
101-
version: "0.6.5"
10284
lints:
10385
dependency: transitive
10486
description:
10587
name: lints
106-
sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
107-
url: "https://pub.dev"
88+
url: "https://pub.dartlang.org"
10889
source: hosted
10990
version: "1.0.1"
11091
locale_plus:
@@ -118,40 +99,35 @@ packages:
11899
dependency: transitive
119100
description:
120101
name: matcher
121-
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
122-
url: "https://pub.dev"
102+
url: "https://pub.dartlang.org"
123103
source: hosted
124-
version: "0.12.13"
104+
version: "0.12.11"
125105
material_color_utilities:
126106
dependency: transitive
127107
description:
128108
name: material_color_utilities
129-
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
130-
url: "https://pub.dev"
109+
url: "https://pub.dartlang.org"
131110
source: hosted
132-
version: "0.2.0"
111+
version: "0.1.3"
133112
meta:
134113
dependency: transitive
135114
description:
136115
name: meta
137-
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
138-
url: "https://pub.dev"
116+
url: "https://pub.dartlang.org"
139117
source: hosted
140-
version: "1.8.0"
118+
version: "1.7.0"
141119
path:
142120
dependency: transitive
143121
description:
144122
name: path
145-
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
146-
url: "https://pub.dev"
123+
url: "https://pub.dartlang.org"
147124
source: hosted
148-
version: "1.8.2"
125+
version: "1.8.0"
149126
plugin_platform_interface:
150127
dependency: transitive
151128
description:
152129
name: plugin_platform_interface
153-
sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a
154-
url: "https://pub.dev"
130+
url: "https://pub.dartlang.org"
155131
source: hosted
156132
version: "2.1.3"
157133
sky_engine:
@@ -163,74 +139,65 @@ packages:
163139
dependency: transitive
164140
description:
165141
name: source_span
166-
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
167-
url: "https://pub.dev"
142+
url: "https://pub.dartlang.org"
168143
source: hosted
169-
version: "1.9.1"
144+
version: "1.8.1"
170145
stack_trace:
171146
dependency: transitive
172147
description:
173148
name: stack_trace
174-
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
175-
url: "https://pub.dev"
149+
url: "https://pub.dartlang.org"
176150
source: hosted
177-
version: "1.11.0"
151+
version: "1.10.0"
178152
stream_channel:
179153
dependency: transitive
180154
description:
181155
name: stream_channel
182-
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
183-
url: "https://pub.dev"
156+
url: "https://pub.dartlang.org"
184157
source: hosted
185-
version: "2.1.1"
158+
version: "2.1.0"
186159
string_scanner:
187160
dependency: transitive
188161
description:
189162
name: string_scanner
190-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
191-
url: "https://pub.dev"
163+
url: "https://pub.dartlang.org"
192164
source: hosted
193-
version: "1.2.0"
165+
version: "1.1.0"
194166
term_glyph:
195167
dependency: transitive
196168
description:
197169
name: term_glyph
198-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
199-
url: "https://pub.dev"
170+
url: "https://pub.dartlang.org"
200171
source: hosted
201-
version: "1.2.1"
172+
version: "1.2.0"
202173
test_api:
203174
dependency: transitive
204175
description:
205176
name: test_api
206-
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
207-
url: "https://pub.dev"
177+
url: "https://pub.dartlang.org"
208178
source: hosted
209-
version: "0.4.16"
179+
version: "0.4.8"
210180
typed_data:
211181
dependency: transitive
212182
description:
213183
name: typed_data
214-
sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
215-
url: "https://pub.dev"
184+
url: "https://pub.dartlang.org"
216185
source: hosted
217186
version: "1.3.0"
218187
universal_io:
219188
dependency: transitive
220189
description:
221190
name: universal_io
222-
sha256: "79f78ddad839ee3aae3ec7c01eb4575faf0d5c860f8e5223bc9f9c17f7f03cef"
223-
url: "https://pub.dev"
191+
url: "https://pub.dartlang.org"
224192
source: hosted
225-
version: "2.0.4"
193+
version: "2.2.0"
226194
vector_math:
227195
dependency: transitive
228196
description:
229197
name: vector_math
230-
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
231-
url: "https://pub.dev"
198+
url: "https://pub.dartlang.org"
232199
source: hosted
233-
version: "2.1.4"
200+
version: "2.1.1"
234201
sdks:
235-
dart: ">=2.18.0 <3.0.0"
202+
dart: ">=2.16.2 <3.0.0"
236203
flutter: ">=2.5.0"

lib/patch_all_locales.dart

+29-25
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ import 'package:intl/number_symbols_data.dart';
55
import 'package:locale_plus/locale_plus.dart';
66

77
extension on NumberSymbols {
8-
NumberSymbols overrideSeperators(
9-
{String? decimalSeparator, String? groupingSeparator}) =>
8+
NumberSymbols overrideSeperators({
9+
String? decimalSeparator,
10+
String? groupingSeparator,
11+
}) =>
1012
NumberSymbols(
11-
NAME: NAME,
12-
DECIMAL_SEP: decimalSeparator ?? DECIMAL_SEP,
13-
GROUP_SEP: groupingSeparator ?? GROUP_SEP,
14-
PERCENT: PERCENT,
15-
ZERO_DIGIT: ZERO_DIGIT,
16-
PLUS_SIGN: PLUS_SIGN,
17-
MINUS_SIGN: MINUS_SIGN,
18-
EXP_SYMBOL: EXP_SYMBOL,
19-
PERMILL: PERMILL,
20-
INFINITY: INFINITY,
21-
NAN: NAN,
22-
DECIMAL_PATTERN: DECIMAL_PATTERN,
23-
SCIENTIFIC_PATTERN: SCIENTIFIC_PATTERN,
24-
PERCENT_PATTERN: PERCENT_PATTERN,
25-
CURRENCY_PATTERN: CURRENCY_PATTERN,
26-
DEF_CURRENCY_CODE: DEF_CURRENCY_CODE);
13+
NAME: NAME,
14+
DECIMAL_SEP: decimalSeparator ?? DECIMAL_SEP,
15+
GROUP_SEP: groupingSeparator ?? GROUP_SEP,
16+
PERCENT: PERCENT,
17+
ZERO_DIGIT: ZERO_DIGIT,
18+
PLUS_SIGN: PLUS_SIGN,
19+
MINUS_SIGN: MINUS_SIGN,
20+
EXP_SYMBOL: EXP_SYMBOL,
21+
PERMILL: PERMILL,
22+
INFINITY: INFINITY,
23+
NAN: NAN,
24+
DECIMAL_PATTERN: DECIMAL_PATTERN,
25+
SCIENTIFIC_PATTERN: SCIENTIFIC_PATTERN,
26+
PERCENT_PATTERN: PERCENT_PATTERN,
27+
CURRENCY_PATTERN: CURRENCY_PATTERN,
28+
DEF_CURRENCY_CODE: DEF_CURRENCY_CODE,
29+
);
2730
}
2831

2932
// ignore: avoid_classes_with_only_static_members
@@ -37,16 +40,16 @@ class PatchAllLocales {
3740
/// The samsung keyboard always uses a '.' as input for a decimal seperator.
3841
/// This means that the [DECIMAL_SEP] is a '.' and the [GROUP_SEP] is a ','
3942
/// see https://github.com/flutter/flutter/issues/61175
40-
static Future<void> patchNumberSeperators(
41-
{bool patchForSamsungKeyboards = false}) async {
43+
static Future<void> patchNumberSeperators({
44+
bool patchForSamsungKeyboards = false,
45+
}) async {
4246
final localePlus = LocalePlus();
4347
try {
4448
final bool isUsingSamsungKeyboard = patchForSamsungKeyboards &&
4549
(await localePlus.isUsingSamsungKeyboard() ?? false);
4650

47-
final String? userDecimalSeperator = isUsingSamsungKeyboard
48-
? '.'
49-
: (await localePlus.getDecimalSeparator());
51+
final String? userDecimalSeperator =
52+
isUsingSamsungKeyboard ? '.' : await localePlus.getDecimalSeparator();
5053

5154
final String? userGroupingSeperator = isUsingSamsungKeyboard
5255
? ','
@@ -74,8 +77,9 @@ please create an issue on https://github.com/gokberkbar/locale_plus''');
7477
}
7578
for (final MapEntry<String, NumberSymbols> n in entries) {
7679
numberFormatSymbols[n.key] = n.value.overrideSeperators(
77-
decimalSeparator: userDecimalSeperator,
78-
groupingSeparator: userGroupingSeperator);
80+
decimalSeparator: userDecimalSeperator,
81+
groupingSeparator: userGroupingSeperator,
82+
);
7983
}
8084
} on MissingPluginException {
8185
debugPrint(

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies:
1717
dev_dependencies:
1818
flutter_test:
1919
sdk: flutter
20-
flutter_lints: ^2.0.1
20+
flutter_lints: ^1.0.4
2121

2222
flutter:
2323
plugin:

0 commit comments

Comments
 (0)