Skip to content

Commit 3d9758b

Browse files
yadaniyilclaude
andcommitted
docs: update README with real screenshots and fix platform claims
- Replace placeholder images with actual screenshots from example app - Add Material 3 demo screenshot showing ColorScheme seed colors - Fix platform description: macOS/Windows use Cupertino, Linux uses Material - Restore original cover image showing Android, iOS, and Web/browser - Add comprehensive quick start, tile types, theming, and API reference sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 65d3a25 commit 3d9758b

5 files changed

Lines changed: 71 additions & 82 deletions

File tree

README.md

Lines changed: 71 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
[![Pub Version](https://img.shields.io/pub/v/settings_ui?color=blueviolet)](https://pub.dev/packages/settings_ui)
44
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
5-
[![Platform](https://img.shields.io/badge/platform-android%20%7C%20ios%20%7C%20web%20%7C%20macos%20%7C%20windows%20%7C%20linux-lightgrey)](https://pub.dev/packages/settings_ui)
5+
[![Platform](https://img.shields.io/badge/platform-android%20%7C%20ios%20%7C%20web-lightgrey)](https://pub.dev/packages/settings_ui)
66

7-
A Flutter package for building native-looking settings screens across **Android, iOS, Web, macOS, Windows, and Linux** from a single API. The UI automatically adapts to each platform's visual styleMaterial for Android/Web/Linux, Cupertino for iOS/macOS/Windows.
7+
A Flutter package for building settings screens that look native on **Android**, **iOS**, and **Web** — all from a single API. The UI automatically adapts to each platform's visual style: Material for Android, Cupertino for iOS, and a card-based Web layout. Also runs on macOS, Windows, Linux, and Fuchsia (macOS/Windows use the Cupertino style; Linux uses Material).
88

99
<p align="center">
10-
<img src="https://raw.githubusercontent.com/yako-dev/flutter-settings-ui/master/assets/v2/android/mockup_01.png" height="540px">
11-
&nbsp;&nbsp;&nbsp;&nbsp;
12-
<img src="https://raw.githubusercontent.com/yako-dev/flutter-settings-ui/master/assets/v2/iOS/mockup_01.png" height="540px">
10+
<img src="https://raw.githubusercontent.com/yako-dev/flutter-settings-ui/master/assets/v2/settings_ui_cover.png" height="400px">
1311
</p>
1412

1513
---
@@ -19,7 +17,7 @@ A Flutter package for building native-looking settings screens across **Android,
1917
- [Installing](#installing)
2018
- [Quick start](#quick-start)
2119
- [Tile types](#tile-types)
22-
- [Platform rendering](#platform-rendering)
20+
- [Platform styles](#platform-styles)
2321
- [Theming](#theming)
2422
- [Advanced usage](#advanced-usage)
2523
- [API reference](#api-reference)
@@ -70,9 +68,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
7068
leading: const Icon(Icons.language),
7169
title: const Text('Language'),
7270
value: const Text('English'),
73-
onPressed: (context) {
74-
// navigate to language picker
75-
},
71+
onPressed: (context) { /* navigate */ },
7672
),
7773
],
7874
),
@@ -108,27 +104,26 @@ class _SettingsScreenState extends State<SettingsScreen> {
108104

109105
### `SettingsTile` — basic tile
110106

111-
A simple tappable tile with optional leading icon, description, and trailing widget.
107+
A tappable tile with optional leading icon, description, and trailing widget.
112108

113109
```dart
114110
SettingsTile(
115111
leading: const Icon(Icons.storage),
116112
title: const Text('Storage'),
117113
description: const Text('30% used — 5.60 GB free'),
118-
trailing: const Icon(Icons.chevron_right),
119114
onPressed: (context) { /* ... */ },
120115
)
121116
```
122117

123118
### `SettingsTile.navigation` — navigation tile
124119

125-
Adds a platform-appropriate trailing chevron (right arrow on LTR, left arrow on RTL). Use this for tiles that push a new screen.
120+
Adds a platform-appropriate trailing chevron. Right arrow in LTR, left arrow in RTL.
126121

127122
```dart
128123
SettingsTile.navigation(
129124
leading: const Icon(Icons.language),
130125
title: const Text('Language'),
131-
value: const Text('English'), // shown next to the chevron
126+
value: const Text('English'),
132127
titleDescription: const Text('Choose your preferred language'),
133128
onPressed: (context) {
134129
Navigator.of(context).push(/* language screen */);
@@ -138,7 +133,7 @@ SettingsTile.navigation(
138133

139134
### `SettingsTile.switchTile` — switch tile
140135

141-
A tile with a `Switch` (Material) or `CupertinoSwitch` (Cupertino) depending on the active platform.
136+
Renders a `Switch` on Material platforms and a `CupertinoSwitch` on iOS/macOS.
142137

143138
```dart
144139
SettingsTile.switchTile(
@@ -150,9 +145,7 @@ SettingsTile.switchTile(
150145
)
151146
```
152147

153-
### `CustomSettingsTile` — fully custom tile
154-
155-
Place any widget inside a section as if it were a tile.
148+
### `CustomSettingsTile` — any widget as a tile
156149

157150
```dart
158151
CustomSettingsTile(
@@ -163,51 +156,60 @@ CustomSettingsTile(
163156
)
164157
```
165158

166-
### `CustomSettingsSection` — fully custom section
167-
168-
Place any widget as an entire section, outside the standard section chrome.
159+
### `CustomSettingsSection` — any widget as a section
169160

170161
```dart
171162
CustomSettingsSection(
172-
child: Column(
173-
children: [
174-
const SizedBox(height: 16),
175-
CircleAvatar(radius: 40, child: Icon(Icons.person, size: 40)),
176-
const SizedBox(height: 8),
177-
const Text('Danny Yako', style: TextStyle(fontSize: 18)),
178-
const SizedBox(height: 16),
179-
],
163+
child: Padding(
164+
padding: const EdgeInsets.all(16),
165+
child: Text(
166+
'Signed in as Danny Yako',
167+
style: Theme.of(context).textTheme.bodySmall,
168+
),
180169
),
181170
)
182171
```
183172

184173
---
185174

186-
## Platform rendering
175+
## Platform styles
187176

188-
By default `SettingsList` detects the running platform automatically (`DevicePlatform.device`). You can override it to force a specific style:
177+
`SettingsList` detects the platform automatically. You can override it:
189178

190179
```dart
191180
SettingsList(
192-
platform: DevicePlatform.iOS, // always render iOS style
181+
platform: DevicePlatform.iOS, // force Cupertino style
193182
sections: [ /* ... */ ],
194183
)
195184
```
196185

197-
| `DevicePlatform` value | Style used |
186+
<p align="center">
187+
<img src="https://raw.githubusercontent.com/yako-dev/flutter-settings-ui/master/assets/v3/android_settings.png" width="30%">
188+
&nbsp;
189+
<img src="https://raw.githubusercontent.com/yako-dev/flutter-settings-ui/master/assets/v3/ios_cupertino.png" width="30%">
190+
&nbsp;
191+
<img src="https://raw.githubusercontent.com/yako-dev/flutter-settings-ui/master/assets/v3/web_chrome.png" width="30%">
192+
</p>
193+
<p align="center"><em>Android (Material) &nbsp;&nbsp; iOS (Cupertino) &nbsp;&nbsp; Web</em></p>
194+
195+
| `DevicePlatform` | Style |
198196
|---|---|
199197
| `device` *(default)* | Auto-detected at runtime |
200198
| `android`, `fuchsia`, `linux` | Material |
201199
| `iOS`, `macOS`, `windows` | Cupertino |
202-
| `web` | Web (Material with card layout) |
200+
| `web` | Web (card layout) |
203201

204202
---
205203

206204
## Theming
207205

208206
### Material 3 (v3.0.0+)
209207

210-
On Android and Web, colors are automatically derived from your app's `ColorScheme`. No configuration needed — if you use `ThemeData(colorSchemeSeed: ...)` or a custom `ColorScheme`, the settings list will match.
208+
On Android and Web, colors are automatically derived from your app's `ColorScheme`. No extra configuration needed — seed colors, light/dark mode, and custom `ColorScheme` all work out of the box.
209+
210+
<p align="center">
211+
<img src="https://raw.githubusercontent.com/yako-dev/flutter-settings-ui/master/assets/v3/android_material3.png" width="45%">
212+
</p>
211213

212214
```dart
213215
MaterialApp(
@@ -221,7 +223,7 @@ MaterialApp(
221223

222224
### Custom theme overrides
223225

224-
Pass a `SettingsThemeData` to `lightTheme` and/or `darkTheme` on `SettingsList` to override individual colors. Any field you leave `null` falls back to the platform default.
226+
Any field left `null` falls back to the platform default derived from your `ColorScheme`.
225227

226228
```dart
227229
SettingsList(
@@ -239,7 +241,7 @@ SettingsList(
239241
)
240242
```
241243

242-
### Custom fonts and text styles
244+
### Custom text styles
243245

244246
```dart
245247
SettingsList(
@@ -256,20 +258,17 @@ SettingsList(
256258
)
257259
```
258260

259-
### Disabled state colors
261+
### Disabled tiles
260262

261263
```dart
262264
SettingsTile.switchTile(
263265
title: const Text('Feature'),
264266
initialValue: false,
265-
onToggle: null, // passing null disables the tile
267+
onToggle: null, // null disables interaction
266268
enabled: false,
267269
)
268-
```
269-
270-
To control the color of the switch when disabled:
271270
272-
```dart
271+
// Control the disabled switch color:
273272
SettingsList(
274273
lightTheme: const SettingsThemeData(
275274
inactiveSwitchColor: Colors.grey,
@@ -284,8 +283,6 @@ SettingsList(
284283

285284
### Scroll controller
286285

287-
Pass a `ScrollController` to programmatically scroll the list:
288-
289286
```dart
290287
final _controller = ScrollController();
291288
@@ -294,7 +291,7 @@ SettingsList(
294291
sections: [
295292
SettingsSection(
296293
tiles: [
297-
SettingsTile.navigation(
294+
SettingsTile(
298295
title: const Text('Jump to bottom'),
299296
onPressed: (_) => _controller.animateTo(
300297
_controller.position.maxScrollExtent,
@@ -310,18 +307,14 @@ SettingsList(
310307

311308
### Compact tiles
312309

313-
Reduce tile height with `compact: true` for dense layouts:
314-
315310
```dart
316311
SettingsTile(
317312
title: const Text('Option'),
318-
compact: true,
313+
compact: true, // halves the vertical padding
319314
)
320315
```
321316

322-
### Embedding inside a scroll view
323-
324-
When placing `SettingsList` inside another scrollable widget (e.g. a `ListView` or `CustomScrollView`), set `shrinkWrap: true` and provide non-scrolling physics:
317+
### Embedding inside another scroll view
325318

326319
```dart
327320
SettingsList(
@@ -331,9 +324,9 @@ SettingsList(
331324
)
332325
```
333326

334-
### Wide screen / web alignment
327+
### Wide screen alignment
335328

336-
On screens wider than 810 dp the list automatically adds horizontal padding to keep content centered. To left-align instead:
329+
On screens wider than 810 dp, the list auto-centers. To left-align:
337330

338331
```dart
339332
SettingsList(
@@ -344,18 +337,14 @@ SettingsList(
344337

345338
### CupertinoApp support
346339

347-
If your app uses `CupertinoApp` instead of `MaterialApp`, set `applicationType` accordingly so brightness is read from the correct theme:
348-
349340
```dart
341+
// Pure CupertinoApp:
350342
SettingsList(
351343
applicationType: ApplicationType.cupertino,
352344
sections: [ /* ... */ ],
353345
)
354-
```
355346
356-
For apps that use `MaterialApp` on Android and `CupertinoApp` on iOS:
357-
358-
```dart
347+
// MaterialApp on Android, CupertinoApp on iOS:
359348
SettingsList(
360349
applicationType: ApplicationType.both,
361350
sections: [ /* ... */ ],
@@ -370,16 +359,16 @@ SettingsList(
370359

371360
| Parameter | Type | Default | Description |
372361
|---|---|---|---|
373-
| `sections` | `List<AbstractSettingsSection>` | required | The list of sections to display |
362+
| `sections` | `List<AbstractSettingsSection>` | required | Sections to display |
374363
| `platform` | `DevicePlatform?` | `device` | Force a specific platform style |
375-
| `lightTheme` | `SettingsThemeData?` || Color/style overrides for light mode |
376-
| `darkTheme` | `SettingsThemeData?` || Color/style overrides for dark mode |
364+
| `lightTheme` | `SettingsThemeData?` || Overrides for light mode |
365+
| `darkTheme` | `SettingsThemeData?` || Overrides for dark mode |
377366
| `brightness` | `Brightness?` || Override brightness detection |
378367
| `applicationType` | `ApplicationType` | `material` | `material`, `cupertino`, or `both` |
379-
| `scrollController` | `ScrollController?` || Control scrolling programmatically |
380-
| `shrinkWrap` | `bool` | `false` | Shrink-wrap the list to its content height |
368+
| `scrollController` | `ScrollController?` || Programmatic scroll control |
369+
| `shrinkWrap` | `bool` | `false` | Shrink-wrap to content height |
381370
| `physics` | `ScrollPhysics?` || Custom scroll physics |
382-
| `contentPadding` | `EdgeInsetsGeometry?` || Override default list padding |
371+
| `contentPadding` | `EdgeInsetsGeometry?` || Override list padding |
383372
| `crossAxisAlignment` | `CrossAxisAlignment` | `center` | Horizontal alignment on wide screens |
384373

385374
### `SettingsSection`
@@ -396,36 +385,36 @@ SettingsList(
396385
|---|---|---|---|
397386
| `title` | `Widget` | all | Tile label |
398387
| `description` | `Widget?` | all | Secondary text below the title |
399-
| `leading` | `Widget?` | all | Icon or widget at the start of the tile |
400-
| `trailing` | `Widget?` | all | Widget at the end of the tile |
401-
| `enabled` | `bool` | all | Grays out the tile and disables interaction |
388+
| `leading` | `Widget?` | all | Icon or widget at the start |
389+
| `trailing` | `Widget?` | all | Widget at the end |
390+
| `enabled` | `bool` | all | Grays out and disables interaction |
402391
| `compact` | `bool` | all | Halves the vertical padding |
403392
| `onPressed` | `Function(BuildContext)?` | all | Tap callback |
404-
| `value` | `Widget?` | simple, navigation | Secondary widget shown before the chevron |
405-
| `titleDescription` | `Widget?` | navigation | Text shown below the title (iOS/macOS/Windows only) |
393+
| `value` | `Widget?` | simple, navigation | Widget shown before the chevron |
394+
| `titleDescription` | `Widget?` | navigation | Text below title (iOS/macOS/Windows) |
406395
| `initialValue` | `bool?` | switchTile | Initial switch state |
407-
| `onToggle` | `Function(bool)?` | switchTile | Called when the switch changes; `null` disables it |
396+
| `onToggle` | `Function(bool)?` | switchTile | Toggle callback; `null` disables the switch |
408397
| `activeSwitchColor` | `Color?` | switchTile | Active switch color override |
409398

410399
### `SettingsThemeData`
411400

412401
| Field | Type | Description |
413402
|---|---|---|
414-
| `settingsListBackground` | `Color?` | Background color of the whole list |
415-
| `settingsSectionBackground` | `Color?` | Background color of each section card |
416-
| `dividerColor` | `Color?` | Color of the dividers between tiles |
417-
| `tileHighlightColor` | `Color?` | Tile press/highlight color |
403+
| `settingsListBackground` | `Color?` | Background of the whole list |
404+
| `settingsSectionBackground` | `Color?` | Background of each section card |
405+
| `dividerColor` | `Color?` | Divider color between tiles |
406+
| `tileHighlightColor` | `Color?` | Tile press highlight color |
418407
| `titleTextColor` | `Color?` | Section header text color |
419408
| `titleTextStyle` | `TextStyle?` | Section header text style |
420409
| `settingsTileTextColor` | `Color?` | Tile title text color |
421410
| `tileTextStyle` | `TextStyle?` | Tile title text style |
422-
| `tileDescriptionTextColor` | `Color?` | Tile description/value text color |
423-
| `tileDescriptionTextStyle` | `TextStyle?` | Tile description/value text style |
424-
| `leadingIconsColor` | `Color?` | Color applied to leading icon widgets |
425-
| `trailingTextColor` | `Color?` | Color of trailing text |
426-
| `inactiveTitleColor` | `Color?` | Tile title color when `enabled: false` |
427-
| `inactiveSubtitleColor` | `Color?` | Description color when `enabled: false` |
428-
| `inactiveSwitchColor` | `Color?` | Switch color when `enabled: false` |
411+
| `tileDescriptionTextColor` | `Color?` | Description/value text color |
412+
| `tileDescriptionTextStyle` | `TextStyle?` | Description/value text style |
413+
| `leadingIconsColor` | `Color?` | Leading icon color |
414+
| `trailingTextColor` | `Color?` | Trailing text color |
415+
| `inactiveTitleColor` | `Color?` | Tile title color when disabled |
416+
| `inactiveSubtitleColor` | `Color?` | Description color when disabled |
417+
| `inactiveSwitchColor` | `Color?` | Switch color when disabled |
429418

430419
---
431420

assets/v3/android_material3.png

135 KB
Loading

assets/v3/android_settings.png

187 KB
Loading

assets/v3/ios_cupertino.png

195 KB
Loading

assets/v3/web_chrome.png

207 KB
Loading

0 commit comments

Comments
 (0)