/flutter-dark-mode-example

Choose between dark mode, light mode and system mode and store the selected theme in SharedPreferences

Primary LanguageDart

A Flutter dark mode example app

This App shows how to implement a settings screen where the user can choose whether to use dark mode, light mode or system mode and persist it in SharedPreferences.

Description

This app uses the ChangeNotifier and the provider package in order to notify the Material App Widget about theme changes.

Run the app

Either connect a device, start ios simulator or start a Android emulator. Afterwards run this command from the root of the project flutter run or flutter run -d <device_id>from the root of the project.