A Flutter widget to create an iOS settings-table (static TableView).

Overview

flutter_cupertino_settings

Pub badge

A Flutter widget to create an iOS settings-table (static TableView).

import 'package:flutter_cupertino_settings/flutter_cupertino_settings.dart';

CSWidgetStyle brightnessStyle = const CSWidgetStyle(
    icon: const Icon(Icons.brightness_medium, color: Colors.black54)
);

CupertinoSettings(
    items: <Widget>[
        const CSHeader('Brightness'),
        CSWidget(CupertinoSlider(value: 0.5), style: brightnessStyle),
        CSControl(
            nameWidget: Text('Auto brightness'),
            contentWidget: CupertinoSwitch(value: true), 
            style: brightnessStyle,
        ),
        CSHeader('Selection'),
        CSSelection<int>(
            items: const <CSSelectionItem<int>>[
                CSSelectionItem<int>(text: 'Day mode', value: 0),
                CSSelectionItem<int>(text: 'Night mode', value: 1),
            ],
            onSelected: (index) {print(index);},
            currentSelection: 0,
        ),
        CSDescription('Using Night mode extends battery life on devices with OLED display',),
        const CSHeader(''),
        CSControl(
            nameWidget: Text('Loading...'), 
            contentWidget: CupertinoActivityIndicator(),
        ),
        CSButton(CSButtonType.DEFAULT, "Licenses", (){ print("It works!"); }),
        const CSHeader(''),
        CSButton(CSButtonType.DESTRUCTIVE, "Delete all data", (){})
    ]
);

Contributors

