How to change initial language of flutter app?

Issue

I am trying to create Arabic flutter app and the default language of flutter app is English , I want the app to start with Arabic language , So how can I achieve this ?

Solution

return MaterialApp(
      localizationsDelegates: [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: [
        const Locale('en'),
        const Locale('ar'),
      ],
      locale: const Locale('ar'),
);

Answered By – novol

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *