right-to-left (RTL) in flutter

you have two choices : 1. force a locale ( and direction ) on all devices — method 1: with localization add flutter_localizations package to your pubspec.yml dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter then import ‘package:flutter/material.dart’; import ‘package:flutter_localizations/flutter_localizations.dart’; MaterialApp( localizationsDelegates: [ GlobalCupertinoLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], supportedLocales: [ Locale(“fa”, “IR”), // OR Locale(‘ar’, ‘AE’) OR … Read more

How to set Navigation Drawer to be opened from right to left

In your main layout set your ListView gravity to right: android:layout_gravity=”right” Also in your code : mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close) { @Override public boolean onOptionsItemSelected(MenuItem item) { if (item != null && item.getItemId() == android.R.id.home) { if (mDrawerLayout.isDrawerOpen(Gravity.RIGHT)) { mDrawerLayout.closeDrawer(Gravity.RIGHT); } else { mDrawerLayout.openDrawer(Gravity.RIGHT); } } return false; } }; hope … Read more

Android context.getResources.updateConfiguration() deprecated

Inspired by Calligraphy, I ended up creating a context wrapper. In my case, I need to overwrite system language to provide my app users with the option of changing app language but this can be customized with any logic that you need to implement. import android.annotation.TargetApi; import android.content.Context; import android.content.ContextWrapper; import android.content.res.Configuration; import android.os.Build; import … Read more