├── .gitignore
├── .idea
├── encodings.xml
├── libraries
│ ├── Dart_SDK.xml
│ ├── Flutter_Plugins.xml
│ └── Flutter_for_Android.xml
├── misc.xml
├── modules.xml
└── runConfigurations
│ └── example_lib_main_dart.xml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── build.gradle
├── gradle.properties
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── postmuseapp
│ └── designer
│ └── palette
│ └── PalettePlugin.java
├── example
├── .gitignore
├── .idea
│ ├── libraries
│ │ ├── Dart_SDK.xml
│ │ └── Flutter_for_Android.xml
│ ├── modules.xml
│ ├── runConfigurations
│ │ └── main_dart.xml
│ └── workspace.xml
├── .metadata
├── README.md
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── postmuseapp
│ │ │ │ └── designer
│ │ │ │ └── paletteexample
│ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ ├── 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
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── 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
├── palette_example.iml
├── palette_example_android.iml
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── PalettePlugin.h
│ ├── PalettePlugin.m
│ └── SwiftPalettePlugin.swift
└── palette.podspec
├── lib
└── palette.dart
├── palette.iml
├── palette_android.iml
└── pubspec.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 | pubspec.lock
7 |
8 | build/
9 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.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_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/example_lib_main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Palette
2 |
3 | Palette implementation for Flutter. It uses native iOS and Android implementations.
4 |
5 | ```
6 | Palette palette = await PaletteLib.getPalette(imageFile.path);
7 | print(palette.vibrant);
8 | ```
9 |
10 | # DEPRECATED - There's something better out there
11 | Use https://pub.dartlang.org/packages/palette_generator instead of this.
12 |
13 | While we still use this implementation in our app and will keep maintaining it for now, the `palette_generator` plugin is really cool and fully written in Dart. We intend to move our own app to use it and consolidate any bug fixing in one good plugin instead of many smaller, not so well maintained plugins. You can still look around this repo if you want to see a decent example for creating an async, computation heavy plugin example for Flutter.
14 |
15 | # Native implementation
16 | - iOS implementation uses: https://github.com/shnhrrsn/ImagePalette
17 | - Android implementation uses Android Support palette-v7 [docs](https://developer.android.com/reference/android/support/v7/graphics/Palette)
18 |
19 | # Known issues
20 | - Library is not published. You can use it by declaring it as a git dependency in your pubspec
21 | - iOS library has not been updated to Swift 4.0 (it uses an old SwiftPriorityQueue version). We manually fixed the few issues reported by xcode on our machines. This is not ideal. There is a [pull request](https://github.com/shnhrrsn/ImagePalette/pull/7) open for that.
22 |
23 | ## Getting Started
24 |
25 | - There is a [small example app](https://github.com/andreidiaconu/FlutterPalette/blob/master/example/lib/main.dart) in this repo.
26 |
27 | ## License
28 |
29 | This repo and library is published under [Apache License 2.0](https://github.com/andreidiaconu/FlutterPalette/blob/master/LICENSE). Feel free to use it.
30 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.postmuseapp.designer.palette'
2 | version '1.0-SNAPSHOT'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 |
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.1.2'
12 | }
13 | }
14 |
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | apply plugin: 'com.android.library'
23 |
24 | android {
25 | compileSdkVersion 27
26 |
27 | defaultConfig {
28 | minSdkVersion 16
29 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30 | }
31 | lintOptions {
32 | disable 'InvalidPackage'
33 | }
34 |
35 | dependencies {
36 | implementation 'com.android.support:palette-v7:27.1.0'
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'palette'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/java/com/postmuseapp/designer/palette/PalettePlugin.java:
--------------------------------------------------------------------------------
1 | package com.postmuseapp.designer.palette;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.BitmapFactory;
5 | import android.os.AsyncTask;
6 | import android.util.Log;
7 | import io.flutter.plugin.common.MethodCall;
8 | import io.flutter.plugin.common.MethodChannel;
9 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
10 | import io.flutter.plugin.common.MethodChannel.Result;
11 | import io.flutter.plugin.common.PluginRegistry.Registrar;
12 | import android.support.v4.content.FileProvider;
13 | import android.support.v7.graphics.Palette;
14 |
15 | import java.util.ArrayList;
16 | import java.util.HashMap;
17 | import java.util.List;
18 | import java.util.Map;
19 |
20 | /**
21 | * PalettePlugin
22 | */
23 | public class PalettePlugin implements MethodCallHandler {
24 |
25 | private static final String PALETTE_CHANNEL = "channel:com.postmuseapp.designer/palette";
26 |
27 | /**
28 | * Plugin registration.
29 | */
30 | public static void registerWith(Registrar registrar) {
31 | final MethodChannel channel = new MethodChannel(registrar.messenger(), PALETTE_CHANNEL);
32 | channel.setMethodCallHandler(new PalettePlugin());
33 | }
34 |
35 | @Override
36 | public void onMethodCall(MethodCall call, Result result) {
37 | if (call.method.equals("getPalette")) {
38 | getPalette(
39 | (String) call.argument("path"),
40 | result);
41 | }
42 | }
43 |
44 | public void getPalette(final String path, final MethodChannel.Result result) {
45 | getPalette(path, result, new Palette.PaletteAsyncListener() {
46 | @Override
47 | public void onGenerated(Palette palette) {
48 | Map paletteMap = new HashMap<>();
49 | paletteMap.put("vibrant", convertSwatch(palette.getVibrantSwatch()));
50 | paletteMap.put("darkVibrant", convertSwatch(palette.getDarkVibrantSwatch()));
51 | paletteMap.put("lightVibrant", convertSwatch(palette.getLightVibrantSwatch()));
52 | paletteMap.put("muted", convertSwatch(palette.getMutedSwatch()));
53 | paletteMap.put("darkMuted", convertSwatch(palette.getDarkMutedSwatch()));
54 | paletteMap.put("lightMuted", convertSwatch(palette.getLightMutedSwatch()));
55 |
56 | List swatches = new ArrayList<>();
57 | for (Palette.Swatch swatch : palette.getSwatches()) {
58 | swatches.add(convertSwatch(swatch));
59 | }
60 | paletteMap.put("swatches", swatches);
61 | result.success(paletteMap);
62 | }
63 | });
64 |
65 | }
66 |
67 | private void getPalette(final String path, final MethodChannel.Result result, final Palette.PaletteAsyncListener onPalette) {
68 | new AsyncTask() {
69 | @Override
70 | protected Palette doInBackground(String... params) {
71 | try {
72 | final BitmapFactory.Options options = new BitmapFactory.Options();
73 | options.inJustDecodeBounds = true;
74 | BitmapFactory.decodeFile(params[0], options);
75 | options.inSampleSize = calculateInSampleSize(options, 200, 200); //112 is the default palette resizes to anyway
76 | options.inJustDecodeBounds = false;
77 | Bitmap bitmap = BitmapFactory.decodeFile(params[0], options);
78 |
79 | if (bitmap == null) {
80 | result.error("bitmap", "Bitmap Null", null);
81 | } else if (bitmap.isRecycled()) {
82 | result.error("bitmap", "Bitmap Recycled", null);
83 | }
84 | return Palette.from(bitmap).generate();
85 | } catch (Exception e) {
86 | result.error("bitmap", "Exception thrown during async generate", null);
87 | Log.e("Palette Plugin", "Exception thrown during async generate", e);
88 | return null;
89 | }
90 | }
91 |
92 | @Override
93 | protected void onPostExecute(Palette palette) {
94 | onPalette.onGenerated(palette);
95 | }
96 | }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, path);
97 | }
98 |
99 | private Map convertSwatch(Palette.Swatch swatch) {
100 | if (swatch == null) {
101 | return null;
102 | }
103 | Map swatchMap = new HashMap<>();
104 | swatchMap.put("color", swatch.getRgb());
105 | swatchMap.put("population", swatch.getPopulation());
106 | swatchMap.put("titleTextColor", swatch.getTitleTextColor());
107 | swatchMap.put("bodyTextColor", swatch.getBodyTextColor());
108 | swatchMap.put("swatchInfo", swatch.toString());
109 | return swatchMap;
110 | }
111 |
112 | public static int calculateInSampleSize(
113 | BitmapFactory.Options options, int reqWidth, int reqHeight) {
114 | // Raw height and width of image
115 | final int height = options.outHeight;
116 | final int width = options.outWidth;
117 | int inSampleSize = 1;
118 |
119 | if (height > reqHeight || width > reqWidth) {
120 |
121 | final int halfHeight = height / 2;
122 | final int halfWidth = width / 2;
123 |
124 | // Calculate the largest inSampleSize value that is a power of 2 and keeps both
125 | // height and width larger than the requested height and width.
126 | while ((halfHeight / inSampleSize) >= reqHeight
127 | && (halfWidth / inSampleSize) >= reqWidth) {
128 | inSampleSize *= 2;
129 | }
130 | }
131 |
132 | return inSampleSize;
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
9 | .flutter-plugins
10 |
--------------------------------------------------------------------------------
/example/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/example/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/.idea/runConfigurations/main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/example/.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 |
--------------------------------------------------------------------------------
/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: 09276bea258737e11b109e227f70eac94a4e1691
8 | channel: master
9 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # palette_example
2 |
3 | Demonstrates how to use the palette plugin.
4 |
5 | ## Getting Started
6 |
7 | For help getting started with Flutter, view our online
8 | [documentation](https://flutter.io/).
9 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.class
3 | .gradle
4 | /local.properties
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 | GeneratedPluginRegistrant.java
11 |
--------------------------------------------------------------------------------
/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 | throw new GradleException("versionCode not found. Define flutter.versionCode in the local.properties file.")
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | throw new GradleException("versionName not found. Define flutter.versionName in the local.properties file.")
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 27
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.postmuseapp.designer.paletteexample"
37 | minSdkVersion 16
38 | targetSdkVersion 27
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61 | }
62 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
19 |
26 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/postmuseapp/designer/paletteexample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.postmuseapp.designer.paletteexample;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.1.2'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/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-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/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 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/app.flx
37 | /Flutter/app.zip
38 | /Flutter/flutter_assets/
39 | /Flutter/App.framework
40 | /Flutter/Flutter.framework
41 | /Flutter/Generated.xcconfig
42 | /ServiceDefinitions.json
43 |
44 | Pods/
45 | .symlinks/
46 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | def parse_KV_file(file, separator='=')
8 | file_abs_path = File.expand_path(file)
9 | if !File.exists? file_abs_path
10 | return [];
11 | end
12 | pods_ary = []
13 | skip_line_start_symbols = ["#", "/"]
14 | File.foreach(file_abs_path) { |line|
15 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
16 | plugin = line.split(pattern=separator)
17 | if plugin.length == 2
18 | podname = plugin[0].strip()
19 | path = plugin[1].strip()
20 | podpath = File.expand_path("#{path}", file_abs_path)
21 | pods_ary.push({:name => podname, :path => podpath});
22 | else
23 | puts "Invalid plugin specification: #{line}"
24 | end
25 | }
26 | return pods_ary
27 | end
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 |
32 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
33 | # referring to absolute paths on developers' machines.
34 | system('rm -rf .symlinks')
35 | system('mkdir -p .symlinks/plugins')
36 |
37 | # Flutter Pods
38 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
39 | if generated_xcode_build_settings.empty?
40 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
41 | end
42 | generated_xcode_build_settings.map { |p|
43 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
44 | symlink = File.join('.symlinks', 'flutter')
45 | File.symlink(File.dirname(p[:path]), symlink)
46 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
47 | end
48 | }
49 |
50 | # Plugin Pods
51 | plugin_pods = parse_KV_file('../.flutter-plugins')
52 | plugin_pods.map { |p|
53 | symlink = File.join('.symlinks', 'plugins', p[:name])
54 | File.symlink(p[:path], symlink)
55 | pod p[:name], :path => File.join(symlink, 'ios')
56 | }
57 | end
58 |
59 | post_install do |installer|
60 | installer.pods_project.targets.each do |target|
61 | target.build_configurations.each do |config|
62 | config.build_settings['ENABLE_BITCODE'] = 'NO'
63 | end
64 | end
65 | end
66 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - image_picker (0.0.1):
4 | - Flutter
5 | - ImagePalette (0.1.0):
6 | - SwiftPriorityQueue (~> 1.1.2)
7 | - palette (0.0.1):
8 | - Flutter
9 | - ImagePalette
10 | - SwiftPriorityQueue (1.1.2)
11 |
12 | DEPENDENCIES:
13 | - Flutter (from `.symlinks/flutter/ios`)
14 | - image_picker (from `.symlinks/plugins/image_picker/ios`)
15 | - palette (from `.symlinks/plugins/palette/ios`)
16 |
17 | SPEC REPOS:
18 | https://github.com/cocoapods/specs.git:
19 | - ImagePalette
20 | - SwiftPriorityQueue
21 |
22 | EXTERNAL SOURCES:
23 | Flutter:
24 | :path: ".symlinks/flutter/ios"
25 | image_picker:
26 | :path: ".symlinks/plugins/image_picker/ios"
27 | palette:
28 | :path: ".symlinks/plugins/palette/ios"
29 |
30 | SPEC CHECKSUMS:
31 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
32 | image_picker: ee00aab0487cedc80a304085219503cc6d0f2e22
33 | ImagePalette: f8e497636f8c2db4f5ff04a1372ce6b8a3fbb06a
34 | palette: cb1761e63922656df84a2702f809e82969e7974e
35 | SwiftPriorityQueue: bafec150153c600a6b9f97b42abe25538745fadb
36 |
37 | PODFILE CHECKSUM: 7765ea4305eaab0b3dfd384c7de11902aa3195fd
38 |
39 | COCOAPODS: 1.5.3
40 |
--------------------------------------------------------------------------------
/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 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
19 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
23 | 9C386643CC2BAF33A684A58C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72A738A919701E3270F4DEAE /* Pods_Runner.framework */; };
24 | /* End PBXBuildFile section */
25 |
26 | /* Begin PBXCopyFilesBuildPhase section */
27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
28 | isa = PBXCopyFilesBuildPhase;
29 | buildActionMask = 2147483647;
30 | dstPath = "";
31 | dstSubfolderSpec = 10;
32 | files = (
33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
35 | );
36 | name = "Embed Frameworks";
37 | runOnlyForDeploymentPostprocessing = 0;
38 | };
39 | /* End PBXCopyFilesBuildPhase section */
40 |
41 | /* Begin PBXFileReference section */
42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
47 | 72A738A919701E3270F4DEAE /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
49 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
50 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
53 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
54 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
59 | /* End PBXFileReference section */
60 |
61 | /* Begin PBXFrameworksBuildPhase section */
62 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
68 | 9C386643CC2BAF33A684A58C /* Pods_Runner.framework in Frameworks */,
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | /* End PBXFrameworksBuildPhase section */
73 |
74 | /* Begin PBXGroup section */
75 | 1ACDA8814C3D95C6E208416F /* Pods */ = {
76 | isa = PBXGroup;
77 | children = (
78 | );
79 | name = Pods;
80 | sourceTree = "";
81 | };
82 | 6F5201F3170D2B6321048B27 /* Frameworks */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 72A738A919701E3270F4DEAE /* Pods_Runner.framework */,
86 | );
87 | name = Frameworks;
88 | sourceTree = "";
89 | };
90 | 9740EEB11CF90186004384FC /* Flutter */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
94 | 3B80C3931E831B6300D905FE /* App.framework */,
95 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
96 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
97 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
98 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
99 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
100 | );
101 | name = Flutter;
102 | sourceTree = "";
103 | };
104 | 97C146E51CF9000F007C117D = {
105 | isa = PBXGroup;
106 | children = (
107 | 9740EEB11CF90186004384FC /* Flutter */,
108 | 97C146F01CF9000F007C117D /* Runner */,
109 | 97C146EF1CF9000F007C117D /* Products */,
110 | 1ACDA8814C3D95C6E208416F /* Pods */,
111 | 6F5201F3170D2B6321048B27 /* Frameworks */,
112 | );
113 | sourceTree = "";
114 | };
115 | 97C146EF1CF9000F007C117D /* Products */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 97C146EE1CF9000F007C117D /* Runner.app */,
119 | );
120 | name = Products;
121 | sourceTree = "";
122 | };
123 | 97C146F01CF9000F007C117D /* Runner */ = {
124 | isa = PBXGroup;
125 | children = (
126 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
127 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
128 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
129 | 97C147021CF9000F007C117D /* Info.plist */,
130 | 97C146F11CF9000F007C117D /* Supporting Files */,
131 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
132 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
133 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
134 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
135 | );
136 | path = Runner;
137 | sourceTree = "";
138 | };
139 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
140 | isa = PBXGroup;
141 | children = (
142 | );
143 | name = "Supporting Files";
144 | sourceTree = "";
145 | };
146 | /* End PBXGroup section */
147 |
148 | /* Begin PBXNativeTarget section */
149 | 97C146ED1CF9000F007C117D /* Runner */ = {
150 | isa = PBXNativeTarget;
151 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
152 | buildPhases = (
153 | B1475D9AF9443E9BBE2E92FF /* [CP] Check Pods Manifest.lock */,
154 | 9740EEB61CF901F6004384FC /* Run Script */,
155 | 97C146EA1CF9000F007C117D /* Sources */,
156 | 97C146EB1CF9000F007C117D /* Frameworks */,
157 | 97C146EC1CF9000F007C117D /* Resources */,
158 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
159 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
160 | DED2F33AC63E4419F5791DD1 /* [CP] Embed Pods Frameworks */,
161 | );
162 | buildRules = (
163 | );
164 | dependencies = (
165 | );
166 | name = Runner;
167 | productName = Runner;
168 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
169 | productType = "com.apple.product-type.application";
170 | };
171 | /* End PBXNativeTarget section */
172 |
173 | /* Begin PBXProject section */
174 | 97C146E61CF9000F007C117D /* Project object */ = {
175 | isa = PBXProject;
176 | attributes = {
177 | LastUpgradeCheck = 0910;
178 | ORGANIZATIONNAME = "The Chromium Authors";
179 | TargetAttributes = {
180 | 97C146ED1CF9000F007C117D = {
181 | CreatedOnToolsVersion = 7.3.1;
182 | LastSwiftMigration = 0910;
183 | };
184 | };
185 | };
186 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
187 | compatibilityVersion = "Xcode 3.2";
188 | developmentRegion = English;
189 | hasScannedForEncodings = 0;
190 | knownRegions = (
191 | en,
192 | Base,
193 | );
194 | mainGroup = 97C146E51CF9000F007C117D;
195 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
196 | projectDirPath = "";
197 | projectRoot = "";
198 | targets = (
199 | 97C146ED1CF9000F007C117D /* Runner */,
200 | );
201 | };
202 | /* End PBXProject section */
203 |
204 | /* Begin PBXResourcesBuildPhase section */
205 | 97C146EC1CF9000F007C117D /* Resources */ = {
206 | isa = PBXResourcesBuildPhase;
207 | buildActionMask = 2147483647;
208 | files = (
209 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
210 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
211 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
212 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
213 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
214 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
215 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
216 | );
217 | runOnlyForDeploymentPostprocessing = 0;
218 | };
219 | /* End PBXResourcesBuildPhase section */
220 |
221 | /* Begin PBXShellScriptBuildPhase section */
222 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
223 | isa = PBXShellScriptBuildPhase;
224 | buildActionMask = 2147483647;
225 | files = (
226 | );
227 | inputPaths = (
228 | );
229 | name = "Thin Binary";
230 | outputPaths = (
231 | );
232 | runOnlyForDeploymentPostprocessing = 0;
233 | shellPath = /bin/sh;
234 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
235 | };
236 | 9740EEB61CF901F6004384FC /* Run Script */ = {
237 | isa = PBXShellScriptBuildPhase;
238 | buildActionMask = 2147483647;
239 | files = (
240 | );
241 | inputPaths = (
242 | );
243 | name = "Run Script";
244 | outputPaths = (
245 | );
246 | runOnlyForDeploymentPostprocessing = 0;
247 | shellPath = /bin/sh;
248 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
249 | };
250 | B1475D9AF9443E9BBE2E92FF /* [CP] Check Pods Manifest.lock */ = {
251 | isa = PBXShellScriptBuildPhase;
252 | buildActionMask = 2147483647;
253 | files = (
254 | );
255 | inputPaths = (
256 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
257 | "${PODS_ROOT}/Manifest.lock",
258 | );
259 | name = "[CP] Check Pods Manifest.lock";
260 | outputPaths = (
261 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
262 | );
263 | runOnlyForDeploymentPostprocessing = 0;
264 | shellPath = /bin/sh;
265 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
266 | showEnvVarsInLog = 0;
267 | };
268 | DED2F33AC63E4419F5791DD1 /* [CP] Embed Pods Frameworks */ = {
269 | isa = PBXShellScriptBuildPhase;
270 | buildActionMask = 2147483647;
271 | files = (
272 | );
273 | inputPaths = (
274 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
275 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
276 | "${BUILT_PRODUCTS_DIR}/ImagePalette/ImagePalette.framework",
277 | "${BUILT_PRODUCTS_DIR}/SwiftPriorityQueue/SwiftPriorityQueue.framework",
278 | "${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
279 | "${BUILT_PRODUCTS_DIR}/palette/palette.framework",
280 | );
281 | name = "[CP] Embed Pods Frameworks";
282 | outputPaths = (
283 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
284 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ImagePalette.framework",
285 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftPriorityQueue.framework",
286 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
287 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/palette.framework",
288 | );
289 | runOnlyForDeploymentPostprocessing = 0;
290 | shellPath = /bin/sh;
291 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
292 | showEnvVarsInLog = 0;
293 | };
294 | /* End PBXShellScriptBuildPhase section */
295 |
296 | /* Begin PBXSourcesBuildPhase section */
297 | 97C146EA1CF9000F007C117D /* Sources */ = {
298 | isa = PBXSourcesBuildPhase;
299 | buildActionMask = 2147483647;
300 | files = (
301 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
302 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
303 | );
304 | runOnlyForDeploymentPostprocessing = 0;
305 | };
306 | /* End PBXSourcesBuildPhase section */
307 |
308 | /* Begin PBXVariantGroup section */
309 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
310 | isa = PBXVariantGroup;
311 | children = (
312 | 97C146FB1CF9000F007C117D /* Base */,
313 | );
314 | name = Main.storyboard;
315 | sourceTree = "";
316 | };
317 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
318 | isa = PBXVariantGroup;
319 | children = (
320 | 97C147001CF9000F007C117D /* Base */,
321 | );
322 | name = LaunchScreen.storyboard;
323 | sourceTree = "";
324 | };
325 | /* End PBXVariantGroup section */
326 |
327 | /* Begin XCBuildConfiguration section */
328 | 97C147031CF9000F007C117D /* Debug */ = {
329 | isa = XCBuildConfiguration;
330 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
331 | buildSettings = {
332 | ALWAYS_SEARCH_USER_PATHS = NO;
333 | CLANG_ANALYZER_NONNULL = YES;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
339 | CLANG_WARN_BOOL_CONVERSION = YES;
340 | CLANG_WARN_COMMA = YES;
341 | CLANG_WARN_CONSTANT_CONVERSION = YES;
342 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
343 | CLANG_WARN_EMPTY_BODY = YES;
344 | CLANG_WARN_ENUM_CONVERSION = YES;
345 | CLANG_WARN_INFINITE_RECURSION = YES;
346 | CLANG_WARN_INT_CONVERSION = YES;
347 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
348 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
349 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
350 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
351 | CLANG_WARN_STRICT_PROTOTYPES = YES;
352 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
353 | CLANG_WARN_UNREACHABLE_CODE = YES;
354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
355 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
356 | COPY_PHASE_STRIP = NO;
357 | DEBUG_INFORMATION_FORMAT = dwarf;
358 | ENABLE_STRICT_OBJC_MSGSEND = YES;
359 | ENABLE_TESTABILITY = YES;
360 | GCC_C_LANGUAGE_STANDARD = gnu99;
361 | GCC_DYNAMIC_NO_PIC = NO;
362 | GCC_NO_COMMON_BLOCKS = YES;
363 | GCC_OPTIMIZATION_LEVEL = 0;
364 | GCC_PREPROCESSOR_DEFINITIONS = (
365 | "DEBUG=1",
366 | "$(inherited)",
367 | );
368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
370 | GCC_WARN_UNDECLARED_SELECTOR = YES;
371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
372 | GCC_WARN_UNUSED_FUNCTION = YES;
373 | GCC_WARN_UNUSED_VARIABLE = YES;
374 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
375 | MTL_ENABLE_DEBUG_INFO = YES;
376 | ONLY_ACTIVE_ARCH = YES;
377 | SDKROOT = iphoneos;
378 | TARGETED_DEVICE_FAMILY = "1,2";
379 | };
380 | name = Debug;
381 | };
382 | 97C147041CF9000F007C117D /* Release */ = {
383 | isa = XCBuildConfiguration;
384 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
385 | buildSettings = {
386 | ALWAYS_SEARCH_USER_PATHS = NO;
387 | CLANG_ANALYZER_NONNULL = YES;
388 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
389 | CLANG_CXX_LIBRARY = "libc++";
390 | CLANG_ENABLE_MODULES = YES;
391 | CLANG_ENABLE_OBJC_ARC = YES;
392 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
393 | CLANG_WARN_BOOL_CONVERSION = YES;
394 | CLANG_WARN_COMMA = YES;
395 | CLANG_WARN_CONSTANT_CONVERSION = YES;
396 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
397 | CLANG_WARN_EMPTY_BODY = YES;
398 | CLANG_WARN_ENUM_CONVERSION = YES;
399 | CLANG_WARN_INFINITE_RECURSION = YES;
400 | CLANG_WARN_INT_CONVERSION = YES;
401 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
402 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
403 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
404 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
405 | CLANG_WARN_STRICT_PROTOTYPES = YES;
406 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
407 | CLANG_WARN_UNREACHABLE_CODE = YES;
408 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
409 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
410 | COPY_PHASE_STRIP = NO;
411 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
412 | ENABLE_NS_ASSERTIONS = NO;
413 | ENABLE_STRICT_OBJC_MSGSEND = YES;
414 | GCC_C_LANGUAGE_STANDARD = gnu99;
415 | GCC_NO_COMMON_BLOCKS = YES;
416 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
417 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
418 | GCC_WARN_UNDECLARED_SELECTOR = YES;
419 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
420 | GCC_WARN_UNUSED_FUNCTION = YES;
421 | GCC_WARN_UNUSED_VARIABLE = YES;
422 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
423 | MTL_ENABLE_DEBUG_INFO = NO;
424 | SDKROOT = iphoneos;
425 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
426 | TARGETED_DEVICE_FAMILY = "1,2";
427 | VALIDATE_PRODUCT = YES;
428 | };
429 | name = Release;
430 | };
431 | 97C147061CF9000F007C117D /* Debug */ = {
432 | isa = XCBuildConfiguration;
433 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
434 | buildSettings = {
435 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
436 | CLANG_ENABLE_MODULES = YES;
437 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
438 | ENABLE_BITCODE = NO;
439 | FRAMEWORK_SEARCH_PATHS = (
440 | "$(inherited)",
441 | "$(PROJECT_DIR)/Flutter",
442 | );
443 | INFOPLIST_FILE = Runner/Info.plist;
444 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
445 | LIBRARY_SEARCH_PATHS = (
446 | "$(inherited)",
447 | "$(PROJECT_DIR)/Flutter",
448 | );
449 | PRODUCT_BUNDLE_IDENTIFIER = com.postmuseapp.designer.paletteExample;
450 | PRODUCT_NAME = "$(TARGET_NAME)";
451 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
452 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
453 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
454 | SWIFT_VERSION = 4.0;
455 | VERSIONING_SYSTEM = "apple-generic";
456 | };
457 | name = Debug;
458 | };
459 | 97C147071CF9000F007C117D /* Release */ = {
460 | isa = XCBuildConfiguration;
461 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
462 | buildSettings = {
463 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
464 | CLANG_ENABLE_MODULES = YES;
465 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
466 | ENABLE_BITCODE = NO;
467 | FRAMEWORK_SEARCH_PATHS = (
468 | "$(inherited)",
469 | "$(PROJECT_DIR)/Flutter",
470 | );
471 | INFOPLIST_FILE = Runner/Info.plist;
472 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
473 | LIBRARY_SEARCH_PATHS = (
474 | "$(inherited)",
475 | "$(PROJECT_DIR)/Flutter",
476 | );
477 | PRODUCT_BUNDLE_IDENTIFIER = com.postmuseapp.designer.paletteExample;
478 | PRODUCT_NAME = "$(TARGET_NAME)";
479 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
480 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
481 | SWIFT_VERSION = 4.0;
482 | VERSIONING_SYSTEM = "apple-generic";
483 | };
484 | name = Release;
485 | };
486 | /* End XCBuildConfiguration section */
487 |
488 | /* Begin XCConfigurationList section */
489 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
490 | isa = XCConfigurationList;
491 | buildConfigurations = (
492 | 97C147031CF9000F007C117D /* Debug */,
493 | 97C147041CF9000F007C117D /* Release */,
494 | );
495 | defaultConfigurationIsVisible = 0;
496 | defaultConfigurationName = Release;
497 | };
498 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
499 | isa = XCConfigurationList;
500 | buildConfigurations = (
501 | 97C147061CF9000F007C117D /* Debug */,
502 | 97C147071CF9000F007C117D /* Release */,
503 | );
504 | defaultConfigurationIsVisible = 0;
505 | defaultConfigurationName = Release;
506 | };
507 | /* End XCConfigurationList section */
508 | };
509 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
510 | }
511 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
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: [UIApplicationLaunchOptionsKey: 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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/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 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | palette_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 'dart:io';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'dart:async';
5 |
6 | import 'package:flutter/services.dart';
7 | import 'package:image_picker/image_picker.dart';
8 | import 'package:palette/palette.dart';
9 |
10 | void main() => runApp(new MyApp());
11 |
12 | class MyApp extends StatefulWidget {
13 | @override
14 | _MyAppState createState() => new _MyAppState();
15 | }
16 |
17 | class _MyAppState extends State {
18 | String _infoToShow = 'Unknown';
19 |
20 | @override
21 | void initState() {
22 | super.initState();
23 | getImageAndPalette();
24 | }
25 |
26 | // Platform messages are asynchronous, so we initialize in an async method.
27 | Future getImageAndPalette() async {
28 | File imageFile = await ImagePicker.pickImage(source: ImageSource.gallery);
29 | Palette palette = await PaletteLib.getPalette(imageFile.path);
30 | print(palette.vibrant);
31 |
32 | // If the widget was removed from the tree while the asynchronous platform
33 | // message was in flight, we want to discard the reply rather than calling
34 | // setState to update our non-existent appearance.
35 | if (!mounted) return;
36 |
37 | setState(() {
38 | _infoToShow = palette.toString();
39 | });
40 | }
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return new MaterialApp(
45 | home: new Scaffold(
46 | appBar: new AppBar(
47 | title: const Text('Palette Plugin example app'),
48 | ),
49 | body: new Center(
50 | child: new Text('Palette: $_infoToShow\n'),
51 | ),
52 | ),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/example/palette_example.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example/palette_example_android.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: palette_example
2 | description: Demonstrates how to use the palette plugin.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # Read more about versioning at semver.org.
10 | version: 1.0.0+1
11 |
12 | dependencies:
13 | flutter:
14 | sdk: flutter
15 |
16 | # The following adds the Cupertino Icons font to your application.
17 | # Use with the CupertinoIcons class for iOS style icons.
18 | cupertino_icons: ^0.1.2
19 | image_picker: ^0.4.1
20 |
21 | dev_dependencies:
22 | flutter_test:
23 | sdk: flutter
24 |
25 | palette:
26 | path: ../
27 |
28 | # For information on the generic Dart part of this file, see the
29 | # following page: https://www.dartlang.org/tools/pub/pubspec
30 |
31 | # The following section is specific to Flutter.
32 | flutter:
33 |
34 | # The following line ensures that the Material Icons font is
35 | # included with your application, so that you can use the icons in
36 | # the material Icons class.
37 | uses-material-design: true
38 |
39 | # To add assets to your application, add an assets section, like this:
40 | # assets:
41 | # - images/a_dot_burr.jpeg
42 | # - images/a_dot_ham.jpeg
43 |
44 | # An image asset can refer to one or more resolution-specific "variants", see
45 | # https://flutter.io/assets-and-images/#resolution-aware.
46 |
47 | # For details regarding adding assets from package dependencies, see
48 | # https://flutter.io/assets-and-images/#from-packages
49 |
50 | # To add custom fonts to your application, add a fonts section here,
51 | # in this "flutter" section. Each entry in this list should have a
52 | # "family" key with the font family name, and a "fonts" key with a
53 | # list giving the asset and other descriptors for the font. For
54 | # example:
55 | # fonts:
56 | # - family: Schyler
57 | # fonts:
58 | # - asset: fonts/Schyler-Regular.ttf
59 | # - asset: fonts/Schyler-Italic.ttf
60 | # style: italic
61 | # - family: Trajan Pro
62 | # fonts:
63 | # - asset: fonts/TrajanPro.ttf
64 | # - asset: fonts/TrajanPro_Bold.ttf
65 | # weight: 700
66 | #
67 | # For details regarding fonts from package dependencies,
68 | # see https://flutter.io/custom-fonts/#from-packages
69 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties
5 | // are correct.
6 |
7 | import 'package:flutter/material.dart';
8 | import 'package:flutter_test/flutter_test.dart';
9 |
10 | import 'package:palette_example/main.dart';
11 |
12 | void main() {
13 | testWidgets('Verify Platform version', (WidgetTester tester) async {
14 | // Build our app and trigger a frame.
15 | await tester.pumpWidget(new MyApp());
16 |
17 | // Verify that platform version is retrieved.
18 | expect(
19 | find.byWidgetPredicate(
20 | (Widget widget) =>
21 | widget is Text && widget.data.startsWith('Running on:'),
22 | ),
23 | findsOneWidget);
24 | });
25 | }
26 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 |
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreidiaconu/FlutterPalette/8bb5edc6b62a1e152555d5cd7fc600126ecd99d0/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/PalettePlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface PalettePlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/ios/Classes/PalettePlugin.m:
--------------------------------------------------------------------------------
1 | #import "PalettePlugin.h"
2 | #import
3 |
4 | @implementation PalettePlugin
5 | + (void)registerWithRegistrar:(NSObject*)registrar {
6 | [SwiftPalettePlugin registerWithRegistrar:registrar];
7 | }
8 | @end
9 |
--------------------------------------------------------------------------------
/ios/Classes/SwiftPalettePlugin.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import ImagePalette
4 |
5 | let PALETTE_CHANNEL = "channel:com.postmuseapp.designer/palette";
6 |
7 | public class SwiftPalettePlugin: NSObject, FlutterPlugin {
8 | public static func register(with registrar: FlutterPluginRegistrar) {
9 | let channel = FlutterMethodChannel(name: PALETTE_CHANNEL, binaryMessenger: registrar.messenger())
10 | let instance = SwiftPalettePlugin()
11 | registrar.addMethodCallDelegate(instance, channel: channel)
12 | }
13 |
14 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
15 | let arguments = call.arguments as! Dictionary
16 | let path = arguments["path"] as! String
17 | if ("getPalette" == call.method){
18 | self.getPalette(path: path, result:result)
19 | }
20 | }
21 |
22 | func getPalette(path:String, result:@escaping FlutterResult){
23 | getPalette(path: path, result: result, onPalette: {palette in
24 | result(self.convertPalette(palette: palette))
25 | })
26 | }
27 |
28 | func getPalette(path:String, result:FlutterResult, onPalette:@escaping (Palette)->Void){
29 | do {
30 | let imageUrl = URL.init(fileURLWithPath: path)
31 | let imageData = try Data.init(contentsOf: imageUrl)
32 | let image = UIImage.init(data: imageData)!
33 | Palette.generateWith(configuration: PaletteConfiguration(image: image)) {palette in
34 | onPalette(palette)
35 | }
36 | } catch {
37 | print(error)
38 | result(error)
39 | }
40 | }
41 |
42 | func convertPalette(palette: Palette) -> Dictionary {
43 | var paletteMap = Dictionary()
44 | paletteMap["vibrant"] = convertSwatch(swatch:palette.vibrantSwatch)
45 | paletteMap["darkVibrant"] = convertSwatch(swatch:palette.darkVibrantSwatch)
46 | paletteMap["lightVibrant"] = convertSwatch(swatch:palette.lightVibrantSwatch)
47 | paletteMap["muted"] = convertSwatch(swatch:palette.mutedSwatch)
48 | paletteMap["darkMuted"] = convertSwatch(swatch:palette.darkMutedSwatch)
49 | paletteMap["lightMuted"] = convertSwatch(swatch:palette.lightMutedSwatch)
50 | paletteMap["swatches"] = palette.swatches.map{convertSwatch(swatch: $0)}
51 | return paletteMap;
52 | }
53 |
54 | func convertSwatch(swatch: PaletteSwatch?) -> Dictionary? {
55 | if (swatch != nil){
56 | let swatch = swatch!
57 | var swatchMap = Dictionary()
58 | swatchMap["color"] = colorToARGB(color: swatch.color)
59 | swatchMap["population"] = swatch.population
60 | swatchMap["titleTextColor"] = colorToARGB(color: swatch.titleTextColor)
61 | swatchMap["bodyTextColor"] = colorToARGB(color: swatch.bodyTextColor)
62 | swatchMap["swatchInfo"] = swatch.debugDescription
63 | return swatchMap;
64 | } else {
65 | return nil
66 | }
67 | }
68 |
69 | func colorToARGB(color: UIColor?) -> Int?{
70 | if (color == nil){
71 | return nil
72 | }
73 | var red: CGFloat = 0.0
74 | var green: CGFloat = 0.0
75 | var blue: CGFloat = 0.0
76 | var alpha: CGFloat = 0.0
77 | color!.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
78 |
79 | let r = Int(round(red * 255.0))
80 | let g = Int(round(green * 255.0))
81 | let b = Int(round(blue * 255.0))
82 | let a = Int(round(alpha * 255.0))
83 |
84 | return (a << 24) | (r << 16) | (g << 8) | b
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/ios/palette.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3 | #
4 | Pod::Spec.new do |s|
5 | s.name = 'palette'
6 | s.version = '0.0.1'
7 | s.summary = 'Palette implementation for Flutter. It uses native iOS and Android implementations'
8 | s.description = <<-DESC
9 | Palette implementation for Flutter. It uses native iOS and Android implementations
10 | DESC
11 | s.homepage = 'https://postmuseapp.com'
12 | s.license = { :file => '../LICENSE' }
13 | s.author = { 'Andrei from PostMuse' => 'noreply@postmuseapp.com' }
14 | s.source = { :path => '.' }
15 | s.source_files = 'Classes/**/*'
16 | s.public_header_files = 'Classes/**/*.h'
17 | s.dependency 'Flutter'
18 | s.dependency 'ImagePalette'
19 |
20 | s.ios.deployment_target = '8.0'
21 | end
22 |
23 |
--------------------------------------------------------------------------------
/lib/palette.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:ui';
3 |
4 | import 'package:flutter/services.dart';
5 |
6 | class PaletteLib {
7 | static const MethodChannel _channel =
8 | const MethodChannel('channel:com.postmuseapp.designer/palette');
9 |
10 | static Future getPalette(String path) async {
11 | Map result = await _channel.invokeMethod('getPalette', {'path' : path});
12 | return Palette.fromJson(result);
13 | }
14 | }
15 |
16 | class Palette{
17 | final PaletteSwatch vibrant, darkVibrant, lightVibrant, muted, darkMuted, lightMuted;
18 | final List swatches;
19 |
20 | Palette.fromJson(Map map):
21 | vibrant = map['vibrant'] == null ? null : new PaletteSwatch.fromJson(map['vibrant']),
22 | darkVibrant = map['darkVibrant'] == null ? null : new PaletteSwatch.fromJson(map['darkVibrant']),
23 | lightVibrant = map['lightVibrant'] == null ? null : new PaletteSwatch.fromJson(map['lightVibrant']),
24 | muted = map['muted'] == null ? null : new PaletteSwatch.fromJson(map['muted']),
25 | darkMuted = map['darkMuted'] == null ? null : new PaletteSwatch.fromJson(map['darkMuted']),
26 | lightMuted = map['lightMuted'] == null ? null : new PaletteSwatch.fromJson(map['lightMuted']),
27 | swatches = map['swatches'] == null
28 | ? null
29 | : (map['swatches'] as List)
30 | .map((json)=>new PaletteSwatch.fromJson(json)).toList(growable: false);
31 |
32 | Map toJson() => {
33 | "vibrant": vibrant == null ? null : vibrant.toJson(),
34 | "darkVibrant": darkVibrant == null ? null : darkVibrant.toJson(),
35 | "lightVibrant": lightVibrant == null ? null : lightVibrant.toJson(),
36 | "muted": muted == null ? null : muted.toJson(),
37 | "darkMuted": darkMuted == null ? null : darkMuted.toJson(),
38 | "lightMuted": lightMuted == null ? null : lightMuted.toJson(),
39 | "swatches": swatches == null ? null : swatches.map((swatch)=>swatch.toJson()).toList(growable: false),
40 | };
41 |
42 | @override
43 | String toString() {
44 | return 'Palette{\n'
45 | ' vibrant: $vibrant, \n'
46 | ' darkVibrant: $darkVibrant, \n'
47 | ' lightVibrant: $lightVibrant, \n'
48 | ' muted: $muted, \n'
49 | ' darkMuted: $darkMuted, \n'
50 | ' lightMuted: $lightMuted\n'
51 | ' swatches(${swatches.length}): $swatches\n'
52 | '}';
53 | }
54 | }
55 |
56 | class PaletteSwatch{
57 | final Color color, titleTextColor, bodyTextColor;
58 | final int population;
59 |
60 | const PaletteSwatch({this.color, this.titleTextColor, this.bodyTextColor, this.population});
61 |
62 | PaletteSwatch.fromJson(Map map):
63 | color = map['color']==null ? null : new Color(map['color']),
64 | titleTextColor = map['titleTextColor']==null ? null : new Color(map['titleTextColor']),
65 | bodyTextColor = map['bodyTextColor']==null ? null : new Color(map['bodyTextColor']),
66 | population = map['population'];
67 |
68 | Map toJson() => {
69 | "color": color==null ? null : color.value,
70 | "titleTextColor": titleTextColor==null ? null : titleTextColor.value,
71 | "bodyTextColor": bodyTextColor==null ? null : bodyTextColor.value,
72 | "population": population,
73 | };
74 |
75 | @override
76 | String toString() {
77 | return 'PaletteSwatch{color: $color, titleTextColor: $titleTextColor, bodyTextColor: $bodyTextColor, population: $population}';
78 | }
79 |
80 | }
--------------------------------------------------------------------------------
/palette.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/palette_android.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: palette
2 | description: Palette implementation for Flutter. It uses native iOS and Android implementations
3 | version: 0.0.1
4 | author:
5 | homepage:
6 |
7 | dependencies:
8 | flutter:
9 | sdk: flutter
10 |
11 | # For information on the generic Dart part of this file, see the
12 | # following page: https://www.dartlang.org/tools/pub/pubspec
13 |
14 | # The following section is specific to Flutter.
15 | flutter:
16 | plugin:
17 | androidPackage: com.postmuseapp.designer.palette
18 | pluginClass: PalettePlugin
19 |
20 | # To add assets to your plugin package, add an assets section, like this:
21 | # assets:
22 | # - images/a_dot_burr.jpeg
23 | # - images/a_dot_ham.jpeg
24 | #
25 | # For details regarding assets in packages, see
26 | # https://flutter.io/assets-and-images/#from-packages
27 | #
28 | # An image asset can refer to one or more resolution-specific "variants", see
29 | # https://flutter.io/assets-and-images/#resolution-aware.
30 |
31 | # To add custom fonts to your plugin package, add a fonts section here,
32 | # in this "flutter" section. Each entry in this list should have a
33 | # "family" key with the font family name, and a "fonts" key with a
34 | # list giving the asset and other descriptors for the font. For
35 | # example:
36 | # fonts:
37 | # - family: Schyler
38 | # fonts:
39 | # - asset: fonts/Schyler-Regular.ttf
40 | # - asset: fonts/Schyler-Italic.ttf
41 | # style: italic
42 | # - family: Trajan Pro
43 | # fonts:
44 | # - asset: fonts/TrajanPro.ttf
45 | # - asset: fonts/TrajanPro_Bold.ttf
46 | # weight: 700
47 | #
48 | # For details regarding fonts in packages, see
49 | # https://flutter.io/custom-fonts/#from-packages
50 |
--------------------------------------------------------------------------------