Posts

Showing posts from June, 2022

Flutter Security Essentials

It's almost asked to me thrice in recent interviews. Usually I explained about local authentication, prevent screenshots and flutter secure storage. But it has more than that. Yes, Flutter is completely new. Securing native apps would be more comfortable to do. But actual things, you can do more that in flutter. We can see that step by step. 1. Flutter Secure Storage Securing Data is very important. Using key value pair, you can achieve it. It's similar like shared_preference, but it can encrypt and decrypt data.  2. Obfuscate code For android, usually will do these stuff in ProGuard.  In app.gradle: android { ... buildTypes { release { signingConfig signingConfigs.release minifyEnabled true useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } i n /android/app/proguard-rules.pro: # Flutter -keep class io.flutter.app.** { *; } -keep class io.flutter.plugin.**  { *; } -keep