Implementing Remember Me Functionality In Flutter Using Local Storage.

Ashutosh Singh
Flutter Community
Published in
3 min readJun 20, 2021

--

In this article, I will show you how you implement remember me functionality in your app with the help of local storage.
The basic idea is when user put their credential in the text field and click on the checkbox to remember me button we have to save their detail in local storage and when users log out from the app we have to retrieve the data from local storage and put in the text field.
There are many options to save data in the local database in flutter but for this article, we gonna use SharedPreference to save data in the local database.

Before building UI and functionality you have to add a shared preferences plugin in your project inside the pubspec.yml file

dependencies:
shared_preferences: 'latest version'

Shared_Preferences: shared_preferences is a Flutter plugin that allows you to save data in a key-value format so you can easily retrieve it later.

Implementing UI

I have created a stateful widget where I define two text edit controllers for email and password and one bool value…

--

--