├── .gitignore
├── .idea
├── libraries
│ ├── Dart_SDK.xml
│ └── Flutter_for_Android.xml
├── modules.xml
├── runConfigurations
│ └── example_lib_main_dart.xml
└── workspace.xml
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── example
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── team
│ │ │ │ │ └── itome
│ │ │ │ │ ├── example
│ │ │ │ │ └── MainActivity.kt
│ │ │ │ │ └── flutter_circle_color_picker_example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── 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
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── 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-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
└── web
│ ├── favicon.png
│ ├── icons
│ ├── Icon-192.png
│ └── Icon-512.png
│ ├── index.html
│ └── manifest.json
├── flutter_circle_color_picker.iml
├── lib
└── flutter_circle_color_picker.dart
├── pubspec.lock
└── pubspec.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
--------------------------------------------------------------------------------
/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/example_lib_main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
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 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.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: b6e92003c8abc5e04a193b58e4a7c8b98d4b8536
8 | channel: dev
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.3.0
2 |
3 | * Add CircleColorPickerController to control picker color from outside.
4 | * Remove initialColor, use CircleColorPickerController instead.
5 | * Sound null safety (Thanks to @tsonnen)
6 | * Fix picker in scroll view bug. https://github.com/itome/flutter_circle_color_picker/pull/20
7 |
8 | ## 0.2.0
9 |
10 | * Fix underlying color bug. https://github.com/itome/flutter_circle_color_picker/pull/10
11 | * Add color code builder. https://github.com/itome/flutter_circle_color_picker/pull/7
12 | * Add text style as parameter. https://github.com/itome/flutter_circle_color_picker/pull/3
13 |
14 | ## 0.1.0
15 |
16 | * Beta release
17 | * Initial color support
18 | * Dark theme support
19 |
20 | ## 0.0.1
21 |
22 | * Initial Release
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Takeshi Tsukamoto
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.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flutter_circle_color_picker
2 | [](https://pub.dartlang.org/packages/flutter_circle_color_picker)
3 |
4 | A beautiful circle color picker for flutter. [Online Demo](https://itome.github.io/flutter_circle_color_picker/)
5 |
6 | |Light theme|Dark Theme|
7 | | --- | --- |
8 | |  |  |
9 |
10 |
11 | ## Usage
12 |
13 | ```dart
14 | ...
15 | body: Center(
16 | child: CircleColorPicker(
17 | initialColor: Colors.blue,
18 | onChanged: (color) => print(color),
19 | size: const Size(240, 240),
20 | strokeWidth: 4,
21 | thumbSize: 36,
22 | ),
23 | ),
24 | ...
25 | ```
26 |
27 | ## API
28 |
29 | ```dart
30 | /// Called during a drag when the user is selecting a color.
31 | ///
32 | /// This callback called with latest color that user selected.
33 | final ValueChanged onChanged;
34 |
35 | /// Called when drag ended.
36 | ///
37 | /// This callback called with latest color that user selected.
38 | final ValueChanged? onEnded;
39 |
40 | /// An object to controll picker color dynamically.
41 | ///
42 | /// Provide initialColor if needed.
43 | final CircleColorPickerController? controller;
44 |
45 | /// The size of widget.
46 | /// Draggable area is thumb widget is included to the size,
47 | /// so circle is smaller than the size.
48 | ///
49 | /// Default value is 280 x 280.
50 | final Size size;
51 |
52 | /// The width of circle border.
53 | ///
54 | /// Default value is 2.
55 | final double strokeWidth;
56 |
57 | /// The size of thumb for circle picker.
58 | ///
59 | /// Default value is 32.
60 | final double thumbSize;
61 |
62 | /// Text style config
63 | ///
64 | /// Default value is Black
65 | final TextStyle textStyle;
66 |
67 | /// Widget builder that show color code section.
68 | /// This functions is called every time color changed.
69 | ///
70 | /// Default is Text widget that shows rgb strings;
71 | final ColorCodeBuilder colorCodeBuilder;
72 | ```
73 |
--------------------------------------------------------------------------------
/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 | # Exceptions to above rules.
37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
38 |
--------------------------------------------------------------------------------
/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: b6e92003c8abc5e04a193b58e4a7c8b98d4b8536
8 | channel: dev
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_circle_color_picker_example
2 |
3 | Demonstrates how to use the flutter_circle_color_picker plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/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/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 "team.itome.flutter_circle_color_picker_example"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test:runner:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
67 | }
68 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/team/itome/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package team.itome.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/team/itome/flutter_circle_color_picker_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package team.itome.flutter_circle_color_picker_example
2 |
3 | import android.os.Bundle
4 | import io.flutter.app.FlutterActivity
5 | import io.flutter.plugins.GeneratedPluginRegistrant
6 |
7 | class MainActivity: FlutterActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | GeneratedPluginRegistrant.registerWith(this)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/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 = "The Chromium Authors";
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 3.2";
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 = team.itome.flutterCircleColorPickerExample;
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 = team.itome.flutterCircleColorPickerExample;
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 = team.itome.flutterCircleColorPickerExample;
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 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.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/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 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/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/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/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/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 | flutter_circle_color_picker_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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_circle_color_picker/flutter_circle_color_picker.dart';
3 |
4 | void main() => runApp(MyApp());
5 |
6 | class MyApp extends StatefulWidget {
7 | @override
8 | _MyAppState createState() => _MyAppState();
9 | }
10 |
11 | class _MyAppState extends State {
12 | Color _currentColor = Colors.blue;
13 | final _controller = CircleColorPickerController(
14 | initialColor: Colors.blue,
15 | );
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return MaterialApp(
20 | home: Scaffold(
21 | appBar: AppBar(
22 | backgroundColor: _currentColor,
23 | title: const Text('Circle color picker sample'),
24 | ),
25 | body: Column(
26 | crossAxisAlignment: CrossAxisAlignment.center,
27 | children: [
28 | const SizedBox(height: 48),
29 | Center(
30 | child: CircleColorPicker(
31 | controller: _controller,
32 | onChanged: (color) {
33 | setState(() => _currentColor = color);
34 | },
35 | ),
36 | ),
37 | const SizedBox(height: 48),
38 | Row(
39 | mainAxisSize: MainAxisSize.min,
40 | children: [
41 | TextButton(
42 | onPressed: () => _controller.color = Colors.blue,
43 | child: Text('BLUE', style: TextStyle(color: Colors.blue)),
44 | ),
45 | TextButton(
46 | onPressed: () => _controller.color = Colors.green,
47 | child: Text('GREEN', style: TextStyle(color: Colors.green)),
48 | ),
49 | TextButton(
50 | onPressed: () => _controller.color = Colors.red,
51 | child: Text('RED', style: TextStyle(color: Colors.red)),
52 | ),
53 | ],
54 | ),
55 | ],
56 | ),
57 | ),
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/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"
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"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "0.1.2"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.2.0"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_circle_color_picker:
66 | dependency: "direct dev"
67 | description:
68 | path: ".."
69 | relative: true
70 | source: path
71 | version: "0.3.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"
84 | meta:
85 | dependency: transitive
86 | description:
87 | name: meta
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "1.3.0"
91 | path:
92 | dependency: transitive
93 | description:
94 | name: path
95 | url: "https://pub.dartlang.org"
96 | source: hosted
97 | version: "1.8.0"
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"
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"
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"
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"
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"
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"
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"
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"
159 | sdks:
160 | dart: ">=2.12.0 <3.0.0"
161 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_circle_color_picker_example
2 | description: Demonstrates how to use the flutter_circle_color_picker plugin.
3 | publish_to: 'none'
4 | version: 0.0.1
5 |
6 | environment:
7 | sdk: ">=2.1.0 <3.0.0"
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 |
13 | # The following adds the Cupertino Icons font to your application.
14 | # Use with the CupertinoIcons class for iOS style icons.
15 | cupertino_icons: ^0.1.2
16 |
17 | dev_dependencies:
18 | flutter_test:
19 | sdk: flutter
20 |
21 | flutter_circle_color_picker:
22 | path: ../
23 |
24 | # For information on the generic Dart part of this file, see the
25 | # following page: https://dart.dev/tools/pub/pubspec
26 |
27 | # The following section is specific to Flutter.
28 | flutter:
29 |
30 | # The following line ensures that the Material Icons font is
31 | # included with your application, so that you can use the icons in
32 | # the material Icons class.
33 | uses-material-design: true
34 |
35 | # To add assets to your application, add an assets section, like this:
36 | # assets:
37 | # - images/a_dot_burr.jpeg
38 | # - images/a_dot_ham.jpeg
39 |
40 | # An image asset can refer to one or more resolution-specific "variants", see
41 | # https://flutter.dev/assets-and-images/#resolution-aware.
42 |
43 | # For details regarding adding assets from package dependencies, see
44 | # https://flutter.dev/assets-and-images/#from-packages
45 |
46 | # To add custom fonts to your application, add a fonts section here,
47 | # in this "flutter" section. Each entry in this list should have a
48 | # "family" key with the font family name, and a "fonts" key with a
49 | # list giving the asset and other descriptors for the font. For
50 | # example:
51 | # fonts:
52 | # - family: Schyler
53 | # fonts:
54 | # - asset: fonts/Schyler-Regular.ttf
55 | # - asset: fonts/Schyler-Italic.ttf
56 | # style: italic
57 | # - family: Trajan Pro
58 | # fonts:
59 | # - asset: fonts/TrajanPro.ttf
60 | # - asset: fonts/TrajanPro_Bold.ttf
61 | # weight: 700
62 | #
63 | # For details regarding fonts from package dependencies,
64 | # see https://flutter.dev/custom-fonts/#from-packages
65 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/itome/flutter_circle_color_picker/d28f294ccebf7ec73dc08af72acb680df08dc908/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | example
30 |
31 |
32 |
33 |
36 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/flutter_circle_color_picker.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/flutter_circle_color_picker.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:math';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter/widgets.dart';
6 |
7 | typedef ColorCodeBuilder = Widget Function(BuildContext context, Color color);
8 |
9 | class CircleColorPickerController extends ChangeNotifier {
10 | CircleColorPickerController({
11 | Color initialColor = const Color.fromARGB(255, 255, 0, 0),
12 | }) : _color = initialColor;
13 |
14 | Color _color;
15 | Color get color => _color;
16 | set color(Color color) {
17 | _color = color;
18 | notifyListeners();
19 | }
20 | }
21 |
22 | class CircleColorPicker extends StatefulWidget {
23 | const CircleColorPicker({
24 | Key? key,
25 | this.onChanged,
26 | this.onEnded,
27 | this.size = const Size(280, 280),
28 | this.strokeWidth = 2,
29 | this.thumbSize = 32,
30 | this.controller,
31 | this.textStyle = const TextStyle(
32 | fontSize: 24,
33 | fontWeight: FontWeight.bold,
34 | color: Colors.black,
35 | ),
36 | this.colorCodeBuilder,
37 | }) : super(key: key);
38 |
39 | /// Called during a drag when the user is selecting a color.
40 | ///
41 | /// This callback called with latest color that user selected.
42 | final ValueChanged? onChanged;
43 |
44 | /// Called when drag ended.
45 | ///
46 | /// This callback called with latest color that user selected.
47 | final ValueChanged? onEnded;
48 |
49 | /// An object to controll picker color dynamically.
50 | ///
51 | /// Provide initialColor if needed.
52 | final CircleColorPickerController? controller;
53 |
54 | /// The size of widget.
55 | /// Draggable area is thumb widget is included to the size,
56 | /// so circle is smaller than the size.
57 | ///
58 | /// Default value is 280 x 280.
59 | final Size size;
60 |
61 | /// The width of circle border.
62 | ///
63 | /// Default value is 2.
64 | final double strokeWidth;
65 |
66 | /// The size of thumb for circle picker.
67 | ///
68 | /// Default value is 32.
69 | final double thumbSize;
70 |
71 | /// Text style config
72 | ///
73 | /// Default value is Black
74 | final TextStyle textStyle;
75 |
76 | /// Widget builder that show color code section.
77 | /// This functions is called every time color changed.
78 | ///
79 | /// Default is Text widget that shows rgb strings;
80 | final ColorCodeBuilder? colorCodeBuilder;
81 |
82 | Color get initialColor =>
83 | controller?.color ?? const Color.fromARGB(255, 255, 0, 0);
84 |
85 | double get initialLightness => HSLColor.fromColor(initialColor).lightness;
86 |
87 | double get initialHue => HSLColor.fromColor(initialColor).hue;
88 |
89 | @override
90 | _CircleColorPickerState createState() => _CircleColorPickerState();
91 | }
92 |
93 | class _CircleColorPickerState extends State
94 | with TickerProviderStateMixin {
95 | late AnimationController _lightnessController;
96 | late AnimationController _hueController;
97 |
98 | Color get _color {
99 | return HSLColor.fromAHSL(
100 | 1,
101 | _hueController.value,
102 | 1,
103 | _lightnessController.value,
104 | ).toColor();
105 | }
106 |
107 | @override
108 | Widget build(BuildContext context) {
109 | return SizedBox(
110 | width: widget.size.width,
111 | height: widget.size.height,
112 | child: Stack(
113 | children: [
114 | _HuePicker(
115 | hue: _hueController.value,
116 | size: widget.size,
117 | strokeWidth: widget.strokeWidth,
118 | thumbSize: widget.thumbSize,
119 | onEnded: _onEnded,
120 | onChanged: (hue) {
121 | _hueController.value = hue;
122 | },
123 | ),
124 | AnimatedBuilder(
125 | animation: _hueController,
126 | builder: (context, child) {
127 | return AnimatedBuilder(
128 | animation: _lightnessController,
129 | builder: (context, _) {
130 | return Center(
131 | child: Column(
132 | mainAxisSize: MainAxisSize.min,
133 | children: [
134 | widget.colorCodeBuilder != null
135 | ? widget.colorCodeBuilder!(context, _color)
136 | : Text(
137 | '#${_color.value.toRadixString(16).substring(2)}',
138 | style: widget.textStyle,
139 | ),
140 | const SizedBox(height: 16),
141 | Container(
142 | width: 64,
143 | height: 64,
144 | decoration: BoxDecoration(
145 | color: _color,
146 | shape: BoxShape.circle,
147 | border: Border.all(
148 | width: 3,
149 | color: HSLColor.fromColor(_color)
150 | .withLightness(
151 | _lightnessController.value * 4 / 5,
152 | )
153 | .toColor(),
154 | ),
155 | ),
156 | ),
157 | const SizedBox(height: 16),
158 | _LightnessSlider(
159 | width: 140,
160 | thumbSize: 26,
161 | hue: _hueController.value,
162 | lightness: _lightnessController.value,
163 | onEnded: _onEnded,
164 | onChanged: (lightness) {
165 | _lightnessController.value = lightness;
166 | },
167 | ),
168 | ],
169 | ),
170 | );
171 | },
172 | );
173 | },
174 | ),
175 | ],
176 | ),
177 | );
178 | }
179 |
180 | @override
181 | void initState() {
182 | super.initState();
183 | _hueController = AnimationController(
184 | vsync: this,
185 | value: widget.initialHue,
186 | lowerBound: 0,
187 | upperBound: 360,
188 | )..addListener(_onColorChanged);
189 | _lightnessController = AnimationController(
190 | vsync: this,
191 | value: widget.initialLightness,
192 | lowerBound: 0,
193 | upperBound: 1,
194 | )..addListener(_onColorChanged);
195 | widget.controller?.addListener(_setColor);
196 | }
197 |
198 | @override
199 | void dispose() {
200 | widget.controller?.removeListener(_setColor);
201 | super.dispose();
202 | }
203 |
204 | void _onColorChanged() {
205 | widget.onChanged?.call(_color);
206 | widget.controller?.color = _color;
207 | }
208 |
209 | void _onEnded() {
210 | widget.onEnded?.call(_color);
211 | }
212 |
213 | void _setColor() {
214 | if (widget.controller != null && widget.controller!.color != _color) {
215 | final hslColor = HSLColor.fromColor(widget.controller!.color);
216 | _hueController.value = hslColor.hue;
217 | _lightnessController.value = hslColor.lightness;
218 | }
219 | }
220 | }
221 |
222 | class _LightnessSlider extends StatefulWidget {
223 | const _LightnessSlider({
224 | Key? key,
225 | required this.hue,
226 | required this.lightness,
227 | required this.width,
228 | required this.onChanged,
229 | required this.onEnded,
230 | required this.thumbSize,
231 | }) : super(key: key);
232 |
233 | final double hue;
234 |
235 | final double lightness;
236 |
237 | final double width;
238 |
239 | final ValueChanged onChanged;
240 |
241 | final VoidCallback onEnded;
242 |
243 | final double thumbSize;
244 |
245 | @override
246 | _LightnessSliderState createState() => _LightnessSliderState();
247 | }
248 |
249 | class _LightnessSliderState extends State<_LightnessSlider>
250 | with TickerProviderStateMixin {
251 | late AnimationController _scaleController;
252 | Timer? _cancelTimer;
253 |
254 | @override
255 | Widget build(BuildContext context) {
256 | return GestureDetector(
257 | onPanDown: _onDown,
258 | onPanCancel: _onCancel,
259 | onHorizontalDragStart: _onStart,
260 | onHorizontalDragUpdate: _onUpdate,
261 | onHorizontalDragEnd: _onEnd,
262 | onVerticalDragStart: _onStart,
263 | onVerticalDragUpdate: _onUpdate,
264 | onVerticalDragEnd: _onEnd,
265 | child: SizedBox(
266 | width: widget.width,
267 | height: widget.thumbSize,
268 | child: Stack(
269 | alignment: Alignment.centerLeft,
270 | children: [
271 | Container(
272 | width: double.infinity,
273 | height: 12,
274 | margin: EdgeInsets.symmetric(
275 | horizontal: widget.thumbSize / 3,
276 | ),
277 | decoration: BoxDecoration(
278 | borderRadius: BorderRadius.all(Radius.circular(6)),
279 | gradient: LinearGradient(
280 | stops: [0, 0.4, 1],
281 | colors: [
282 | HSLColor.fromAHSL(1, widget.hue, 1, 0).toColor(),
283 | HSLColor.fromAHSL(1, widget.hue, 1, 0.5).toColor(),
284 | HSLColor.fromAHSL(1, widget.hue, 1, 0.9).toColor(),
285 | ],
286 | ),
287 | ),
288 | ),
289 | Positioned(
290 | left: widget.lightness * (widget.width - widget.thumbSize),
291 | child: ScaleTransition(
292 | scale: _scaleController,
293 | child: _Thumb(
294 | size: widget.thumbSize,
295 | color: HSLColor.fromAHSL(
296 | 1,
297 | widget.hue,
298 | 1,
299 | widget.lightness,
300 | ).toColor(),
301 | ),
302 | ),
303 | ),
304 | ],
305 | ),
306 | ),
307 | );
308 | }
309 |
310 | @override
311 | void initState() {
312 | super.initState();
313 | _scaleController = AnimationController(
314 | vsync: this,
315 | value: 1,
316 | lowerBound: 0.9,
317 | upperBound: 1,
318 | duration: Duration(milliseconds: 50),
319 | );
320 | }
321 |
322 | void _onDown(DragDownDetails details) {
323 | _scaleController.reverse();
324 | widget.onChanged(details.localPosition.dx / widget.width);
325 | }
326 |
327 | void _onStart(DragStartDetails details) {
328 | _cancelTimer?.cancel();
329 | _cancelTimer = null;
330 | widget.onChanged(details.localPosition.dx / widget.width);
331 | }
332 |
333 | void _onUpdate(DragUpdateDetails details) {
334 | widget.onChanged(details.localPosition.dx / widget.width);
335 | }
336 |
337 | void _onEnd(DragEndDetails details) {
338 | _scaleController.forward();
339 | widget.onEnded();
340 | }
341 |
342 | void _onCancel() {
343 | // ScaleDown Animation cancelled if onDragStart called immediately
344 | _cancelTimer = Timer(
345 | const Duration(milliseconds: 5),
346 | () {
347 | _scaleController.forward();
348 | widget.onEnded();
349 | },
350 | );
351 | }
352 | }
353 |
354 | class _HuePicker extends StatefulWidget {
355 | const _HuePicker({
356 | Key? key,
357 | required this.hue,
358 | required this.onChanged,
359 | required this.onEnded,
360 | required this.size,
361 | required this.strokeWidth,
362 | required this.thumbSize,
363 | }) : super(key: key);
364 |
365 | final double hue;
366 |
367 | final ValueChanged onChanged;
368 |
369 | final VoidCallback onEnded;
370 |
371 | final Size size;
372 |
373 | final double strokeWidth;
374 |
375 | final double thumbSize;
376 |
377 | @override
378 | _HuePickerState createState() => _HuePickerState();
379 | }
380 |
381 | class _HuePickerState extends State<_HuePicker> with TickerProviderStateMixin {
382 | late AnimationController _scaleController;
383 | Timer? _cancelTimer;
384 |
385 | @override
386 | Widget build(BuildContext context) {
387 | final minSize = min(widget.size.width, widget.size.height);
388 | final offset = _CircleTween(
389 | minSize / 2 - widget.thumbSize / 2,
390 | ).lerp(widget.hue * pi / 180);
391 | return GestureDetector(
392 | onPanDown: _onDown,
393 | onPanCancel: _onCancel,
394 | onHorizontalDragStart: _onStart,
395 | onHorizontalDragUpdate: _onUpdate,
396 | onHorizontalDragEnd: _onEnd,
397 | onVerticalDragStart: _onStart,
398 | onVerticalDragUpdate: _onUpdate,
399 | onVerticalDragEnd: _onEnd,
400 | child: SizedBox(
401 | width: widget.size.width,
402 | height: widget.size.height,
403 | child: Stack(
404 | children: [
405 | SizedBox.expand(
406 | child: Padding(
407 | padding: EdgeInsets.all(
408 | widget.thumbSize / 2 - widget.strokeWidth,
409 | ),
410 | child: CustomPaint(
411 | painter: _CirclePickerPainter(widget.strokeWidth),
412 | ),
413 | ),
414 | ),
415 | Positioned(
416 | left: offset.dx,
417 | top: offset.dy,
418 | child: ScaleTransition(
419 | scale: _scaleController,
420 | child: _Thumb(
421 | size: widget.thumbSize,
422 | color: HSLColor.fromAHSL(1, widget.hue, 1, 0.5).toColor(),
423 | ),
424 | ),
425 | ),
426 | ],
427 | ),
428 | ),
429 | );
430 | }
431 |
432 | @override
433 | void initState() {
434 | super.initState();
435 |
436 | _scaleController = AnimationController(
437 | vsync: this,
438 | value: 1,
439 | lowerBound: 0.9,
440 | upperBound: 1,
441 | duration: Duration(milliseconds: 50),
442 | );
443 | }
444 |
445 | void _onDown(DragDownDetails details) {
446 | _scaleController.reverse();
447 | _updatePosition(details.localPosition);
448 | }
449 |
450 | void _onStart(DragStartDetails details) {
451 | _cancelTimer?.cancel();
452 | _cancelTimer = null;
453 | _updatePosition(details.localPosition);
454 | }
455 |
456 | void _onUpdate(DragUpdateDetails details) {
457 | _updatePosition(details.localPosition);
458 | }
459 |
460 | void _onEnd(DragEndDetails details) {
461 | _scaleController.forward();
462 | widget.onEnded();
463 | }
464 |
465 | void _onCancel() {
466 | // ScaleDown Animation cancelled if onDragStart called immediately
467 | _cancelTimer = Timer(
468 | const Duration(milliseconds: 5),
469 | () {
470 | _scaleController.forward();
471 | widget.onEnded();
472 | },
473 | );
474 | }
475 |
476 | void _updatePosition(Offset position) {
477 | final radians = atan2(
478 | position.dy - widget.size.height / 2,
479 | position.dx - widget.size.width / 2,
480 | );
481 | widget.onChanged(radians % (2 * pi) * 180 / pi);
482 | }
483 | }
484 |
485 | class _CircleTween extends Tween {
486 | _CircleTween(this.radius)
487 | : super(
488 | begin: _radiansToOffset(0, radius),
489 | end: _radiansToOffset(2 * pi, radius),
490 | );
491 |
492 | final double radius;
493 |
494 | @override
495 | Offset lerp(double t) => _radiansToOffset(t, radius);
496 |
497 | static Offset _radiansToOffset(double radians, double radius) {
498 | return Offset(
499 | radius + radius * cos(radians),
500 | radius + radius * sin(radians),
501 | );
502 | }
503 | }
504 |
505 | class _CirclePickerPainter extends CustomPainter {
506 | const _CirclePickerPainter(
507 | this.strokeWidth,
508 | );
509 |
510 | final double strokeWidth;
511 |
512 | @override
513 | void paint(Canvas canvas, Size size) {
514 | Offset center = Offset(size.width / 2, size.height / 2);
515 | double radio = min(size.width, size.height) / 2 - strokeWidth;
516 |
517 | const sweepGradient = SweepGradient(
518 | colors: const [
519 | Color.fromARGB(255, 255, 0, 0),
520 | Color.fromARGB(255, 255, 255, 0),
521 | Color.fromARGB(255, 0, 255, 0),
522 | Color.fromARGB(255, 0, 255, 255),
523 | Color.fromARGB(255, 0, 0, 255),
524 | Color.fromARGB(255, 255, 0, 255),
525 | Color.fromARGB(255, 255, 0, 0),
526 | ],
527 | );
528 |
529 | final sweepShader = sweepGradient.createShader(
530 | Rect.fromCircle(center: center, radius: radio),
531 | );
532 |
533 | canvas.drawCircle(
534 | center,
535 | radio,
536 | Paint()
537 | ..style = PaintingStyle.stroke
538 | ..strokeWidth = strokeWidth * 2
539 | ..shader = sweepShader,
540 | );
541 | }
542 |
543 | @override
544 | bool shouldRepaint(CustomPainter oldDelegate) => true;
545 | }
546 |
547 | class _Thumb extends StatelessWidget {
548 | const _Thumb({
549 | Key? key,
550 | required this.size,
551 | required this.color,
552 | }) : super(key: key);
553 |
554 | final double size;
555 |
556 | final Color color;
557 |
558 | @override
559 | Widget build(BuildContext context) {
560 | return Container(
561 | width: size,
562 | height: size,
563 | decoration: BoxDecoration(
564 | shape: BoxShape.circle,
565 | color: Color.fromARGB(255, 255, 255, 255),
566 | boxShadow: [
567 | BoxShadow(
568 | color: Color.fromARGB(16, 0, 0, 0),
569 | blurRadius: 4,
570 | spreadRadius: 4,
571 | )
572 | ],
573 | ),
574 | alignment: Alignment.center,
575 | child: Container(
576 | width: size - 6,
577 | height: size - 6,
578 | decoration: BoxDecoration(
579 | shape: BoxShape.circle,
580 | color: color,
581 | ),
582 | ),
583 | );
584 | }
585 | }
586 |
--------------------------------------------------------------------------------
/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"
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"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0"
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"
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"
70 | meta:
71 | dependency: transitive
72 | description:
73 | name: meta
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "1.3.0"
77 | path:
78 | dependency: transitive
79 | description:
80 | name: path
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.8.0"
84 | sky_engine:
85 | dependency: transitive
86 | description: flutter
87 | source: sdk
88 | version: "0.0.99"
89 | source_span:
90 | dependency: transitive
91 | description:
92 | name: source_span
93 | url: "https://pub.dartlang.org"
94 | source: hosted
95 | version: "1.8.0"
96 | stack_trace:
97 | dependency: transitive
98 | description:
99 | name: stack_trace
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.10.0"
103 | stream_channel:
104 | dependency: transitive
105 | description:
106 | name: stream_channel
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "2.1.0"
110 | string_scanner:
111 | dependency: transitive
112 | description:
113 | name: string_scanner
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "1.1.0"
117 | term_glyph:
118 | dependency: transitive
119 | description:
120 | name: term_glyph
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.2.0"
124 | test_api:
125 | dependency: transitive
126 | description:
127 | name: test_api
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "0.2.19"
131 | typed_data:
132 | dependency: transitive
133 | description:
134 | name: typed_data
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "1.3.0"
138 | vector_math:
139 | dependency: transitive
140 | description:
141 | name: vector_math
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "2.1.0"
145 | sdks:
146 | dart: ">=2.12.0 <3.0.0"
147 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_circle_color_picker
2 | description: A beatiful circle color picker which picks hsl color for flutter.
3 | version: 0.3.0
4 | homepage: https://github.com/itome/flutter_circle_color_picker
5 |
6 | environment:
7 | sdk: '>=2.12.0 <3.0.0'
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 |
13 | dev_dependencies:
14 | flutter_test:
15 | sdk: flutter
16 |
--------------------------------------------------------------------------------