24 lines
435 B
Dart
24 lines
435 B
Dart
|
|
import 'package:design/design.dart';
|
|||
|
|
import 'package:example/generated/l10n.dart';
|
|||
|
|
|
|||
|
|
extension SExt on S {
|
|||
|
|
String get multipleSeparator => '×';
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
class AppStrings {
|
|||
|
|
static S? _instance;
|
|||
|
|
|
|||
|
|
static S get() {
|
|||
|
|
S? result = _instance;
|
|||
|
|
if (result == null) {
|
|||
|
|
result = S.of(Get.context!);
|
|||
|
|
_instance = result;
|
|||
|
|
}
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
static void init(BuildContext context) {
|
|||
|
|
_instance = S.of(context);
|
|||
|
|
}
|
|||
|
|
}
|