selfprivacy.org.app/lib/config/localization.dart

23 lines
547 B
Dart
Raw Normal View History

2020-12-01 12:26:29 +00:00
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(
preloaderColor: Colors.black,
supportedLocales: [Locale('ru'), Locale('en')],
path: 'assets/translations',
fallbackLocale: Locale('en'),
useOnlyLangCode: true,
child: child,
);
}
}