@@ -14,8 +14,8 @@ export 'src/extension/stringcare_ext.dart';
14
14
export 'src/i18n/remote_languages.dart' ;
15
15
export 'src/widget/sc_asset_image_provider.dart' ;
16
16
export 'src/widget/sc_image_asset.dart' ;
17
- export 'src/widget/sc_svg.dart' ;
18
17
export 'src/widget/sc_state.dart' ;
18
+ export 'src/widget/sc_svg.dart' ;
19
19
20
20
class Stringcare {
21
21
static Stringcare ? _instance;
@@ -190,20 +190,6 @@ class Stringcare {
190
190
return AppLocalizations .of (context)? .load () ?? Future .value (false );
191
191
}
192
192
193
- Future <void > refreshWithLang (String ? lang) async {
194
- withLang = () => lang;
195
- if (await Stringcare ().load ()) {
196
- GlobalRefresh ().refresh ();
197
- }
198
- }
199
-
200
- Future <void > refreshWithLocale (Locale ? locale) async {
201
- withLocale = () => locale;
202
- if (await Stringcare ().load ()) {
203
- GlobalRefresh ().refresh ();
204
- }
205
- }
206
-
207
193
Future <void > refreshWithLangWithContext (
208
194
BuildContext ? context,
209
195
String ? lang,
@@ -223,4 +209,10 @@ class Stringcare {
223
209
GlobalRefresh ().refresh ();
224
210
}
225
211
}
212
+
213
+ Future <void > refreshWithLang (String ? lang) =>
214
+ refreshWithLangWithContext (context, lang);
215
+
216
+ Future <void > refreshWithLocale (Locale ? locale) =>
217
+ refreshWithLocaleWithContext (context, locale);
226
218
}
0 commit comments