Comments
  • Error: Getter not found: 'obscuringCharacter'.

    Error: Getter not found: 'obscuringCharacter'.

    Compiler message:
    ../../../.pub-cache/hosted/pub.dartlang.org/flutter_cupertino_settings-0.3.0/lib/widgets/secret.dart:41:58: Error: Getter not found: 'obscuringCharacter'.
                      _show ? widget.secret : RenderEditable.obscuringCharacter * widget.secret.length,
    

    I am getting this error after updating flutter.

    flutter doctor -v output

    Rahuls-MacBook-Pro-2:app rahul$ flutter doctor -v
    [✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Mac OS X 10.15.2 19C57, locale en-IN)
        • Flutter version 1.18.0-11.1.pre at /Users/rahul/Library/flutter/flutter
        • Framework revision 2738a1148b (3 days ago), 2020-05-13 15:24:36 -0700
        • Engine revision ef9215ceb2
        • Dart version 2.9.0 (build 2.9.0-8.2.beta)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
        • Android SDK at /Users/rahul/Library/Android/sdk
        • Platform android-29, build-tools 29.0.2
        • ANDROID_HOME = /Users/rahul/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.4.1, Build version 11E503a
        • CocoaPods version 1.8.4
    
    [✓] Android Studio (version 3.6)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 45.1.1
        • Dart plugin version 192.7761
        • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    
    [!] Android Studio
        • Android Studio at /Applications/Android Studio 4.0 Preview.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    
    [!] IntelliJ IDEA Community Edition (version 2019.3)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • For information about installing plugins, see
          https://flutter.dev/intellij-setup/#installing-the-plugins
    
    [✓] VS Code (version 1.45.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.10.2
    
    [✓] Connected device (1 available)
        • iPhone 11 Pro Max • E90AE266-0001-4DB6-A49E-1FA447C4FEFB • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
    
    ! Doctor found issues in 2 categories.
    
    opened by imrhk 4
  • Update cupertino_icons to 1.0.0

    Update cupertino_icons to 1.0.0

    Before · After · Original

    This PR ensures that developers will be able to use the package with cupertino_icons 1.0+ and the upcoming versions of Flutter, which is otherwise complicated with failed version resolving.

    Resolves #23.

    opened by jibiel 2
  • Remove state from CSSelection widget

    Remove state from CSSelection widget

    Fixes #21

    In this case you dont need to create state. Create constructor for state its not good practic beacause state doesn`t rebuild when parent state changed

    opened by antonvolokha 2
  • Flutter_cupertino_settings conflicts with card_settings

    Flutter_cupertino_settings conflicts with card_settings

    Because card_settings >=1.4.2 depends on flutter_cupertino_settings ^0.1.0 and dandankj depends on flutter_cupertino_settings ^0.2.0, card_settings >=1.4.2 is forbidden. So, because dandankj depends on card_settings ^1.4.2, version solving failed. pub get failed (1) image

    I need the two libraries to work together, but they clash。

    opened by MuZiLee 2
  • Add CSDescription

    Add CSDescription

    I've add the CSDescription widget, to show a description or details under a Setting. I've also adding trailing commas to the code to improve the readability. Last little change, is the _isDark function which gets the context and looks if the CupertinoTheme brightness or the MaterialTheme brightness is dark. So it is now possible to use this package without MaterialApp in the WidgetTree.

    opened by bierbaumtim 2
  • navigator

    navigator

    not really an issue but I've been trying to "navigator" to this page, and I get a

    (new) CupertinoSettings(List items) → CupertinoSettingss

    my code builder: (BuildContext context) => CupertinoSettingss(),

    so I know it's missing a "list" but I don't know how to do so... sorry...

    opened by fromparis 2
  • iOS 13 Support and more Widget configurations

    iOS 13 Support and more Widget configurations

    I have used this package in my production app and made some changes to it because I missing some features and it doens't look exactly like iOS. So I made some major changes, also some breaking changes but I think it's worth it. Also, because I didn't initially plan to release my changes, the commits are a bit of mess, but I hope you can understand the changes.

    So here's what I changed:

    • added support for the different types of CSLink based on UITableViewCell
    • use CupertinoDynamicColors to match the official DynamicColors added with iOS13
    • use CupertinoColors and CupertinoIcons instead of Material one
    • added HapticFeedback to CSSelection
    • updated example
    • bump Flutter Version to 1.12.13-hotfix.5
    opened by bierbaumtim 1
  • CSSecret

    CSSecret

    I wanted to have a CSWidget which obscures sensitive text. Only if the user clicks on the eye it shows the sensitive data like an api key. I'm not 100% sure whether it fits to this lib so feel free to share your opinion.

    opened by SimonIT 1
  • I get several errors in the example implementation

    I get several errors in the example implementation

    Currently trying to use the example given as a starting point for my settings page, but I get several errors (red underlines) when I use it, I think I'm doing something wrong but I hope you can assist me with this. All of them in CupertinoSettings() function.

    1. Too many positional arguments: 0 expected, but 1 found. which affects all the arguments, that was easily handled by adding items: before the widget argument.
    2. The constructor returns type 'dynamic' that isn't of expected type 'Widget'. / Undefined class 'CupertinoSlider'. on the second line of the widgets arguments.
    3. The constructor returns type 'dynamic' that isn't of expected type 'Widget'. on the new CupertinoSwitch(value: true) code on the third line.
    4. All empty arguments CSHeaders() have a 1 required argument(s) expected, but 0 found. message.
    5. The constructor returns type 'dynamic' that isn't of expected type 'Widget'. / Undefined class 'CupertinoActivityIndicator'. on the seventh line of the widgets arguments.
    opened by helwy 1
  • Need to be updated to support Dart 2.1.0

    Need to be updated to support Dart 2.1.0

    The current Dart SDK version is 2.1.0-dev.3.0.flutter-760a9690c2.
    
    Because flutter_cupertino_settings 0.0.8 requires SDK version <2.0.0 and no versions of flutter_cupertino_settings match >0.0.8 <0.1.0, flutter_cupertino_settings ^0.0.8 is forbidden.
    
    opened by rodydavis 1
  • Support subtitle for selection lists

    Support subtitle for selection lists

    Support a secondary text field for to appear below the primary text of a selection list item.

    Also updated the EdgeInsets for the content, vertical insets changed from 1 to 8. Otherwise the combined title and subtitle lack sufficient padding from the item border. There is no change to the appearance of items without a subtitle.

    Below is appearance after these changes, with and without subtitle.

    opened by n8han 0
  • Support for custom CupertinoThemeData

    Support for custom CupertinoThemeData

    Thanks for this nice widget. But I can't use it, sadly. I'm using a custom CupertinoTheme with custom colors and the cupertino settings widget does not adapt my declared colors. It would be nice if it would do so

    opened by SimonIT 0
  • Migrate to PlatformWidgets

    Migrate to PlatformWidgets

    First I would like to thank for putting the time to create this library. It really has helped me speed up the completion of one of my assignments

    After playing around with the example and going through your code I saw that it would be relatively easy to switch form using native Cupertino widget to using Platform Widgets and make this a generic settings library for both Android and iOS

    https://github.com/aqwert/flutter_platform_widgets

    I am be willing to contribute and pull the changes myself but that will happen either mid april or after the middle of may.

    opened by giannissc 1
Releases(0.2.0)
Owner
Matthias Rupp
Linux stuff, Docker, currently falling in love with functional programming
Matthias Rupp
Flutter tableview - A flutter widget like iOS UITableview. let listView with section header and each section header will hover at the top.

中文 flutter_tableview A flutter widget like iOS UITableview. let listView with section header and each section header will hover at the top. Installing

null 41 Jul 22, 2022
My flutter (android, ios) UI design examples 🎈 - user profile UIs, food order ui, splashscreen, mask widget usage, settings page ui

Flutter UI Design Examples ?? This repository contains the flutter ui designs I designed while learning. Doctor Appointment App UI Packages in use: fl

Aleyna Eser 23 Nov 14, 2022
This library allows you to create editable tables and spreadsheets with ease, either by providing initial row and column count to display an empty table or use it with predefined rows and column data sets.

Editable ⚡️ A highly customizable, editable table package for Flutter projects. Specs This package allows you to create editable tables and spreadshee

Godwin Asuquo 94 Dec 7, 2022
Create native settings for Flutter app in a minutes.

Settings UI for Flutter Installing: In your pubspec.yaml dependencies: settings_ui: ^1.0.1 import 'package:settings_ui/settings_ui.dart'; Basic Usag

Yako 716 Dec 29, 2022
Fluttersettingsui - Fork of settingsui. Create native settings for Flutter app in a minutes.

Settings UI for Flutter Installing: In your pubspec.yaml dependencies: flutter_settings_ui: ^1.0.1 import 'package:flutter_settings_ui/flutter_setti

Julian Steenbakker 22 Oct 24, 2022
With cupertino_setting_control you can create a settings page or a simple form very easy.

Flutter Cupertino Setting Control With cupertino_setting_control you can create a settings page or a simple form very easy. Therefore, cupertino_setti

Christoph Rothermel 7 Mar 28, 2022
A iOS like table view including section, row, section header and divider

flutter_section_table_view A iOS like table view including section, row, section header and divider Support both Android and iOS Support drop-down ref

刘彦博 73 Nov 4, 2022
Flutterbodydetection - A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmentation APIs for both static images and live camera stream.

body_detection A flutter plugin that uses MLKit on iOS/Android platforms to enable body pose and mask detection using Pose Detection and Selfie Segmen

null 18 Dec 5, 2022
A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)

flutter_html A Flutter widget for rendering HTML and CSS as Flutter widgets. Screenshot 1 Screenshot 2 Screenshot 3 Table of Contents: Installing Curr

Matthew Whitaker 1.5k Jan 5, 2023
Flutter table with dio and provider - A flutter Application created for Portfolio Page

My LinkedIn https://www.linkedin.com/in/marcelo-augusto-a60b6821a/ Intro This is

Marcelo Augusto 1 Jan 18, 2022
A periodic table app with 3D view of the elements built using flutter.

A flutter app which takes you on a 3d visualisation of the 118 elements of the periodic table. promo.mp4 Tech Stack Deployed using How it all began It

Shanwill Pinto 48 Nov 16, 2022
CRUD Table Flutter consists of a Lazy loading function, resizable columns, and integrated CRUD Form.

CRUD Table Flutter CRUD Table Flutter is a package for crating CURD-UI for your entity/object/class easily. It consists of a Lazy loading function, re

null 10 Dec 31, 2022
Time Table application specifically aimed towards students. Share Time-Tables. Suggest Updates.

Time-Table-App Time Table application specifically aimed towards students. Tech stack Project is created by: Flutter: 2.8.1 Dart: 2.15.1 Planned Featu

PEC ACM CSS 8 Oct 7, 2022
Flutter plugin for creating static & dynamic app shortcuts on the home screen.

Flutter Shortcuts Show some ❤️ and ⭐ the repo Why use Flutter Shortcuts? Flutter Shortcuts Plugin is known for : Flutter Shortcuts Fast, performant &

Divyanshu Shekhar 39 Sep 26, 2022
Flutter plugin for creating static & dynamic app shortcuts on the home screen.

Flutter Shortcuts Compatibility ✅ Android ❌ iOS (active issue: iOS support for quick actions) Show some ❤️ and ⭐ the repo Why use Flutter Shortcuts? F

Devs On Flutter 39 Sep 26, 2022
The read-a-book app is using static data. the application I developed has a homepage and detail page

book_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Adil Ahmet Sargın 1 Nov 12, 2021
Dart library for creating static trees of execution.

Processing tree Dart library for building and executing static trees of execution created in runtime. When to use it The main idea behind usage of thi

The Tosters 1 Dec 20, 2021
Superpowers for Dart. Collection of useful static extension methods.

If you miss an extension, please open an issue or pull request Resources: Documentation Pub Package GitHub Repository On this page you can find some o

Simon Leier 955 Jan 8, 2023
How to get the most value from Dart static analysis

This package is deprecated. Before it was deprecated, it was the way to get analysis options matching those used internally at Google. This was useful

Google 324 Nov 4, 2022