selfprivacy.org.app/lib/config/localization.dart
2022-05-24 21:55:39 +03:00

23 lines
551 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: const [Locale('ru'), Locale('en')],
path: 'assets/translations',
fallbackLocale: const Locale('en'),
saveLocale: false,
useOnlyLangCode: true,
child: child!,
);
}
}