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
EcommerceApp dukan - Ecommerce app with static data

shop_now A new Flutter project. Getting Started #ScreenShots ![1](https://user-i

Nouman Ashraf 2 Jan 11, 2022
Flutter library to create beautiful surveys (aligned with ResearchKit on iOS)

SurveyKit: Create beautiful surveys with Flutter (inspired by iOS ResearchKit Surveys)

QuickBird Studios 90 Dec 28, 2022
A Flutter widget that help you to create badages

badge A Flutter widget that help you to create badges easily. Getting Started Add dependency to pubspec.yaml [...] dependencies: badge: any [...] In

Raouf Rahiche 85 Jul 14, 2022
Paystack SDK for iOS. Accept Payments on iOS

Paystack iOS SDK The Paystack iOS SDK make it easy to collect your users' credit card details inside your iOS app. By charging the card immediately on

Paystack 22 May 29, 2022
Video player-2.2.10 - A Flutter plugin for iOS, Android and Web for playing back video on a Widget surface

Video Player plugin for Flutter A Flutter plugin for iOS, Android and Web for pl

null 2 Sep 29, 2022
Flutter app built as a submission for the 2019 Flutter Create contest

relax Relax is a Flutter application built for the Flutter Create contest. It gives the user the choice of four nature sounds and rotates through rela

Erin Morrissey 85 Dec 8, 2022
Flutter-Shop-UI-Kit - Create An E-commerce App UI kit Using Flutter

Flutter Shop UI kit If you are planning to create an e-commerce app using Flutte

Abu Anwar 405 Dec 28, 2022
Flutter plugin that allows users to create TextAvatar easily!

Colorize Text Avatar Colorize Text Avatar is a package to generate avatar based on your user initials. It supports to generate avatars based on your s

Deniz Çolak 17 Dec 14, 2022
Create mobile file manager design using Flutter

Mobile File Manager Watch it on YouTube Home & Cloud Screen On this file manager design has two pages. The Home page displays file usage information,

Firgia 38 Dec 23, 2022
Create a simple way to keep track of weekly expenses with flutter

Expenses app The purpose of this app is to create a simple way to keep track of weekly expenses UI Getting Started This project is a starting point fo

Murilo Benassi 2 Jul 26, 2022
UI design for mobile, create using visual studio code & flutter dart programming languange

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

null 1 Oct 13, 2021
Training materials for students to create Fullstack Flutter Firebase applications

Full-stack app with Flutter and Firebase Workshop The repository is supposed to be used for the my workshops. Agenda Part 1 Introduction to Flutter &

Majid Hajian 22 Oct 16, 2022
Developed a Group chat application using Flutter and Firebase, where users can register and create groups or join already existing groups and start conversing with each other.

GroupChatApp About Developed a Group chat application using Flutter and Firebase, where users can register and create groups or join already existing

Ahmed Gulab Khan 221 Dec 1, 2022
SurveyKit: Create beautiful surveys with Flutter

SurveyKit: Create beautiful surveys with Flutter (inspired by iOS ResearchKit Surveys) Do you want to display a questionnaire to get the opinion of yo

null 0 Nov 19, 2022
I was challenged to create an app with only the Nubank life insurance part and fix some UI issues.

Seguros I was challenged to create an App with only the Nubank life insurance part and fix some UI issues. Flutter This is a Flutter App, designed bas

Caio Moura 14 Dec 14, 2022
Create TODO LIST with Get Storage !

todo-list-get-storage Create TODO LIST with Get Storage ! dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font

Kauê Murakami 11 Aug 24, 2022
𝐂𝐨𝐯 𝐀𝐡𝐞𝐚𝐝 is a mobile application to track and create better Covid-19 route maps for both shop owners and customers

Cov Ahead Cov Ahead is a mobile application where shopkeepers have an app that shows QR code and users can scan this QR code which will automatically

Abhijith Kp 2 Jan 15, 2022
Real short video app with firebase and pixels API.Where you can create a short video with pixels' stock videos and also merge your audio.

Flutter Short Videos Platform Short videos platform with Flutter and Firebase. About Real short video app with firebase and pixels API.Where you can c

Ansh rathod 55 Dec 26, 2022
Amir Khan 47 Jan 8, 2023