Simple Settings Page

Loading preview

Starting the Flutter app

A Flutter settings screen with a simple list of preferences and switches.

Get the source

Add it to your project

Copies the Dart source into your app, so you own it. Flutter SDK only, no extra packages.

First time? Run dart pub global activate fluttertemplates_dev, or read the CLI guide.

How it works

The one live control is _isDark. Its Switch swaps a Theme wrapped around this page between ThemeData.dark() and ThemeData.light(), so only this subtree changes and the rest of the app stays as it was; your custom theme is discarded here too. _SingleSection accepts a null title, which is how the last group renders headerless. Tapping the Dark Mode row toggles it. Other rows go through _openRow, which calls onRowTap with the title, or shows a demo SnackBar without it.

Adapting it

  • Remove the local Theme and push _isDark to app-level state feeding MaterialApp.themeMode.
  • Persist _isDark with shared_preferences.
  • Handle Sign out in onRowTap to run your auth logout.