card_settings_ui 1.1.2
card_settings_ui: ^1.1.2 copied to clipboard
A card based settings ui for flutter.
中文
Overview #
A Card based settings ui for flutter. Inspired by settings_ui.
I don't like native Android UI, plus origin package has platform judgments (cannot support ohos), so I delete them all and wrap settings tiles with Card.
Tip
This is a pure dart package without platform judgments, so it supports all platforms, including ohos.
Installing: #
- Add the dependency in your
pubspec.yamlfile.
dependencies:
card_settings_ui: ^1.1.2
- Import the
card_settings_uipackage.
import 'package:card_settings_ui/card_settings_ui.dart';
Basic Usage: #
The usage is almost the same as settings_ui.
Important
This package is MaterialApp only, aiming to build settings like CupertinoListSection one.
SettingsList(
sections: [
SettingsSection(
title: Text('Common'),
tiles: <SettingsTile>[
SettingsTile.navigation(
leading: Icon(Icons.language),
title: Text('Language'),
value: Text('English'),
),
SettingsTile.switchTile(
onToggle: (value) {},
initialValue: true,
leading: Icon(Icons.format_paint),
title: Text('Enable custom theme'),
),
],
),
],
),
Example product #
This package is first used by Predidit / Kazumi, implemented by myself. So you may find the example code looks like those in Predidit / Kazumi.