mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-18 06:39:14 +00:00
22 lines
579 B
Dart
22 lines
579 B
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class Localization extends StatelessWidget {
|
|
const Localization({
|
|
super.key,
|
|
this.child,
|
|
});
|
|
|
|
final Widget? child;
|
|
@override
|
|
Widget build(final BuildContext context) => EasyLocalization(
|
|
supportedLocales: const [Locale('ru'), Locale('en')],
|
|
path: 'assets/translations',
|
|
fallbackLocale: const Locale('en'),
|
|
useFallbackTranslations: true,
|
|
saveLocale: false,
|
|
useOnlyLangCode: true,
|
|
child: child!,
|
|
);
|
|
}
|