Member-only story

Securing Flutter apps

Getting started

Daniel Llewellyn
4 min readAug 10, 2020

When developing flutter apps, we’re forced to learn two different platforms and their security (and more for desktop and web) as well as the dart and flutter ecosystem itself. To help get started, here are a few steps and libraries we can take to secure our flutter applications.

Sandbox

Both Android and iOS have the concept of a ‘sandbox’ i.e. a directory on disk which cannot be read by any other application save your own, this directory can be retrieved using the Path provider library

Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;

Files placed in this directory are stored in the app sandbox. It’s common to use shared preferences for simple key value pairs, and this library will default to storing the file in the application sandbox. Other libraries for storing databases will likely also do it, but be sure to check.

--

--

No responses yet