├── example ├── ios │ ├── Flutter │ │ ├── .last_build_id │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ └── project.pbxproj │ └── .gitignore ├── android │ ├── gradle.properties │ ├── .gitignore │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ └── values │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── example │ │ │ │ │ │ └── example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── .metadata ├── .gitignore ├── test │ └── widget_test.dart ├── pubspec.yaml ├── pubspec.lock └── lib │ └── main.dart ├── analysis_options.yaml ├── demo ├── date-item.gif ├── radio-item.gif ├── switch-item.gif ├── text-item.gif ├── time-item.gif ├── checkbox-item.gif ├── confirm-item.gif ├── datetime-item.gif ├── wheel-text-item.gif ├── wheel-number-item.gif └── custom-handler-item.gif ├── test └── clean_settings_test.dart ├── .metadata ├── lib ├── clean_settings.dart └── src │ ├── setting_container.dart │ ├── setting_styles.dart │ ├── setting_switch_item.dart │ ├── setting_checkbox_item.dart │ ├── setting_item.dart │ ├── setting_section.dart │ ├── setting_text_item.dart │ ├── setting_confirm_item.dart │ ├── setting_datetime_item.dart │ ├── setting_radio_item.dart │ └── setting_wheel_picker_item.dart ├── CHANGELOG.md ├── LICENSE ├── .gitignore ├── pubspec.yaml ├── pubspec.lock └── README.md /example/ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | 9054f7b219f428648e47c2c7c25064c1 -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:pedantic/analysis_options.yaml 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /demo/date-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/date-item.gif -------------------------------------------------------------------------------- /demo/radio-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/radio-item.gif -------------------------------------------------------------------------------- /demo/switch-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/switch-item.gif -------------------------------------------------------------------------------- /demo/text-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/text-item.gif -------------------------------------------------------------------------------- /demo/time-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/time-item.gif -------------------------------------------------------------------------------- /demo/checkbox-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/checkbox-item.gif -------------------------------------------------------------------------------- /demo/confirm-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/confirm-item.gif -------------------------------------------------------------------------------- /demo/datetime-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/datetime-item.gif -------------------------------------------------------------------------------- /test/clean_settings_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: missing_required_param 2 | 3 | void main() {} 4 | -------------------------------------------------------------------------------- /demo/wheel-text-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/wheel-text-item.gif -------------------------------------------------------------------------------- /demo/wheel-number-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/wheel-number-item.gif -------------------------------------------------------------------------------- /demo/custom-handler-item.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/demo/custom-handler-item.gif -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grouped/clean_settings/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: d3ed9ec945f8869f0e136c357d0c2a6be2b60c98 8 | channel: beta 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: d3ed9ec945f8869f0e136c357d0c2a6be2b60c98 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/clean_settings.dart: -------------------------------------------------------------------------------- 1 | library clean_settings; 2 | 3 | export 'src/setting_checkbox_item.dart'; 4 | export 'src/setting_confirm_item.dart'; 5 | export 'src/setting_container.dart'; 6 | export 'src/setting_datetime_item.dart'; 7 | export 'src/setting_item.dart'; 8 | export 'src/setting_radio_item.dart'; 9 | export 'src/setting_section.dart'; 10 | export 'src/setting_styles.dart'; 11 | export 'src/setting_text_item.dart'; 12 | export 'src/setting_wheel_picker_item.dart'; 13 | export 'src/setting_switch_item.dart'; 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.5 2 | 3 | * Added support for Switch item (Thanks to @gkathir15) 4 | 5 | ## 0.1.4 6 | 7 | * Added confirm dialog item 8 | * Support for read-only items added - [#1](https://github.com/grouped/clean_settings/issues/1) 9 | * Improved documentation 10 | 11 | ## 0.1.3 12 | 13 | * Section title is now optional 14 | * Improved documentation & code cleanup 15 | 16 | ## 0.1.2 17 | 18 | * Improved documentation 19 | 20 | ## 0.1.1 21 | 22 | * Removed complicated flow of groups 23 | * Consistent argument names across widgets 24 | 25 | ## 0.1.0 26 | 27 | * Initial Open Source release 28 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/setting_container.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_section.dart'; 4 | 5 | class SettingContainer extends StatefulWidget { 6 | final List sections; 7 | 8 | const SettingContainer({Key key, @required this.sections}) : super(key: key); 9 | 10 | @override 11 | _SettingContainerState createState() => _SettingContainerState(); 12 | } 13 | 14 | class _SettingContainerState extends State { 15 | final GlobalKey scaffoldKey = GlobalKey(); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | key: scaffoldKey, 21 | body: ListView( 22 | shrinkWrap: true, 23 | children: widget.sections, 24 | )); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/src/setting_styles.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | enum ItemPriority { normal, high, low, disabled } 4 | 5 | const kSectionTitle = TextStyle(fontSize: 13.0, color: Color(0xff1b73e8)); 6 | const kSeparator = Color(0xffe0e0e0); 7 | const kItemTitle = { 8 | ItemPriority.normal: TextStyle(fontSize: 14.0, color: Color(0xff5f6369)), 9 | ItemPriority.high: TextStyle(fontSize: 14.0, color: Color(0xffd95b58)), 10 | ItemPriority.low: TextStyle(fontSize: 14.0, color: Color(0xff3e7e0b)), 11 | ItemPriority.disabled: TextStyle(fontSize: 14.0, color: Color(0xff9a9fa7)), 12 | }; 13 | const kItemSubTitle = { 14 | ItemPriority.normal: TextStyle(fontSize: 12.0, color: Color(0xff757575)), 15 | ItemPriority.high: TextStyle(fontSize: 12.0, color: Color(0xffd95b58)), 16 | ItemPriority.low: TextStyle(fontSize: 12.0, color: Color(0xff3e7e0b)), 17 | ItemPriority.disabled: TextStyle(fontSize: 12.0, color: Color(0xffbdbdbd)), 18 | }; 19 | const kWheelPickerItem = TextStyle(fontSize: 13.0, color: Color(0xff5f6369)); 20 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/src/setting_switch_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_styles.dart'; 4 | 5 | class SettingSwitchItem extends StatelessWidget { 6 | final String title; 7 | final String description; 8 | final ItemPriority priority; 9 | 10 | final bool value; 11 | final ValueChanged onChanged; 12 | 13 | const SettingSwitchItem({ 14 | Key key, 15 | @required this.title, 16 | @required this.value, 17 | @required this.onChanged, 18 | this.priority = ItemPriority.normal, 19 | this.description, 20 | }) : super(key: key); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return SwitchListTile( 25 | contentPadding: const EdgeInsets.symmetric(horizontal: 15.0), 26 | title: Text(title, style: kItemTitle[priority]), 27 | subtitle: description != null 28 | ? Text(description, style: kItemSubTitle[priority]) 29 | : null, 30 | value: value, 31 | onChanged: priority == ItemPriority.disabled ? null : onChanged, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/setting_checkbox_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_styles.dart'; 4 | 5 | class SettingCheckboxItem extends StatelessWidget { 6 | final String title; 7 | final String description; 8 | final ItemPriority priority; 9 | 10 | final bool value; 11 | final ValueChanged onChanged; 12 | 13 | const SettingCheckboxItem({ 14 | Key key, 15 | @required this.title, 16 | @required this.value, 17 | @required this.onChanged, 18 | this.priority = ItemPriority.normal, 19 | this.description, 20 | }) : super(key: key); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return CheckboxListTile( 25 | contentPadding: const EdgeInsets.symmetric(horizontal: 15.0), 26 | title: Text(title, style: kItemTitle[priority]), 27 | subtitle: description != null 28 | ? Text(description, style: kItemSubTitle[priority]) 29 | : null, 30 | value: value, 31 | onChanged: priority == ItemPriority.disabled ? null : onChanged, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/setting_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_styles.dart'; 4 | 5 | class SettingItem extends StatelessWidget { 6 | final String title; 7 | final String displayValue; 8 | final GestureTapCallback onTap; 9 | final ItemPriority priority; 10 | 11 | const SettingItem({ 12 | Key key, 13 | @required this.title, 14 | this.displayValue, 15 | @required this.onTap, 16 | this.priority = ItemPriority.normal, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | var listTile = ListTile( 22 | dense: true, 23 | visualDensity: VisualDensity.comfortable, 24 | contentPadding: const EdgeInsets.symmetric(horizontal: 15.0), 25 | title: Text(title, style: kItemTitle[priority]), 26 | subtitle: displayValue != null 27 | ? Text(displayValue, style: kItemSubTitle[priority]) 28 | : null, 29 | ); 30 | return priority == ItemPriority.disabled 31 | ? listTile 32 | : InkWell(onTap: onTap ?? () {}, child: listTile); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Grouped 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/src/setting_section.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_styles.dart'; 4 | 5 | class SettingSection extends StatelessWidget { 6 | final String title; 7 | final List items; 8 | 9 | const SettingSection({Key key, @required this.items, this.title}) 10 | : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Column( 15 | crossAxisAlignment: CrossAxisAlignment.start, 16 | children: [ 17 | if (title != null) 18 | ListTile( 19 | title: Text(title, style: kSectionTitle), 20 | contentPadding: 21 | const EdgeInsets.symmetric(horizontal: 15.0, vertical: 0.0), 22 | dense: true, 23 | visualDensity: VisualDensity.compact), 24 | ListView.separated( 25 | physics: NeverScrollableScrollPhysics(), 26 | shrinkWrap: true, 27 | itemCount: items.length, 28 | separatorBuilder: (BuildContext context, int index) => 29 | Divider(height: 2.0, color: kSeparator), 30 | itemBuilder: (BuildContext context, int index) => items[index], 31 | ), 32 | ], 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Flutter.podspec 62 | **/ios/Flutter/Generated.xcconfig 63 | **/ios/Flutter/app.flx 64 | **/ios/Flutter/app.zip 65 | **/ios/Flutter/flutter_assets/ 66 | **/ios/Flutter/flutter_export_environment.sh 67 | **/ios/ServiceDefinitions.json 68 | **/ios/Runner/GeneratedPluginRegistrant.* 69 | 70 | # Exceptions to above rules. 71 | !**/ios/**/default.mode1v3 72 | !**/ios/**/default.mode2v3 73 | !**/ios/**/default.pbxuser 74 | !**/ios/**/default.perspectivev3 75 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 76 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: clean_settings 2 | description: Settings UI generator with sane defaults. Removes the need for boilerplate code and provides a rich set of highly opinionated widgets. 3 | version: 0.1.5 4 | homepage: https://github.com/grouped/clean_settings 5 | 6 | environment: 7 | sdk: ">=2.7.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | dev_dependencies: 14 | flutter_test: 15 | sdk: flutter 16 | pedantic: ^1.9.2 17 | 18 | # For information on the generic Dart part of this file, see the 19 | # following page: https://dart.dev/tools/pub/pubspec 20 | 21 | # The following section is specific to Flutter. 22 | flutter: 23 | 24 | # To add assets to your package, add an assets section, like this: 25 | # assets: 26 | # - images/a_dot_burr.jpeg 27 | # - images/a_dot_ham.jpeg 28 | # 29 | # For details regarding assets in packages, see 30 | # https://flutter.dev/assets-and-images/#from-packages 31 | # 32 | # An image asset can refer to one or more resolution-specific "variants", see 33 | # https://flutter.dev/assets-and-images/#resolution-aware. 34 | 35 | # To add custom fonts to your package, add a fonts section here, 36 | # in this "flutter" section. Each entry in this list should have a 37 | # "family" key with the font family name, and a "fonts" key with a 38 | # list giving the asset and other descriptors for the font. For 39 | # example: 40 | # fonts: 41 | # - family: Schyler 42 | # fonts: 43 | # - asset: fonts/Schyler-Regular.ttf 44 | # - asset: fonts/Schyler-Italic.ttf 45 | # style: italic 46 | # - family: Trajan Pro 47 | # fonts: 48 | # - asset: fonts/TrajanPro.ttf 49 | # - asset: fonts/TrajanPro_Bold.ttf 50 | # weight: 700 51 | # 52 | # For details regarding fonts in packages, see 53 | # https://flutter.dev/custom-fonts/#from-packages 54 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.example" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /lib/src/setting_text_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_item.dart'; 4 | import 'setting_styles.dart'; 5 | 6 | class SettingTextItem extends StatelessWidget { 7 | final String title; 8 | final String displayValue; 9 | final String hintText; 10 | final String initialValue; 11 | 12 | final ValueChanged onChanged; 13 | final ItemPriority priority; 14 | 15 | const SettingTextItem({ 16 | Key key, 17 | @required this.title, 18 | @required this.onChanged, 19 | @required this.displayValue, 20 | this.initialValue, 21 | this.hintText, 22 | this.priority = ItemPriority.normal, 23 | }) : super(key: key); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return SettingItem( 28 | priority: priority, 29 | title: title, 30 | displayValue: displayValue, 31 | onTap: () async { 32 | var changedValue = await showDialog( 33 | context: context, 34 | builder: (_) { 35 | var controller = TextEditingController(text: initialValue); 36 | return AlertDialog( 37 | title: Text(title), 38 | contentPadding: const EdgeInsets.all(16.0), 39 | content: Row( 40 | children: [ 41 | Expanded( 42 | child: TextField( 43 | controller: controller, 44 | autofocus: true, 45 | decoration: InputDecoration(hintText: hintText), 46 | ), 47 | ) 48 | ], 49 | ), 50 | actions: [ 51 | FlatButton( 52 | child: const Text('Cancel'), 53 | onPressed: () => Navigator.pop(context)), 54 | FlatButton( 55 | child: const Text('OK'), 56 | onPressed: () => Navigator.pop(context, controller.text)) 57 | ], 58 | ); 59 | }, 60 | ); 61 | if (changedValue != initialValue) { 62 | onChanged(changedValue); 63 | } 64 | }, 65 | ); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /lib/src/setting_confirm_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_styles.dart'; 4 | 5 | class SettingConfirmItem extends StatelessWidget { 6 | final String title; 7 | final String displayValue; 8 | final String alertMessage; 9 | final String alertTitle; 10 | final VoidCallback onConfirm; 11 | final VoidCallback onCancel; 12 | final String okButtonText; 13 | final String cancelButtonText; 14 | final ItemPriority priority; 15 | 16 | const SettingConfirmItem({ 17 | Key key, 18 | @required this.title, 19 | this.alertMessage, 20 | @required this.onConfirm, 21 | this.alertTitle, 22 | this.displayValue, 23 | this.onCancel, 24 | this.okButtonText, 25 | this.cancelButtonText, 26 | this.priority = ItemPriority.normal, 27 | }) : super(key: key); 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | var listTile = ListTile( 32 | dense: true, 33 | visualDensity: VisualDensity.comfortable, 34 | contentPadding: const EdgeInsets.symmetric(horizontal: 15.0), 35 | title: Text(title, style: kItemTitle[priority]), 36 | subtitle: displayValue != null 37 | ? Text(displayValue, style: kItemSubTitle[priority]) 38 | : null, 39 | ); 40 | return priority == ItemPriority.disabled 41 | ? listTile 42 | : InkWell(onTap: () => _showConfirmDialog(context), child: listTile); 43 | } 44 | 45 | Future _showConfirmDialog(BuildContext context) async { 46 | var result = await showDialog( 47 | context: context, 48 | child: AlertDialog( 49 | title: Text(alertTitle ?? title), 50 | content: Text(alertMessage), 51 | actions: [ 52 | FlatButton( 53 | child: Text(cancelButtonText ?? 'Cancel'), 54 | onPressed: () => Navigator.pop(context, false)), 55 | FlatButton( 56 | child: Text(okButtonText ?? 'Ok'), 57 | onPressed: () => Navigator.pop(context, true)) 58 | ], 59 | )); 60 | if (result) { 61 | onConfirm(); 62 | } else { 63 | if (onCancel != null) onCancel(); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/src/setting_datetime_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_item.dart'; 4 | import 'setting_styles.dart'; 5 | 6 | class SettingDateTimeItem extends StatelessWidget { 7 | final String title; 8 | final String displayValue; 9 | final DateTime initialDate; 10 | 11 | final ValueChanged onChanged; 12 | final bool timePicker; 13 | final bool datePicker; 14 | final ItemPriority priority; 15 | 16 | SettingDateTimeItem( 17 | {Key key, 18 | @required this.title, 19 | @required this.onChanged, 20 | @required this.displayValue, 21 | this.initialDate, 22 | this.datePicker = true, 23 | this.timePicker = true, 24 | this.priority = ItemPriority.normal}) 25 | : super(key: key) { 26 | assert(datePicker || timePicker); 27 | assert(T == DateTime || !datePicker); 28 | assert(T == TimeOfDay || datePicker); 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return SettingItem( 34 | priority: priority, 35 | title: title, 36 | displayValue: displayValue, 37 | onTap: () async { 38 | DateTime datePicked; 39 | if (datePicker) { 40 | datePicked = await showDatePicker( 41 | context: context, 42 | initialDate: initialDate ?? DateTime.now(), 43 | firstDate: DateTime(1970), 44 | lastDate: DateTime(2101), 45 | ); 46 | 47 | if (datePicked == null) { 48 | return; 49 | } 50 | } 51 | 52 | if (!timePicker) { 53 | onChanged( 54 | DateTime(datePicked.year, datePicked.month, datePicked.day) 55 | as T); 56 | return; 57 | } 58 | 59 | final todPicked = await showTimePicker( 60 | context: context, 61 | initialTime: TimeOfDay.fromDateTime(initialDate ?? DateTime.now()), 62 | ); 63 | 64 | if (todPicked == null) { 65 | return; 66 | } 67 | 68 | if (!datePicker) { 69 | onChanged(todPicked as T); 70 | return; 71 | } 72 | 73 | onChanged(DateTime( 74 | datePicked.year, 75 | datePicked.month, 76 | datePicked.day, 77 | todPicked.hour, 78 | todPicked.minute, 79 | ) as T); 80 | }); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/src/setting_radio_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'setting_item.dart'; 4 | import 'setting_styles.dart'; 5 | 6 | class SettingRadioValue { 7 | final String title; 8 | final T value; 9 | SettingRadioValue(this.title, this.value); 10 | } 11 | 12 | class SettingRadioItem extends StatelessWidget { 13 | final String title; 14 | final String displayValue; 15 | final T selectedValue; 16 | 17 | final List> items; 18 | final ValueChanged onChanged; 19 | final String cancelText; 20 | final ItemPriority priority; 21 | 22 | const SettingRadioItem({ 23 | Key key, 24 | @required this.title, 25 | @required this.items, 26 | @required this.onChanged, 27 | this.displayValue, 28 | this.selectedValue, 29 | this.cancelText, 30 | this.priority = ItemPriority.normal, 31 | }) : super(key: key); 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return SettingItem( 36 | priority: priority, 37 | title: title, 38 | displayValue: displayValue, 39 | onTap: () async { 40 | var changedValue = await showDialog( 41 | context: context, 42 | builder: (_) => SimpleDialog( 43 | title: Text(title), 44 | children: [ 45 | ...items 46 | .map((e) => RadioListTile( 47 | autofocus: true, 48 | selected: e.value == selectedValue, 49 | dense: true, 50 | title: Text(e.title, style: TextStyle(fontSize: 14.0)), 51 | value: e.value, 52 | onChanged: (value) => 53 | Navigator.of(context, rootNavigator: true) 54 | .pop(e.value), 55 | groupValue: selectedValue, 56 | )) 57 | .toList(), 58 | Padding( 59 | padding: const EdgeInsets.only(right: 10.0), 60 | child: Row( 61 | mainAxisAlignment: MainAxisAlignment.end, 62 | children: [ 63 | FlatButton( 64 | child: Text(cancelText ?? 'Cancel'), 65 | onPressed: () => Navigator.pop(context)), 66 | ], 67 | ), 68 | ), 69 | ], 70 | ), 71 | ); 72 | if (changedValue != null) { 73 | onChanged(changedValue); 74 | } 75 | }, 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | clean_settings: 27 | path: ../ 28 | 29 | # The following adds the Cupertino Icons font to your application. 30 | # Use with the CupertinoIcons class for iOS style icons. 31 | cupertino_icons: ^1.0.0 32 | 33 | dev_dependencies: 34 | flutter_test: 35 | sdk: flutter 36 | 37 | # For information on the generic Dart part of this file, see the 38 | # following page: https://dart.dev/tools/pub/pubspec 39 | 40 | # The following section is specific to Flutter. 41 | flutter: 42 | 43 | # The following line ensures that the Material Icons font is 44 | # included with your application, so that you can use the icons in 45 | # the material Icons class. 46 | uses-material-design: true 47 | 48 | # To add assets to your application, add an assets section, like this: 49 | # assets: 50 | # - images/a_dot_burr.jpeg 51 | # - images/a_dot_ham.jpeg 52 | 53 | # An image asset can refer to one or more resolution-specific "variants", see 54 | # https://flutter.dev/assets-and-images/#resolution-aware. 55 | 56 | # For details regarding adding assets from package dependencies, see 57 | # https://flutter.dev/assets-and-images/#from-packages 58 | 59 | # To add custom fonts to your application, add a fonts section here, 60 | # in this "flutter" section. Each entry in this list should have a 61 | # "family" key with the font family name, and a "fonts" key with a 62 | # list giving the asset and other descriptors for the font. For 63 | # example: 64 | # fonts: 65 | # - family: Schyler 66 | # fonts: 67 | # - asset: fonts/Schyler-Regular.ttf 68 | # - asset: fonts/Schyler-Italic.ttf 69 | # style: italic 70 | # - family: Trajan Pro 71 | # fonts: 72 | # - asset: fonts/TrajanPro.ttf 73 | # - asset: fonts/TrajanPro_Bold.ttf 74 | # weight: 700 75 | # 76 | # For details regarding fonts from package dependencies, 77 | # see https://flutter.dev/custom-fonts/#from-packages 78 | -------------------------------------------------------------------------------- /lib/src/setting_wheel_picker_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'setting_item.dart'; 5 | import 'setting_styles.dart'; 6 | 7 | class SettingWheelPickerItem extends StatelessWidget { 8 | final String title; 9 | final String displayValue; 10 | final String hintText; 11 | final String pickerSuffix; 12 | final List items; 13 | final int initialValueIndex; 14 | 15 | final ValueChanged onChanged; 16 | final ItemPriority priority; 17 | 18 | const SettingWheelPickerItem({ 19 | Key key, 20 | @required this.title, 21 | @required this.onChanged, 22 | @required this.displayValue, 23 | @required this.items, 24 | this.initialValueIndex = 0, 25 | this.hintText, 26 | this.pickerSuffix, 27 | this.priority = ItemPriority.normal, 28 | }) : super(key: key); 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return SettingItem( 33 | priority: priority, 34 | title: title, 35 | displayValue: displayValue, 36 | onTap: () async { 37 | var changedValueIndex = await showDialog( 38 | context: context, 39 | builder: (_) { 40 | var selectedValueIndex = initialValueIndex; 41 | var pickerWidget = Expanded( 42 | child: CupertinoPicker( 43 | scrollController: 44 | FixedExtentScrollController(initialItem: initialValueIndex), 45 | itemExtent: 50.0, 46 | onSelectedItemChanged: (int value) { 47 | selectedValueIndex = value; 48 | }, 49 | children: items 50 | .map((e) => Center( 51 | child: Text( 52 | e.toString(), 53 | style: kWheelPickerItem, 54 | ))) 55 | .toList(), 56 | ), 57 | ); 58 | return AlertDialog( 59 | title: Text(title), 60 | content: Container( 61 | constraints: BoxConstraints(maxHeight: 100.0), 62 | child: Row( 63 | mainAxisSize: MainAxisSize.min, 64 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 65 | children: pickerSuffix == null 66 | ? [pickerWidget] 67 | : [ 68 | SizedBox(width: 100.0, child: pickerWidget), 69 | Text(pickerSuffix) 70 | ]), 71 | ), 72 | actions: [ 73 | FlatButton( 74 | child: const Text('Cancel'), 75 | onPressed: () => Navigator.pop(context)), 76 | FlatButton( 77 | child: const Text('OK'), 78 | onPressed: () => Navigator.pop(context, selectedValueIndex)) 79 | ], 80 | ); 81 | }, 82 | ); 83 | if (changedValueIndex != null && 84 | changedValueIndex != initialValueIndex) { 85 | onChanged(changedValueIndex); 86 | } 87 | }, 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.5.0-nullsafety.1" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0-nullsafety.1" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0-nullsafety.3" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0-nullsafety.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0-nullsafety.1" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0-nullsafety.3" 46 | fake_async: 47 | dependency: transitive 48 | description: 49 | name: fake_async 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.2.0-nullsafety.1" 53 | flutter: 54 | dependency: "direct main" 55 | description: flutter 56 | source: sdk 57 | version: "0.0.0" 58 | flutter_test: 59 | dependency: "direct dev" 60 | description: flutter 61 | source: sdk 62 | version: "0.0.0" 63 | matcher: 64 | dependency: transitive 65 | description: 66 | name: matcher 67 | url: "https://pub.dartlang.org" 68 | source: hosted 69 | version: "0.12.10-nullsafety.1" 70 | meta: 71 | dependency: transitive 72 | description: 73 | name: meta 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "1.3.0-nullsafety.3" 77 | path: 78 | dependency: transitive 79 | description: 80 | name: path 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "1.8.0-nullsafety.1" 84 | pedantic: 85 | dependency: "direct dev" 86 | description: 87 | name: pedantic 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.9.2" 91 | sky_engine: 92 | dependency: transitive 93 | description: flutter 94 | source: sdk 95 | version: "0.0.99" 96 | source_span: 97 | dependency: transitive 98 | description: 99 | name: source_span 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.8.0-nullsafety.2" 103 | stack_trace: 104 | dependency: transitive 105 | description: 106 | name: stack_trace 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.10.0-nullsafety.1" 110 | stream_channel: 111 | dependency: transitive 112 | description: 113 | name: stream_channel 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "2.1.0-nullsafety.1" 117 | string_scanner: 118 | dependency: transitive 119 | description: 120 | name: string_scanner 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.1.0-nullsafety.1" 124 | term_glyph: 125 | dependency: transitive 126 | description: 127 | name: term_glyph 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.2.0-nullsafety.1" 131 | test_api: 132 | dependency: transitive 133 | description: 134 | name: test_api 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.2.19-nullsafety.2" 138 | typed_data: 139 | dependency: transitive 140 | description: 141 | name: typed_data 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.3.0-nullsafety.3" 145 | vector_math: 146 | dependency: transitive 147 | description: 148 | name: vector_math 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.1.0-nullsafety.3" 152 | sdks: 153 | dart: ">=2.10.0-110 <2.11.0" 154 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.5.0-nullsafety.1" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0-nullsafety.1" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0-nullsafety.3" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0-nullsafety.1" 32 | clean_settings: 33 | dependency: "direct main" 34 | description: 35 | path: ".." 36 | relative: true 37 | source: path 38 | version: "0.1.4" 39 | clock: 40 | dependency: transitive 41 | description: 42 | name: clock 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.0-nullsafety.1" 46 | collection: 47 | dependency: transitive 48 | description: 49 | name: collection 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.15.0-nullsafety.3" 53 | cupertino_icons: 54 | dependency: "direct main" 55 | description: 56 | name: cupertino_icons 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.0" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.2.0-nullsafety.1" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | matcher: 78 | dependency: transitive 79 | description: 80 | name: matcher 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "0.12.10-nullsafety.1" 84 | meta: 85 | dependency: transitive 86 | description: 87 | name: meta 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.3.0-nullsafety.3" 91 | path: 92 | dependency: transitive 93 | description: 94 | name: path 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "1.8.0-nullsafety.1" 98 | sky_engine: 99 | dependency: transitive 100 | description: flutter 101 | source: sdk 102 | version: "0.0.99" 103 | source_span: 104 | dependency: transitive 105 | description: 106 | name: source_span 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.8.0-nullsafety.2" 110 | stack_trace: 111 | dependency: transitive 112 | description: 113 | name: stack_trace 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.10.0-nullsafety.1" 117 | stream_channel: 118 | dependency: transitive 119 | description: 120 | name: stream_channel 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "2.1.0-nullsafety.1" 124 | string_scanner: 125 | dependency: transitive 126 | description: 127 | name: string_scanner 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.1.0-nullsafety.1" 131 | term_glyph: 132 | dependency: transitive 133 | description: 134 | name: term_glyph 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "1.2.0-nullsafety.1" 138 | test_api: 139 | dependency: transitive 140 | description: 141 | name: test_api 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "0.2.19-nullsafety.2" 145 | typed_data: 146 | dependency: transitive 147 | description: 148 | name: typed_data 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.3.0-nullsafety.3" 152 | vector_math: 153 | dependency: transitive 154 | description: 155 | name: vector_math 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "2.1.0-nullsafety.3" 159 | sdks: 160 | dart: ">=2.10.0-110 <2.11.0" 161 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![pub package](https://img.shields.io/pub/v/clean_settings.svg)](https://pub.dartlang.org/packages/clean_settings) 2 | 3 | # clean_settings 4 | 5 | Settings UI generator with sane defaults. 6 | 7 | Creating a settings screen requires the same boiler plate code over and over. Settings also need a rich set of widgets to cover all possible cases. This library aims to provide sane defaults while creating a setting screen. 8 | 9 | ## Features 10 | 11 | * Setting Sections 12 | * Out-of-the-box widgets for multiple types 13 | * Read-only items 14 | 15 | ## Widgets supported 16 | 17 | * Checkbox 18 | 19 | 20 | ![Checkbox Widget](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/checkbox-item.gif) 21 | 22 | ```dart 23 | 24 | SettingCheckboxItem( 25 | title: 'Smart Reply', 26 | value: smartReply, 27 | onChanged: (v) => setState(() => smartReply = v), 28 | description: 'Show suggested replies when available'), 29 | ``` 30 | 31 | * Switch 32 | 33 | ![Switch Widget](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/switch-item.gif) 34 | 35 | ```dart 36 | 37 | SettingSwitchItem( 38 | title: 'Smart Compose', 39 | value: smartCompose, 40 | onChanged: (v) => setState(() => smartCompose = v), 41 | description: 'Show predictive writing suggestions', 42 | priority: ItemPriority.high, 43 | ), 44 | ``` 45 | 46 | * Radio Picker 47 | 48 | 49 | ![Radio Picker](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/radio-item.gif) 50 | 51 | ```dart 52 | 53 | SettingRadioItem( 54 | title: 'Theme', 55 | displayValue: '$theme theme', 56 | selectedValue: theme, 57 | items: [ 58 | SettingRadioValue('Light', 'Light'), 59 | SettingRadioValue('Dark', 'Dark'), 60 | SettingRadioValue('System Default', 'System Default'), 61 | ], 62 | onChanged: (v) => setState(() => theme = v), 63 | ), 64 | 65 | ``` 66 | 67 | * Text Input 68 | 69 | 70 | ![Text Input](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/text-item.gif) 71 | 72 | ```dart 73 | SettingTextItem( 74 | title: 'Auto Reply Message', 75 | displayValue: autoReplyMessage, 76 | initialValue: autoReplyMessage, 77 | hintText: 'Sent by system on away', 78 | onChanged: (v) => setState(() => autoReplyMessage = v), 79 | ), 80 | 81 | ``` 82 | 83 | * Date and Time Picker 84 | 85 | 86 | ![Date Time Picker](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/datetime-item.gif) 87 | 88 | ```dart 89 | SettingDateTimeItem( 90 | title: 'Next Scheduled Email At', 91 | displayValue: scheduledEmailSlug, 92 | onChanged: (v) => setState(() => scheduledEmailDateTime = v), 93 | ), 94 | ``` 95 | 96 | 97 | * Date Picker 98 | 99 | 100 | ![Date Picker](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/date-item.gif) 101 | 102 | ```dart 103 | SettingDateTimeItem( 104 | title: 'Date of birth', 105 | displayValue: dateOfBirthSlug, 106 | onChanged: (v) => setState(() => dateOfBirth = v), 107 | timePicker: false, 108 | ), 109 | ``` 110 | 111 | * Time Picker 112 | 113 | 114 | ![Time Picker](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/time-item.gif) 115 | 116 | ```dart 117 | SettingDateTimeItem( 118 | title: 'Daily wake up email', 119 | displayValue: dailyEmailAt.format(context), 120 | onChanged: (v) => setState(() => dailyEmailAt = v), 121 | datePicker: false, 122 | ), 123 | ``` 124 | 125 | 126 | * Wheel - Number List 127 | 128 | 129 | ![Wheel Number](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/wheel-number-item.gif) 130 | 131 | ```dart 132 | SettingWheelPickerItem( 133 | title: 'Days of mail to sync', 134 | displayValue: daysOfMailToSync.toString(), 135 | initialValueIndex: daysOfMailToSync, 136 | items: List.generate(10, (index) => index.toString()), 137 | onChanged: (v) => setState(() => daysOfMailToSync = v), 138 | ), 139 | ``` 140 | 141 | 142 | * Wheel - Text 143 | 144 | 145 | ![Wheel Text](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/wheel-text-item.gif) 146 | 147 | ```dart 148 | var replyOptions = ['Reply', 'Reply All', 'Last Chosen', 'None']; 149 | SettingWheelPickerItem( 150 | title: 'Default reply action', 151 | displayValue: replyOptions[chosenReplyOptionIndex], 152 | initialValueIndex: chosenReplyOptionIndex, 153 | items: replyOptions, 154 | onChanged: (v) => setState(() => chosenReplyOptionIndex = v), 155 | ), 156 | 157 | ``` 158 | 159 | 160 | * Confirm Dialog 161 | 162 | 163 | ![Confirm Dialog](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/confirm-item.gif) 164 | 165 | ```dart 166 | SettingConfirmItem( 167 | title: 'Delete account', 168 | displayValue: 'Permanently deletes your account', 169 | alertTitle: 'Delete your account', 170 | alertMessage: 'Are you sure?', 171 | priority: ItemPriority.high, 172 | onConfirm: () => {}, 173 | onCancel: () => {}, 174 | ), 175 | 176 | ``` 177 | 178 | 179 | * Custom Handler 180 | 181 | 182 | ![Custom Handler](https://raw.githubusercontent.com/grouped/clean_settings/master/demo/custom-handler-item.gif) 183 | 184 | ```dart 185 | SettingItem( 186 | title: 'Simple Counter', 187 | displayValue: counter.toString(), 188 | onTap: () => setState(() => counter++), 189 | ), 190 | ``` 191 | 192 | ## Structure 193 | 194 | ``` 195 | 196 | Root - SettingContainer 197 | \ 198 | \_ SettingSection 199 | \ 200 | \_ SettingItem (or Variants) 201 | 202 | ``` 203 | 204 | ## Common Options 205 | 206 | * `priority` 207 | 208 | Set the priority of the item to one of: 209 | * `ItemPriority.high` - Shows red color 210 | * `ItemPriority.normal` - Default color 211 | * `ItemPriority.low` - Shows in green color 212 | * `ItemPriority.disabled` - Disables the item 213 | 214 | ## Example 215 | 216 | Creates a simple Checkbox setting item 217 | 218 | ```dart 219 | SettingContainer( 220 | sections: [ 221 | SettingSection( 222 | title: 'Appearance', 223 | items: [ 224 | SettingCheckboxItem( 225 | title: 'Smart Reply', 226 | value: smartReply, 227 | onChanged: (v) => setState(() => smartReply = v), 228 | description: 'Show suggested replies when available'), 229 | ], 230 | ), 231 | ], 232 | ) 233 | ``` 234 | 235 | ## Notes 236 | 237 | * Early version 238 | * API bound to change as more widgets get added 239 | * Please report bugs/issues/features 240 | 241 | ## Buy Me A Coffee 242 | 243 | [![Buy Me A Coffee](https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png "Buy Me A Coffee")](https://www.buymeacoffee.com/arif "Buy Me A Coffee") 244 | 245 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:clean_settings/clean_settings.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | void main() { 5 | runApp(MyApp()); 6 | } 7 | 8 | class MyApp extends StatelessWidget { 9 | // This widget is the root of your application. 10 | @override 11 | Widget build(BuildContext context) { 12 | return MaterialApp( 13 | debugShowCheckedModeBanner: false, 14 | home: Home(), 15 | ); 16 | } 17 | } 18 | 19 | class Home extends StatefulWidget { 20 | @override 21 | _HomeState createState() => _HomeState(); 22 | } 23 | 24 | class _HomeState extends State { 25 | GlobalKey _scaffoldKey = new GlobalKey(); 26 | int counter = 0; 27 | String theme = 'System Default'; 28 | bool smartReply = false; 29 | String autoReplyMessage; 30 | int daysOfMailToSync = 5; 31 | 32 | int chosenReplyOptionIndex = 1; 33 | DateTime dateOfBirth = DateTime.now(); 34 | DateTime scheduledEmailDateTime = DateTime.now(); 35 | TimeOfDay dailyEmailAt = TimeOfDay(hour: 9, minute: 0); 36 | 37 | bool disableDemoItems = false; 38 | 39 | bool smartCompose = true; 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | String dateOfBirthSlug = 44 | "${dateOfBirth.year.toString()}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}"; 45 | String scheduledEmailSlug = 46 | "${scheduledEmailDateTime.year.toString()}-${scheduledEmailDateTime.month.toString().padLeft(2, '0')}-${scheduledEmailDateTime.day.toString().padLeft(2, '0')} ${scheduledEmailDateTime.hour.toString().padLeft(2, '0')}:${scheduledEmailDateTime.minute.toString().padLeft(2, '0')}"; 47 | 48 | var replyOptions = ['Reply', 'Reply All', 'Last Chosen', 'None']; 49 | return Scaffold( 50 | key: _scaffoldKey, 51 | appBar: AppBar( 52 | title: Text( 53 | 'App Settings', 54 | style: TextStyle( 55 | fontSize: 16.0, 56 | fontWeight: FontWeight.w300, 57 | color: Colors.black87), 58 | ), 59 | centerTitle: true, 60 | backgroundColor: Colors.white, 61 | elevation: 0, 62 | ), 63 | body: Container( 64 | child: SettingContainer( 65 | sections: [ 66 | SettingSection( 67 | title: 'Demo Options', 68 | items: [ 69 | SettingCheckboxItem( 70 | title: 'Disable all items', 71 | description: 'Disabled all demo options', 72 | priority: ItemPriority.high, 73 | value: disableDemoItems, 74 | onChanged: (v) => setState(() => disableDemoItems = v), 75 | ), 76 | ], 77 | ), 78 | SettingSection( 79 | title: 'Appearance', 80 | items: [ 81 | SettingItem( 82 | title: 'Simple Counter', 83 | displayValue: counter.toString(), 84 | onTap: () => setState(() => counter++), 85 | priority: disableDemoItems 86 | ? ItemPriority.disabled 87 | : ItemPriority.normal, 88 | ), 89 | SettingItem( 90 | title: 'Launch Unicorn Startup', 91 | displayValue: 'Raise billions', 92 | onTap: () => setState(() => counter++), 93 | priority: ItemPriority.disabled, 94 | ), 95 | SettingRadioItem( 96 | priority: disableDemoItems 97 | ? ItemPriority.disabled 98 | : ItemPriority.normal, 99 | title: 'Theme', 100 | displayValue: '$theme theme', 101 | selectedValue: theme, 102 | items: [ 103 | SettingRadioValue('Light', 'Light'), 104 | SettingRadioValue('Dark', 'Dark'), 105 | SettingRadioValue('System Default', 'System Default'), 106 | ], 107 | onChanged: (v) => setState(() => theme = v), 108 | ), 109 | ], 110 | ), 111 | SettingSection( 112 | title: 'Interactive', 113 | items: [ 114 | SettingConfirmItem( 115 | title: 'Delete account', 116 | displayValue: 'Permanently deletes your account', 117 | alertTitle: 'Delete your account', 118 | alertMessage: 'Are you sure?', 119 | priority: disableDemoItems 120 | ? ItemPriority.disabled 121 | : ItemPriority.high, 122 | onConfirm: () => _scaffoldKey.currentState.showSnackBar( 123 | SnackBar( 124 | content: Text('Confirmed!'), 125 | duration: Duration(seconds: 3))), 126 | onCancel: () => _scaffoldKey.currentState.showSnackBar( 127 | SnackBar( 128 | content: Text('Canceled!'), 129 | duration: Duration(seconds: 3))), 130 | ), 131 | SettingRadioItem( 132 | title: 'Theme', 133 | displayValue: '$theme theme', 134 | selectedValue: theme, 135 | items: [ 136 | SettingRadioValue('Light', 'Light'), 137 | SettingRadioValue('Dark', 'Dark'), 138 | SettingRadioValue('System Default', 'System Default'), 139 | ], 140 | onChanged: (v) => setState(() => theme = v), 141 | priority: disableDemoItems 142 | ? ItemPriority.disabled 143 | : ItemPriority.normal, 144 | ), 145 | ], 146 | ), 147 | SettingSection( 148 | title: 'Inbox', 149 | items: [ 150 | SettingCheckboxItem( 151 | title: 'Smart Reply', 152 | value: smartReply, 153 | onChanged: (v) => setState(() => smartReply = v), 154 | description: 'Show suggested replies when available', 155 | priority: disableDemoItems 156 | ? ItemPriority.disabled 157 | : ItemPriority.normal, 158 | ), 159 | SettingSwitchItem( 160 | title: 'Smart Compose', 161 | value: smartCompose, 162 | onChanged: (v) => setState(() => smartCompose = v), 163 | description: 'Show predictive writing suggestions', 164 | priority: disableDemoItems 165 | ? ItemPriority.disabled 166 | : ItemPriority.normal, 167 | ), 168 | SettingTextItem( 169 | title: 'Auto Reply Message', 170 | displayValue: autoReplyMessage, 171 | initialValue: autoReplyMessage, 172 | hintText: 'Sent by system on away', 173 | onChanged: (v) => setState(() => autoReplyMessage = v), 174 | priority: disableDemoItems 175 | ? ItemPriority.disabled 176 | : ItemPriority.normal, 177 | ), 178 | SettingWheelPickerItem( 179 | title: 'Days of mail to sync', 180 | displayValue: daysOfMailToSync.toString(), 181 | initialValueIndex: daysOfMailToSync, 182 | items: List.generate(10, (index) => index.toString()), 183 | onChanged: (v) => setState(() => daysOfMailToSync = v), 184 | priority: disableDemoItems 185 | ? ItemPriority.disabled 186 | : ItemPriority.normal, 187 | ), 188 | SettingWheelPickerItem( 189 | title: 'Default reply action', 190 | displayValue: replyOptions[chosenReplyOptionIndex], 191 | initialValueIndex: chosenReplyOptionIndex, 192 | items: replyOptions, 193 | onChanged: (v) => setState(() => chosenReplyOptionIndex = v), 194 | priority: disableDemoItems 195 | ? ItemPriority.disabled 196 | : ItemPriority.normal, 197 | ), 198 | SettingDateTimeItem( 199 | title: 'Next Scheduled Email At', 200 | displayValue: scheduledEmailSlug, 201 | onChanged: (v) => setState(() => scheduledEmailDateTime = v), 202 | priority: disableDemoItems 203 | ? ItemPriority.disabled 204 | : ItemPriority.normal, 205 | ), 206 | SettingDateTimeItem( 207 | title: 'Date of birth', 208 | displayValue: dateOfBirthSlug, 209 | onChanged: (v) => setState(() => dateOfBirth = v), 210 | timePicker: false, 211 | priority: disableDemoItems 212 | ? ItemPriority.disabled 213 | : ItemPriority.normal, 214 | ), 215 | SettingDateTimeItem( 216 | title: 'Daily wake up email', 217 | displayValue: dailyEmailAt.format(context), 218 | onChanged: (v) => setState(() => dailyEmailAt = v), 219 | datePicker: false, 220 | priority: disableDemoItems 221 | ? ItemPriority.disabled 222 | : ItemPriority.normal, 223 | ), 224 | ], 225 | ), 226 | ], 227 | ), 228 | ), 229 | ); 230 | } 231 | } 232 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 97C146F11CF9000F007C117D /* Supporting Files */, 94 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 95 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 96 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 97 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 98 | ); 99 | path = Runner; 100 | sourceTree = ""; 101 | }; 102 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | /* End PBXGroup section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 97C146ED1CF9000F007C117D /* Runner */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 115 | buildPhases = ( 116 | 9740EEB61CF901F6004384FC /* Run Script */, 117 | 97C146EA1CF9000F007C117D /* Sources */, 118 | 97C146EB1CF9000F007C117D /* Frameworks */, 119 | 97C146EC1CF9000F007C117D /* Resources */, 120 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 121 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 122 | ); 123 | buildRules = ( 124 | ); 125 | dependencies = ( 126 | ); 127 | name = Runner; 128 | productName = Runner; 129 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 130 | productType = "com.apple.product-type.application"; 131 | }; 132 | /* End PBXNativeTarget section */ 133 | 134 | /* Begin PBXProject section */ 135 | 97C146E61CF9000F007C117D /* Project object */ = { 136 | isa = PBXProject; 137 | attributes = { 138 | LastUpgradeCheck = 1020; 139 | ORGANIZATIONNAME = ""; 140 | TargetAttributes = { 141 | 97C146ED1CF9000F007C117D = { 142 | CreatedOnToolsVersion = 7.3.1; 143 | LastSwiftMigration = 1100; 144 | }; 145 | }; 146 | }; 147 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 148 | compatibilityVersion = "Xcode 9.3"; 149 | developmentRegion = en; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | Base, 154 | ); 155 | mainGroup = 97C146E51CF9000F007C117D; 156 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 157 | projectDirPath = ""; 158 | projectRoot = ""; 159 | targets = ( 160 | 97C146ED1CF9000F007C117D /* Runner */, 161 | ); 162 | }; 163 | /* End PBXProject section */ 164 | 165 | /* Begin PBXResourcesBuildPhase section */ 166 | 97C146EC1CF9000F007C117D /* Resources */ = { 167 | isa = PBXResourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 171 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 172 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 173 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXShellScriptBuildPhase section */ 180 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputPaths = ( 186 | ); 187 | name = "Thin Binary"; 188 | outputPaths = ( 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | shellPath = /bin/sh; 192 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 193 | }; 194 | 9740EEB61CF901F6004384FC /* Run Script */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Run Script"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 207 | }; 208 | /* End PBXShellScriptBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 97C146EA1CF9000F007C117D /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 216 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXVariantGroup section */ 223 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C146FB1CF9000F007C117D /* Base */, 227 | ); 228 | name = Main.storyboard; 229 | sourceTree = ""; 230 | }; 231 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 97C147001CF9000F007C117D /* Base */, 235 | ); 236 | name = LaunchScreen.storyboard; 237 | sourceTree = ""; 238 | }; 239 | /* End PBXVariantGroup section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 243 | isa = XCBuildConfiguration; 244 | buildSettings = { 245 | ALWAYS_SEARCH_USER_PATHS = NO; 246 | CLANG_ANALYZER_NONNULL = YES; 247 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 248 | CLANG_CXX_LIBRARY = "libc++"; 249 | CLANG_ENABLE_MODULES = YES; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 252 | CLANG_WARN_BOOL_CONVERSION = YES; 253 | CLANG_WARN_COMMA = YES; 254 | CLANG_WARN_CONSTANT_CONVERSION = YES; 255 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 256 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INFINITE_RECURSION = YES; 260 | CLANG_WARN_INT_CONVERSION = YES; 261 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 262 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 263 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 264 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 265 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 266 | CLANG_WARN_STRICT_PROTOTYPES = YES; 267 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 268 | CLANG_WARN_UNREACHABLE_CODE = YES; 269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 270 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 271 | COPY_PHASE_STRIP = NO; 272 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 273 | ENABLE_NS_ASSERTIONS = NO; 274 | ENABLE_STRICT_OBJC_MSGSEND = YES; 275 | GCC_C_LANGUAGE_STANDARD = gnu99; 276 | GCC_NO_COMMON_BLOCKS = YES; 277 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 278 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 279 | GCC_WARN_UNDECLARED_SELECTOR = YES; 280 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 281 | GCC_WARN_UNUSED_FUNCTION = YES; 282 | GCC_WARN_UNUSED_VARIABLE = YES; 283 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 284 | MTL_ENABLE_DEBUG_INFO = NO; 285 | SDKROOT = iphoneos; 286 | SUPPORTED_PLATFORMS = iphoneos; 287 | TARGETED_DEVICE_FAMILY = "1,2"; 288 | VALIDATE_PRODUCT = YES; 289 | }; 290 | name = Profile; 291 | }; 292 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 293 | isa = XCBuildConfiguration; 294 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | CLANG_ENABLE_MODULES = YES; 298 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 299 | ENABLE_BITCODE = NO; 300 | FRAMEWORK_SEARCH_PATHS = ( 301 | "$(inherited)", 302 | "$(PROJECT_DIR)/Flutter", 303 | ); 304 | INFOPLIST_FILE = Runner/Info.plist; 305 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 306 | LIBRARY_SEARCH_PATHS = ( 307 | "$(inherited)", 308 | "$(PROJECT_DIR)/Flutter", 309 | ); 310 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 311 | PRODUCT_NAME = "$(TARGET_NAME)"; 312 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 313 | SWIFT_VERSION = 5.0; 314 | VERSIONING_SYSTEM = "apple-generic"; 315 | }; 316 | name = Profile; 317 | }; 318 | 97C147031CF9000F007C117D /* Debug */ = { 319 | isa = XCBuildConfiguration; 320 | buildSettings = { 321 | ALWAYS_SEARCH_USER_PATHS = NO; 322 | CLANG_ANALYZER_NONNULL = YES; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_COMMA = YES; 330 | CLANG_WARN_CONSTANT_CONVERSION = YES; 331 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INFINITE_RECURSION = YES; 336 | CLANG_WARN_INT_CONVERSION = YES; 337 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 338 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 339 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 341 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 342 | CLANG_WARN_STRICT_PROTOTYPES = YES; 343 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 347 | COPY_PHASE_STRIP = NO; 348 | DEBUG_INFORMATION_FORMAT = dwarf; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | ENABLE_TESTABILITY = YES; 351 | GCC_C_LANGUAGE_STANDARD = gnu99; 352 | GCC_DYNAMIC_NO_PIC = NO; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_OPTIMIZATION_LEVEL = 0; 355 | GCC_PREPROCESSOR_DEFINITIONS = ( 356 | "DEBUG=1", 357 | "$(inherited)", 358 | ); 359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 361 | GCC_WARN_UNDECLARED_SELECTOR = YES; 362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_VARIABLE = YES; 365 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 366 | MTL_ENABLE_DEBUG_INFO = YES; 367 | ONLY_ACTIVE_ARCH = YES; 368 | SDKROOT = iphoneos; 369 | TARGETED_DEVICE_FAMILY = "1,2"; 370 | }; 371 | name = Debug; 372 | }; 373 | 97C147041CF9000F007C117D /* Release */ = { 374 | isa = XCBuildConfiguration; 375 | buildSettings = { 376 | ALWAYS_SEARCH_USER_PATHS = NO; 377 | CLANG_ANALYZER_NONNULL = YES; 378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 379 | CLANG_CXX_LIBRARY = "libc++"; 380 | CLANG_ENABLE_MODULES = YES; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 383 | CLANG_WARN_BOOL_CONVERSION = YES; 384 | CLANG_WARN_COMMA = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INFINITE_RECURSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 393 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 394 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 397 | CLANG_WARN_STRICT_PROTOTYPES = YES; 398 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 399 | CLANG_WARN_UNREACHABLE_CODE = YES; 400 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 401 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 404 | ENABLE_NS_ASSERTIONS = NO; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu99; 407 | GCC_NO_COMMON_BLOCKS = YES; 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 415 | MTL_ENABLE_DEBUG_INFO = NO; 416 | SDKROOT = iphoneos; 417 | SUPPORTED_PLATFORMS = iphoneos; 418 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 419 | TARGETED_DEVICE_FAMILY = "1,2"; 420 | VALIDATE_PRODUCT = YES; 421 | }; 422 | name = Release; 423 | }; 424 | 97C147061CF9000F007C117D /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 427 | buildSettings = { 428 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 429 | CLANG_ENABLE_MODULES = YES; 430 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 431 | ENABLE_BITCODE = NO; 432 | FRAMEWORK_SEARCH_PATHS = ( 433 | "$(inherited)", 434 | "$(PROJECT_DIR)/Flutter", 435 | ); 436 | INFOPLIST_FILE = Runner/Info.plist; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 438 | LIBRARY_SEARCH_PATHS = ( 439 | "$(inherited)", 440 | "$(PROJECT_DIR)/Flutter", 441 | ); 442 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 445 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 446 | SWIFT_VERSION = 5.0; 447 | VERSIONING_SYSTEM = "apple-generic"; 448 | }; 449 | name = Debug; 450 | }; 451 | 97C147071CF9000F007C117D /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 454 | buildSettings = { 455 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 456 | CLANG_ENABLE_MODULES = YES; 457 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 458 | ENABLE_BITCODE = NO; 459 | FRAMEWORK_SEARCH_PATHS = ( 460 | "$(inherited)", 461 | "$(PROJECT_DIR)/Flutter", 462 | ); 463 | INFOPLIST_FILE = Runner/Info.plist; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 465 | LIBRARY_SEARCH_PATHS = ( 466 | "$(inherited)", 467 | "$(PROJECT_DIR)/Flutter", 468 | ); 469 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 470 | PRODUCT_NAME = "$(TARGET_NAME)"; 471 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 472 | SWIFT_VERSION = 5.0; 473 | VERSIONING_SYSTEM = "apple-generic"; 474 | }; 475 | name = Release; 476 | }; 477 | /* End XCBuildConfiguration section */ 478 | 479 | /* Begin XCConfigurationList section */ 480 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 481 | isa = XCConfigurationList; 482 | buildConfigurations = ( 483 | 97C147031CF9000F007C117D /* Debug */, 484 | 97C147041CF9000F007C117D /* Release */, 485 | 249021D3217E4FDB00AE95B9 /* Profile */, 486 | ); 487 | defaultConfigurationIsVisible = 0; 488 | defaultConfigurationName = Release; 489 | }; 490 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | 97C147061CF9000F007C117D /* Debug */, 494 | 97C147071CF9000F007C117D /* Release */, 495 | 249021D4217E4FDB00AE95B9 /* Profile */, 496 | ); 497 | defaultConfigurationIsVisible = 0; 498 | defaultConfigurationName = Release; 499 | }; 500 | /* End XCConfigurationList section */ 501 | }; 502 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 503 | } 504 | --------------------------------------------------------------------------------