I have an app and I want to localize it to Arabic using easy_localization package. It changes the language but the direction of the widgets does not change.
void main() {
runApp(
EasyLocalization(
child: MyApp(),
supportedLocales: [
Locale('en', 'US'),
Locale('ku', ''),
Locale('ar','DZ'),
],
path: 'assets/langs',
),
);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
KuMaterialLocalizations.delegate
],
locale: Locale('ar'),
title: 'MyApp',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: Language(),
);
}
}