mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-10-31 22:17:29 +00:00
23 lines
539 B
Dart
23 lines
539 B
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class Localization extends StatelessWidget {
|
|
const Localization({
|
|
Key? key,
|
|
this.child,
|
|
}) : super(key: key);
|
|
|
|
final Widget? child;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return EasyLocalization(
|
|
supportedLocales: [Locale('ru'), Locale('en')],
|
|
path: 'assets/translations',
|
|
fallbackLocale: Locale('en'),
|
|
saveLocale: false,
|
|
useOnlyLangCode: true,
|
|
child: child!,
|
|
);
|
|
}
|
|
}
|