├── .github
└── workflows
│ ├── main.yml
│ └── publish.yaml
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── build.gradle
├── settings.gradle
└── src
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── octmon
│ │ └── flutter_des
│ │ └── FlutterDesPlugin.java
│ └── test
│ └── java
│ └── com
│ └── octmon
│ └── flutter_des
│ └── FlutterDesPluginTest.java
├── example
├── .gitignore
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── octmon
│ │ │ │ └── flutter_des_example
│ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ └── ic_launcher.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── icons
│ └── icon.png
├── integration_test
│ └── plugin_integration_test.dart
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-50x50@1x.png
│ │ │ │ ├── Icon-App-50x50@2x.png
│ │ │ │ ├── Icon-App-57x57@1x.png
│ │ │ │ ├── Icon-App-57x57@2x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-72x72@1x.png
│ │ │ │ ├── Icon-App-72x72@2x.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
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── lib
│ └── main.dart
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ │ └── MainMenu.xib
│ │ ├── Configs
│ │ │ ├── AppInfo.xcconfig
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ └── FlutterDesPlugin.swift
├── Resources
│ └── PrivacyInfo.xcprivacy
└── flutter_des.podspec
├── lib
├── flutter_des.dart
├── flutter_des_method_channel.dart
└── flutter_des_platform_interface.dart
├── macos
├── Classes
│ └── FlutterDesPlugin.swift
└── flutter_des.podspec
├── pubspec.lock
├── pubspec.yaml
└── test
├── flutter_des_method_channel_test.dart
└── flutter_des_test.dart
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: build
2 |
3 | on:
4 | push:
5 | branches: [ main, f-ci-action ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | jobs:
10 | build:
11 | name: build on ${{ matrix.os }}
12 | runs-on: ${{ matrix.os }}
13 | strategy:
14 | matrix:
15 | os: [macos-latest]
16 |
17 | steps:
18 | - uses: actions/checkout@v3
19 | - uses: actions/setup-java@v3
20 | with:
21 | distribution: 'adopt'
22 | java-version: '17.x'
23 | - uses: subosito/flutter-action@v2
24 | with:
25 | channel: 'stable'
26 | - run: dart --version
27 | - run: flutter --version
28 | - name: build flutter_des
29 | working-directory: example
30 | run: |
31 | flutter build apk --target-platform android-arm64
32 | flutter build ios --release --no-codesign
33 | flutter build macos --release
34 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yaml:
--------------------------------------------------------------------------------
1 | name: Publish to pub.dev
2 |
3 | on:
4 | push:
5 | tags:
6 | - 'v[0-9]+.[0-9]+.[0-9]+*'
7 |
8 | jobs:
9 | publish:
10 | permissions:
11 | id-token: write # Required for authentication using OIDC
12 | uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
13 | # with:
14 | # working-directory: path/to/package/within/repository
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | **/doc/api/
27 | .dart_tool/
28 | build/
29 |
--------------------------------------------------------------------------------
/.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: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668"
8 | channel: "stable"
9 |
10 | project_type: plugin
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
17 | base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
18 | - platform: android
19 | create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
20 | base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
21 | - platform: ios
22 | create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
23 | base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
24 | - platform: macos
25 | create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
26 | base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
27 |
28 | # User provided section
29 |
30 | # List of Local paths (relative to this file) that should be
31 | # ignored by the migrate tool.
32 | #
33 | # Files that are not part of the templates will be ignored by default.
34 | unmanaged_files:
35 | - 'lib/main.dart'
36 | - 'ios/Runner.xcodeproj/project.pbxproj'
37 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 3.0.0
2 |
3 | * refactor code
4 |
5 | ## 2.3.0
6 |
7 | * Upgrade Flutter 3.24
8 |
9 | ## 2.2.0
10 |
11 | * Support Flutter 3.10
12 |
13 | ## 2.1.0
14 |
15 | * Support the Android V2 embedding
16 | * Update iOS MinimumOSVersion=9.0
17 |
18 | ## 2.0.0
19 |
20 | * support nullsafety
21 | * support macos
22 |
23 | ## 1.1.1
24 |
25 | * support swift 5
26 |
27 | ## 1.1.0
28 |
29 | * fix iOS less than fifteen characters failed to decrypt
30 |
31 | ## 1.0.1
32 |
33 | * update README.md.
34 |
35 | ## 1.0.0
36 |
37 | * add Uint8List.
38 | * add base64.
39 |
40 | ## 0.0.1
41 |
42 | * initial release.
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 OctMon
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://pub.dartlang.org/packages/flutter_des)
2 | [](https://github.com/OctMon/flutter_des)
3 | [](https://github.com/OctMon/flutter_des/actions)
4 |
5 | # flutter_des
6 |
7 | Java, Android, iOS, macOS, get the same result by DES encryption and decryption.
8 |
9 |
10 |
11 |
12 |
13 | >
14 |
15 |
16 | >
17 |
18 |
19 | DES
20 | Algorithm: CBC
21 | Operation: (android)PKCS5Padding (ios)kCCOptionPKCS7Padding
22 | http://tool.chacuo.net/cryptdes
23 |
24 | ## Getting Started
25 |
26 | ### Add dependency
27 |
28 | ```yaml
29 | dependencies:
30 | flutter_des: #latest version
31 | ```
32 |
33 | ### Example
34 |
35 | ```dart
36 | import 'package:flutter_des/flutter_des.dart';
37 |
38 | void example() async {
39 | const string = "Java, Android, iOS, macOS, get the same result by DES encryption and decryption.";
40 | const key = "u1BvOHzUOcklgNpn1MaWvdn9DT4LyzSX";
41 | const iv = "12345678";
42 |
43 | var encrypt = await FlutterDes.encrypt(string, key, iv: iv);
44 | var decrypt = await FlutterDes.decrypt(encrypt, key, iv: iv);
45 | var encryptHex = await FlutterDes.encryptToHex(string, key, iv: iv);
46 | var decryptHex = await FlutterDes.decryptFromHex(encryptHex, key, iv: iv);
47 | var encryptBase64 = await FlutterDes.encryptToBase64(string, key, iv: iv);
48 | var decryptBase64 = await FlutterDes.decryptFromBase64(encryptBase64, key, iv: iv);
49 | }
50 | ```
51 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | # Additional information about this file can be found at
4 | # https://dart.dev/guides/language/analysis-options
5 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .cxx
10 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group = "com.octmon.flutter_des"
2 | version = "1.0"
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | mavenCentral()
8 | }
9 |
10 | dependencies {
11 | classpath("com.android.tools.build:gradle:8.1.0")
12 | }
13 | }
14 |
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | mavenCentral()
19 | }
20 | }
21 |
22 | apply plugin: "com.android.library"
23 |
24 | android {
25 | if (project.android.hasProperty("namespace")) {
26 | namespace = "com.octmon.flutter_des"
27 | }
28 |
29 | compileSdk = 34
30 |
31 | compileOptions {
32 | sourceCompatibility = JavaVersion.VERSION_1_8
33 | targetCompatibility = JavaVersion.VERSION_1_8
34 | }
35 |
36 | defaultConfig {
37 | minSdk = 21
38 | }
39 |
40 | dependencies {
41 | testImplementation("junit:junit:4.13.2")
42 | testImplementation("org.mockito:mockito-core:5.0.0")
43 | }
44 |
45 | testOptions {
46 | unitTests.all {
47 | testLogging {
48 | events "passed", "skipped", "failed", "standardOut", "standardError"
49 | outputs.upToDateWhen {false}
50 | showStandardStreams = true
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'flutter_des'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/java/com/octmon/flutter_des/FlutterDesPlugin.java:
--------------------------------------------------------------------------------
1 | package com.octmon.flutter_des;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import io.flutter.embedding.engine.plugins.FlutterPlugin;
6 | import io.flutter.plugin.common.MethodCall;
7 | import io.flutter.plugin.common.MethodChannel;
8 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
9 | import io.flutter.plugin.common.MethodChannel.Result;
10 |
11 | import javax.crypto.SecretKeyFactory;
12 | import javax.crypto.spec.DESKeySpec;
13 | import java.security.Key;
14 | import java.security.spec.AlgorithmParameterSpec;
15 | import java.util.ArrayList;
16 |
17 | import javax.crypto.Cipher;
18 | import javax.crypto.spec.IvParameterSpec;
19 |
20 | /** FlutterDesPlugin */
21 | public class FlutterDesPlugin implements FlutterPlugin, MethodCallHandler {
22 | /// The MethodChannel that will the communication between Flutter and native Android
23 | ///
24 | /// This local reference serves to register the plugin with the Flutter Engine and unregister it
25 | /// when the Flutter Engine is detached from the Activity
26 | private MethodChannel channel;
27 |
28 | @Override
29 | public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
30 | channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_des");
31 | channel.setMethodCallHandler(this);
32 | }
33 |
34 | @Override
35 | public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
36 | ArrayList arguments = (ArrayList) call.arguments;
37 | String key = (String) arguments.get(1);
38 | String iv = (String) arguments.get(2);
39 | switch (call.method) {
40 | case "encrypt":
41 | result.success(encrypt((String) arguments.get(0), key, iv));
42 | break;
43 | case "encryptToHex":
44 | result.success(encryptToHex((String) arguments.get(0), key, iv));
45 | break;
46 | case "decrypt":
47 | result.success(decrypt((byte[]) arguments.get(0), key, iv));
48 | break;
49 | case "decryptFromHex":
50 | result.success(decryptFromHex((String) arguments.get(0), key, iv));
51 | break;
52 | default:
53 | result.notImplemented();
54 | break;
55 | }
56 | }
57 |
58 | @Override
59 | public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
60 | channel.setMethodCallHandler(null);
61 | }
62 |
63 | private static final String ALGORITHM_DES = "DES/CBC/PKCS5Padding";
64 |
65 | /**
66 | * 加密
67 | */
68 | private static String encryptToHex(String originStr, String secretKey, String iv) {
69 | return byte2hex(encrypt(originStr, secretKey, iv));
70 | }
71 |
72 | /**
73 | * 解密
74 | */
75 | private static String decryptFromHex(String encryptHexStr, String secretKey, String iv) {
76 | if(encryptHexStr == null || iv == null)
77 | return null;
78 | try {
79 | return decrypt(hex2byte(encryptHexStr.getBytes()), secretKey, iv);
80 | } catch (Exception e){
81 | e.printStackTrace();
82 | return "";
83 | }
84 | }
85 |
86 | /**
87 | * DES算法,加密
88 | *
89 | * @param data 待加密字符串
90 | * @param key 加密私钥,长度不能够小于8位
91 | * @param iv 偏移量
92 | * @return 加密后的字节数组,一般结合Base64编码使用
93 | */
94 | private static byte[] encrypt(String data, String key, String iv) {
95 | if(data == null || iv == null)
96 | return null;
97 | try{
98 | DESKeySpec dks = new DESKeySpec(key.getBytes());
99 | SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
100 | //key的长度不能够小于8位字节
101 | Key secretKey = keyFactory.generateSecret(dks);
102 | Cipher cipher = Cipher.getInstance(ALGORITHM_DES);
103 | AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv.getBytes());
104 | cipher.init(Cipher.ENCRYPT_MODE, secretKey,paramSpec);
105 | return cipher.doFinal(data.getBytes());
106 | }catch(Exception e){
107 | e.printStackTrace();
108 | return null;
109 | }
110 | }
111 |
112 | /**
113 | * DES算法,解密
114 | *
115 | * @param data 待解密字符串
116 | * @param key 解密私钥,长度不能够小于8位
117 | * @param iv 偏移量
118 | * @return 解密后的字节数组
119 | */
120 | private static String decrypt(byte[] data, String key, String iv) {
121 | if(data == null || iv == null)
122 | return null;
123 | try {
124 | DESKeySpec dks = new DESKeySpec(key.getBytes());
125 | SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
126 | //key的长度不能够小于8位字节
127 | Key secretKey = keyFactory.generateSecret(dks);
128 | Cipher cipher = Cipher.getInstance(ALGORITHM_DES);
129 | AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv.getBytes());
130 | cipher.init(Cipher.DECRYPT_MODE, secretKey, paramSpec);
131 | return new String(cipher.doFinal(data));
132 | } catch (Exception e){
133 | e.printStackTrace();
134 | return "";
135 | }
136 | }
137 |
138 | /**
139 | * 二行制转字符串
140 | */
141 | private static String byte2hex(byte[] b) {
142 | StringBuilder hs = new StringBuilder();
143 | String stmp;
144 | for (int n = 0; b!=null && n < b.length; n++) {
145 | stmp = Integer.toHexString(b[n] & 0XFF);
146 | if (stmp.length() == 1)
147 | hs.append('0');
148 | hs.append(stmp);
149 | }
150 | return hs.toString().toUpperCase();
151 | }
152 |
153 | private static byte[] hex2byte(byte[] b) {
154 | if((b.length%2)!=0)
155 | throw new IllegalArgumentException();
156 | byte[] b2 = new byte[b.length/2];
157 | for (int n = 0; n < b.length; n+=2) {
158 | String item = new String(b,n,2);
159 | b2[n/2] = (byte)Integer.parseInt(item,16);
160 | }
161 | return b2;
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/android/src/test/java/com/octmon/flutter_des/FlutterDesPluginTest.java:
--------------------------------------------------------------------------------
1 | package com.octmon.flutter_des;
2 |
3 | import static org.mockito.Mockito.mock;
4 | import static org.mockito.Mockito.verify;
5 |
6 | import io.flutter.plugin.common.MethodCall;
7 | import io.flutter.plugin.common.MethodChannel;
8 | import org.junit.Test;
9 |
10 | /**
11 | * This demonstrates a simple unit test of the Java portion of this plugin's implementation.
12 | *
13 | * Once you have built the plugin's example app, you can run these tests from the command
14 | * line by running `./gradlew testDebugUnitTest` in the `example/android/` directory, or
15 | * you can run them directly from IDEs that support JUnit such as Android Studio.
16 | */
17 |
18 | public class FlutterDesPluginTest {
19 | @Test
20 | public void onMethodCall_getPlatformVersion_returnsExpectedValue() {
21 | FlutterDesPlugin plugin = new FlutterDesPlugin();
22 |
23 | final MethodCall call = new MethodCall("getPlatformVersion", null);
24 | MethodChannel.Result mockResult = mock(MethodChannel.Result.class);
25 | plugin.onMethodCall(call, mockResult);
26 |
27 | verify(mockResult).success("Android " + android.os.Build.VERSION.RELEASE);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # flutter_des_example
2 |
3 | Demonstrates how to use the flutter_des plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/to/reference-keystore
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | android {
9 | namespace = "com.octmon.flutter_des_example"
10 | compileSdk = flutter.compileSdkVersion
11 | ndkVersion = flutter.ndkVersion
12 |
13 | compileOptions {
14 | sourceCompatibility = JavaVersion.VERSION_1_8
15 | targetCompatibility = JavaVersion.VERSION_1_8
16 | }
17 |
18 | kotlinOptions {
19 | jvmTarget = JavaVersion.VERSION_1_8
20 | }
21 |
22 | defaultConfig {
23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24 | applicationId = "com.octmon.flutter_des_example"
25 | // You can update the following values to match your application needs.
26 | // For more information, see: https://flutter.dev/to/review-gradle-config.
27 | minSdk = flutter.minSdkVersion
28 | targetSdk = flutter.targetSdkVersion
29 | versionCode = flutter.versionCode
30 | versionName = flutter.versionName
31 | }
32 |
33 | buildTypes {
34 | release {
35 | // TODO: Add your own signing config for the release build.
36 | // Signing with the debug keys for now, so `flutter run --release` works.
37 | signingConfig = signingConfigs.debug
38 | }
39 | }
40 | }
41 |
42 | flutter {
43 | source = "../.."
44 | }
45 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
18 |
22 |
26 |
27 |
28 |
29 |
30 |
31 |
33 |
36 |
37 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/octmon/flutter_des_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.octmon.flutter_des_example;
2 |
3 | import io.flutter.embedding.android.FlutterActivity;
4 |
5 | public class MainActivity extends FlutterActivity {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/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-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #ffffff
4 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(":app")
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
6 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "8.1.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.8.22" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/example/icons/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/icons/icon.png
--------------------------------------------------------------------------------
/example/integration_test/plugin_integration_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter integration test.
2 | //
3 | // Since integration tests run in a full Flutter application, they can interact
4 | // with the host side of a plugin implementation, unlike Dart unit tests.
5 | //
6 | // For more information about Flutter integration tests, please see
7 | // https://flutter.dev/to/integration-testing
8 |
9 | import 'package:flutter/foundation.dart';
10 | import 'package:flutter_des/flutter_des.dart';
11 | import 'package:flutter_test/flutter_test.dart';
12 | import 'package:integration_test/integration_test.dart';
13 |
14 | void main() {
15 | IntegrationTestWidgetsFlutterBinding.ensureInitialized();
16 |
17 | const kText =
18 | 'Java, Android, iOS, macOS, get the same result by DES encryption and decryption.';
19 | const kKey = 'u1BvOHzUOcklgNpn1MaWvdn9DT4LyzSX';
20 | const kIV = "12345678";
21 | const kEncryptHex =
22 | '1BB1ECAA9F1BE8062740DD5EA56AB99E13D244B3F2BD4907C89D5AA79F3E9EC124295662B2FA1BE5C0F0AE7B3722217D335C839C7574EC5A573F75A75816082E878FAC50CBCA89E5380C27F5FBFE3429F63709BA7A134578';
23 | const kEncryptBase64 =
24 | 'G7Hsqp8b6AYnQN1epWq5nhPSRLPyvUkHyJ1ap58+nsEkKVZisvob5cDwrns3IiF9M1yDnHV07FpXP3WnWBYILoePrFDLyonlOAwn9fv+NCn2Nwm6ehNFeA==';
25 |
26 | testWidgets('encryptToHex test', (WidgetTester tester) async {
27 | final encrypt = await FlutterDes.encryptToHex(kText, kKey, iv: kIV);
28 | debugPrint("encryptToHex: $encrypt");
29 | expect(encrypt, kEncryptHex);
30 | });
31 |
32 | testWidgets('encryptToBase64 test', (WidgetTester tester) async {
33 | final encrypt = await FlutterDes.encryptToBase64(kText, kKey, iv: kIV);
34 | debugPrint("encryptToBase64: $encrypt");
35 | expect(encrypt, kEncryptBase64);
36 | });
37 |
38 | testWidgets('decryptFromHex test', (WidgetTester tester) async {
39 | final decrypt = await FlutterDes.decryptFromHex(kEncryptHex, kKey, iv: kIV);
40 | debugPrint("decryptFromHex: $decrypt");
41 | expect(decrypt, kText);
42 | });
43 |
44 | testWidgets('decryptFromBase64 test', (WidgetTester tester) async {
45 | final decrypt =
46 | await FlutterDes.decryptFromBase64(kEncryptBase64, kKey, iv: kIV);
47 | debugPrint("decryptFromBase64: $decrypt");
48 | expect(decrypt, kText);
49 | });
50 | }
51 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/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 | 12.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, '12.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - flutter_des (0.0.1):
4 | - Flutter
5 | - integration_test (0.0.1):
6 | - Flutter
7 |
8 | DEPENDENCIES:
9 | - Flutter (from `Flutter`)
10 | - flutter_des (from `.symlinks/plugins/flutter_des/ios`)
11 | - integration_test (from `.symlinks/plugins/integration_test/ios`)
12 |
13 | EXTERNAL SOURCES:
14 | Flutter:
15 | :path: Flutter
16 | flutter_des:
17 | :path: ".symlinks/plugins/flutter_des/ios"
18 | integration_test:
19 | :path: ".symlinks/plugins/integration_test/ios"
20 |
21 | SPEC CHECKSUMS:
22 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
23 | flutter_des: 312c5dd7119881b916bd378a0433df8a82664817
24 | integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
25 |
26 | PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
27 |
28 | COCOAPODS: 1.16.2
29 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 09500BA95C86253040A8108B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3CE8A6C8276C13FDF93CDD3 /* Pods_Runner.framework */; };
11 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
12 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
13 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
16 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
17 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
18 | F63F88B91C62FDF0EE781558 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C40219920E7994D6ACF1117 /* Pods_RunnerTests.framework */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = 97C146E61CF9000F007C117D /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = 97C146ED1CF9000F007C117D;
27 | remoteInfo = Runner;
28 | };
29 | /* End PBXContainerItemProxy section */
30 |
31 | /* Begin PBXCopyFilesBuildPhase section */
32 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
33 | isa = PBXCopyFilesBuildPhase;
34 | buildActionMask = 2147483647;
35 | dstPath = "";
36 | dstSubfolderSpec = 10;
37 | files = (
38 | );
39 | name = "Embed Frameworks";
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXCopyFilesBuildPhase section */
43 |
44 | /* Begin PBXFileReference section */
45 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
46 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
47 | 1C40219920E7994D6ACF1117 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 2D245DCED9E120EA7D0C398A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
49 | 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
50 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
52 | 45E83C2529071CC89B5E11C9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
53 | 5AA71039079EA7351EDA4E28 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
54 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
55 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
56 | 74E6100217599DE33BC55823 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
57 | 77D901A505755EA46CAEA8CD /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
58 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
59 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
60 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
61 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
62 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
63 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
64 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
65 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
66 | A3CE8A6C8276C13FDF93CDD3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
67 | BF76633CEF14580C7113DB78 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; };
68 | /* End PBXFileReference section */
69 |
70 | /* Begin PBXFrameworksBuildPhase section */
71 | 358862D8731D7DF8F871827F /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | F63F88B91C62FDF0EE781558 /* Pods_RunnerTests.framework in Frameworks */,
76 | );
77 | runOnlyForDeploymentPostprocessing = 0;
78 | };
79 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | 09500BA95C86253040A8108B /* Pods_Runner.framework in Frameworks */,
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | /* End PBXFrameworksBuildPhase section */
88 |
89 | /* Begin PBXGroup section */
90 | 331C8082294A63A400263BE5 /* RunnerTests */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 331C807B294A618700263BE5 /* RunnerTests.swift */,
94 | );
95 | path = RunnerTests;
96 | sourceTree = "";
97 | };
98 | 9740EEB11CF90186004384FC /* Flutter */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
102 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
103 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
104 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
105 | );
106 | name = Flutter;
107 | sourceTree = "";
108 | };
109 | 97C146E51CF9000F007C117D = {
110 | isa = PBXGroup;
111 | children = (
112 | 9740EEB11CF90186004384FC /* Flutter */,
113 | 97C146F01CF9000F007C117D /* Runner */,
114 | 97C146EF1CF9000F007C117D /* Products */,
115 | 331C8082294A63A400263BE5 /* RunnerTests */,
116 | D3E18B2D82940D73C3EF61D6 /* Pods */,
117 | C37198CD7FA3E50A1FB7FBC8 /* Frameworks */,
118 | );
119 | sourceTree = "";
120 | };
121 | 97C146EF1CF9000F007C117D /* Products */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 97C146EE1CF9000F007C117D /* Runner.app */,
125 | 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
126 | );
127 | name = Products;
128 | sourceTree = "";
129 | };
130 | 97C146F01CF9000F007C117D /* Runner */ = {
131 | isa = PBXGroup;
132 | children = (
133 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
134 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
135 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
136 | 97C147021CF9000F007C117D /* Info.plist */,
137 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
138 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
139 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
140 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
141 | );
142 | path = Runner;
143 | sourceTree = "";
144 | };
145 | C37198CD7FA3E50A1FB7FBC8 /* Frameworks */ = {
146 | isa = PBXGroup;
147 | children = (
148 | A3CE8A6C8276C13FDF93CDD3 /* Pods_Runner.framework */,
149 | 1C40219920E7994D6ACF1117 /* Pods_RunnerTests.framework */,
150 | );
151 | name = Frameworks;
152 | sourceTree = "";
153 | };
154 | D3E18B2D82940D73C3EF61D6 /* Pods */ = {
155 | isa = PBXGroup;
156 | children = (
157 | 45E83C2529071CC89B5E11C9 /* Pods-Runner.debug.xcconfig */,
158 | 2D245DCED9E120EA7D0C398A /* Pods-Runner.release.xcconfig */,
159 | 5AA71039079EA7351EDA4E28 /* Pods-Runner.profile.xcconfig */,
160 | 74E6100217599DE33BC55823 /* Pods-RunnerTests.debug.xcconfig */,
161 | 77D901A505755EA46CAEA8CD /* Pods-RunnerTests.release.xcconfig */,
162 | BF76633CEF14580C7113DB78 /* Pods-RunnerTests.profile.xcconfig */,
163 | );
164 | name = Pods;
165 | path = Pods;
166 | sourceTree = "";
167 | };
168 | /* End PBXGroup section */
169 |
170 | /* Begin PBXNativeTarget section */
171 | 331C8080294A63A400263BE5 /* RunnerTests */ = {
172 | isa = PBXNativeTarget;
173 | buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
174 | buildPhases = (
175 | 2DC4BA7236F182C7161D9C3C /* [CP] Check Pods Manifest.lock */,
176 | 331C807D294A63A400263BE5 /* Sources */,
177 | 331C807F294A63A400263BE5 /* Resources */,
178 | 358862D8731D7DF8F871827F /* Frameworks */,
179 | );
180 | buildRules = (
181 | );
182 | dependencies = (
183 | 331C8086294A63A400263BE5 /* PBXTargetDependency */,
184 | );
185 | name = RunnerTests;
186 | productName = RunnerTests;
187 | productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
188 | productType = "com.apple.product-type.bundle.unit-test";
189 | };
190 | 97C146ED1CF9000F007C117D /* Runner */ = {
191 | isa = PBXNativeTarget;
192 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
193 | buildPhases = (
194 | 59BCD72454DAC37AA67AC8A0 /* [CP] Check Pods Manifest.lock */,
195 | 9740EEB61CF901F6004384FC /* Run Script */,
196 | 97C146EA1CF9000F007C117D /* Sources */,
197 | 97C146EB1CF9000F007C117D /* Frameworks */,
198 | 97C146EC1CF9000F007C117D /* Resources */,
199 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
200 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
201 | 710888856E75AB2EA08D037C /* [CP] Embed Pods Frameworks */,
202 | );
203 | buildRules = (
204 | );
205 | dependencies = (
206 | );
207 | name = Runner;
208 | productName = Runner;
209 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
210 | productType = "com.apple.product-type.application";
211 | };
212 | /* End PBXNativeTarget section */
213 |
214 | /* Begin PBXProject section */
215 | 97C146E61CF9000F007C117D /* Project object */ = {
216 | isa = PBXProject;
217 | attributes = {
218 | BuildIndependentTargetsInParallel = YES;
219 | LastUpgradeCheck = 1510;
220 | ORGANIZATIONNAME = "";
221 | TargetAttributes = {
222 | 331C8080294A63A400263BE5 = {
223 | CreatedOnToolsVersion = 14.0;
224 | TestTargetID = 97C146ED1CF9000F007C117D;
225 | };
226 | 97C146ED1CF9000F007C117D = {
227 | CreatedOnToolsVersion = 7.3.1;
228 | LastSwiftMigration = 1100;
229 | };
230 | };
231 | };
232 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
233 | compatibilityVersion = "Xcode 9.3";
234 | developmentRegion = en;
235 | hasScannedForEncodings = 0;
236 | knownRegions = (
237 | en,
238 | Base,
239 | );
240 | mainGroup = 97C146E51CF9000F007C117D;
241 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
242 | projectDirPath = "";
243 | projectRoot = "";
244 | targets = (
245 | 97C146ED1CF9000F007C117D /* Runner */,
246 | 331C8080294A63A400263BE5 /* RunnerTests */,
247 | );
248 | };
249 | /* End PBXProject section */
250 |
251 | /* Begin PBXResourcesBuildPhase section */
252 | 331C807F294A63A400263BE5 /* Resources */ = {
253 | isa = PBXResourcesBuildPhase;
254 | buildActionMask = 2147483647;
255 | files = (
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | };
259 | 97C146EC1CF9000F007C117D /* Resources */ = {
260 | isa = PBXResourcesBuildPhase;
261 | buildActionMask = 2147483647;
262 | files = (
263 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
264 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
265 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
266 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
267 | );
268 | runOnlyForDeploymentPostprocessing = 0;
269 | };
270 | /* End PBXResourcesBuildPhase section */
271 |
272 | /* Begin PBXShellScriptBuildPhase section */
273 | 2DC4BA7236F182C7161D9C3C /* [CP] Check Pods Manifest.lock */ = {
274 | isa = PBXShellScriptBuildPhase;
275 | buildActionMask = 2147483647;
276 | files = (
277 | );
278 | inputFileListPaths = (
279 | );
280 | inputPaths = (
281 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
282 | "${PODS_ROOT}/Manifest.lock",
283 | );
284 | name = "[CP] Check Pods Manifest.lock";
285 | outputFileListPaths = (
286 | );
287 | outputPaths = (
288 | "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
289 | );
290 | runOnlyForDeploymentPostprocessing = 0;
291 | shellPath = /bin/sh;
292 | 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";
293 | showEnvVarsInLog = 0;
294 | };
295 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
296 | isa = PBXShellScriptBuildPhase;
297 | alwaysOutOfDate = 1;
298 | buildActionMask = 2147483647;
299 | files = (
300 | );
301 | inputPaths = (
302 | "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
303 | );
304 | name = "Thin Binary";
305 | outputPaths = (
306 | );
307 | runOnlyForDeploymentPostprocessing = 0;
308 | shellPath = /bin/sh;
309 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
310 | };
311 | 59BCD72454DAC37AA67AC8A0 /* [CP] Check Pods Manifest.lock */ = {
312 | isa = PBXShellScriptBuildPhase;
313 | buildActionMask = 2147483647;
314 | files = (
315 | );
316 | inputFileListPaths = (
317 | );
318 | inputPaths = (
319 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
320 | "${PODS_ROOT}/Manifest.lock",
321 | );
322 | name = "[CP] Check Pods Manifest.lock";
323 | outputFileListPaths = (
324 | );
325 | outputPaths = (
326 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
327 | );
328 | runOnlyForDeploymentPostprocessing = 0;
329 | shellPath = /bin/sh;
330 | 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";
331 | showEnvVarsInLog = 0;
332 | };
333 | 710888856E75AB2EA08D037C /* [CP] Embed Pods Frameworks */ = {
334 | isa = PBXShellScriptBuildPhase;
335 | buildActionMask = 2147483647;
336 | files = (
337 | );
338 | inputFileListPaths = (
339 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
340 | );
341 | name = "[CP] Embed Pods Frameworks";
342 | outputFileListPaths = (
343 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
344 | );
345 | runOnlyForDeploymentPostprocessing = 0;
346 | shellPath = /bin/sh;
347 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
348 | showEnvVarsInLog = 0;
349 | };
350 | 9740EEB61CF901F6004384FC /* Run Script */ = {
351 | isa = PBXShellScriptBuildPhase;
352 | alwaysOutOfDate = 1;
353 | buildActionMask = 2147483647;
354 | files = (
355 | );
356 | inputPaths = (
357 | );
358 | name = "Run Script";
359 | outputPaths = (
360 | );
361 | runOnlyForDeploymentPostprocessing = 0;
362 | shellPath = /bin/sh;
363 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
364 | };
365 | /* End PBXShellScriptBuildPhase section */
366 |
367 | /* Begin PBXSourcesBuildPhase section */
368 | 331C807D294A63A400263BE5 /* Sources */ = {
369 | isa = PBXSourcesBuildPhase;
370 | buildActionMask = 2147483647;
371 | files = (
372 | 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
373 | );
374 | runOnlyForDeploymentPostprocessing = 0;
375 | };
376 | 97C146EA1CF9000F007C117D /* Sources */ = {
377 | isa = PBXSourcesBuildPhase;
378 | buildActionMask = 2147483647;
379 | files = (
380 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
381 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
382 | );
383 | runOnlyForDeploymentPostprocessing = 0;
384 | };
385 | /* End PBXSourcesBuildPhase section */
386 |
387 | /* Begin PBXTargetDependency section */
388 | 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
389 | isa = PBXTargetDependency;
390 | target = 97C146ED1CF9000F007C117D /* Runner */;
391 | targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
392 | };
393 | /* End PBXTargetDependency section */
394 |
395 | /* Begin PBXVariantGroup section */
396 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
397 | isa = PBXVariantGroup;
398 | children = (
399 | 97C146FB1CF9000F007C117D /* Base */,
400 | );
401 | name = Main.storyboard;
402 | sourceTree = "";
403 | };
404 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
405 | isa = PBXVariantGroup;
406 | children = (
407 | 97C147001CF9000F007C117D /* Base */,
408 | );
409 | name = LaunchScreen.storyboard;
410 | sourceTree = "";
411 | };
412 | /* End PBXVariantGroup section */
413 |
414 | /* Begin XCBuildConfiguration section */
415 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
416 | isa = XCBuildConfiguration;
417 | buildSettings = {
418 | ALWAYS_SEARCH_USER_PATHS = NO;
419 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
420 | CLANG_ANALYZER_NONNULL = YES;
421 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
422 | CLANG_CXX_LIBRARY = "libc++";
423 | CLANG_ENABLE_MODULES = YES;
424 | CLANG_ENABLE_OBJC_ARC = YES;
425 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
426 | CLANG_WARN_BOOL_CONVERSION = YES;
427 | CLANG_WARN_COMMA = YES;
428 | CLANG_WARN_CONSTANT_CONVERSION = YES;
429 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
430 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
431 | CLANG_WARN_EMPTY_BODY = YES;
432 | CLANG_WARN_ENUM_CONVERSION = YES;
433 | CLANG_WARN_INFINITE_RECURSION = YES;
434 | CLANG_WARN_INT_CONVERSION = YES;
435 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
436 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
437 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
438 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
439 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
440 | CLANG_WARN_STRICT_PROTOTYPES = YES;
441 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
442 | CLANG_WARN_UNREACHABLE_CODE = YES;
443 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
444 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
445 | COPY_PHASE_STRIP = NO;
446 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
447 | ENABLE_NS_ASSERTIONS = NO;
448 | ENABLE_STRICT_OBJC_MSGSEND = YES;
449 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
450 | GCC_C_LANGUAGE_STANDARD = gnu99;
451 | GCC_NO_COMMON_BLOCKS = YES;
452 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
453 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
454 | GCC_WARN_UNDECLARED_SELECTOR = YES;
455 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
456 | GCC_WARN_UNUSED_FUNCTION = YES;
457 | GCC_WARN_UNUSED_VARIABLE = YES;
458 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
459 | MTL_ENABLE_DEBUG_INFO = NO;
460 | SDKROOT = iphoneos;
461 | SUPPORTED_PLATFORMS = iphoneos;
462 | TARGETED_DEVICE_FAMILY = "1,2";
463 | VALIDATE_PRODUCT = YES;
464 | };
465 | name = Profile;
466 | };
467 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
468 | isa = XCBuildConfiguration;
469 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
470 | buildSettings = {
471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
472 | CLANG_ENABLE_MODULES = YES;
473 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
474 | DEVELOPMENT_TEAM = 2HHTRN5N5L;
475 | ENABLE_BITCODE = NO;
476 | INFOPLIST_FILE = Runner/Info.plist;
477 | LD_RUNPATH_SEARCH_PATHS = (
478 | "$(inherited)",
479 | "@executable_path/Frameworks",
480 | );
481 | PRODUCT_BUNDLE_IDENTIFIER = com.octmon.flutterDesExample;
482 | PRODUCT_NAME = "$(TARGET_NAME)";
483 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
484 | SWIFT_VERSION = 5.0;
485 | VERSIONING_SYSTEM = "apple-generic";
486 | };
487 | name = Profile;
488 | };
489 | 331C8088294A63A400263BE5 /* Debug */ = {
490 | isa = XCBuildConfiguration;
491 | baseConfigurationReference = 74E6100217599DE33BC55823 /* Pods-RunnerTests.debug.xcconfig */;
492 | buildSettings = {
493 | BUNDLE_LOADER = "$(TEST_HOST)";
494 | CODE_SIGN_STYLE = Automatic;
495 | CURRENT_PROJECT_VERSION = 1;
496 | GENERATE_INFOPLIST_FILE = YES;
497 | MARKETING_VERSION = 1.0;
498 | PRODUCT_BUNDLE_IDENTIFIER = com.octmon.flutterDesExample.RunnerTests;
499 | PRODUCT_NAME = "$(TARGET_NAME)";
500 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
501 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
502 | SWIFT_VERSION = 5.0;
503 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
504 | };
505 | name = Debug;
506 | };
507 | 331C8089294A63A400263BE5 /* Release */ = {
508 | isa = XCBuildConfiguration;
509 | baseConfigurationReference = 77D901A505755EA46CAEA8CD /* Pods-RunnerTests.release.xcconfig */;
510 | buildSettings = {
511 | BUNDLE_LOADER = "$(TEST_HOST)";
512 | CODE_SIGN_STYLE = Automatic;
513 | CURRENT_PROJECT_VERSION = 1;
514 | GENERATE_INFOPLIST_FILE = YES;
515 | MARKETING_VERSION = 1.0;
516 | PRODUCT_BUNDLE_IDENTIFIER = com.octmon.flutterDesExample.RunnerTests;
517 | PRODUCT_NAME = "$(TARGET_NAME)";
518 | SWIFT_VERSION = 5.0;
519 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
520 | };
521 | name = Release;
522 | };
523 | 331C808A294A63A400263BE5 /* Profile */ = {
524 | isa = XCBuildConfiguration;
525 | baseConfigurationReference = BF76633CEF14580C7113DB78 /* Pods-RunnerTests.profile.xcconfig */;
526 | buildSettings = {
527 | BUNDLE_LOADER = "$(TEST_HOST)";
528 | CODE_SIGN_STYLE = Automatic;
529 | CURRENT_PROJECT_VERSION = 1;
530 | GENERATE_INFOPLIST_FILE = YES;
531 | MARKETING_VERSION = 1.0;
532 | PRODUCT_BUNDLE_IDENTIFIER = com.octmon.flutterDesExample.RunnerTests;
533 | PRODUCT_NAME = "$(TARGET_NAME)";
534 | SWIFT_VERSION = 5.0;
535 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
536 | };
537 | name = Profile;
538 | };
539 | 97C147031CF9000F007C117D /* Debug */ = {
540 | isa = XCBuildConfiguration;
541 | buildSettings = {
542 | ALWAYS_SEARCH_USER_PATHS = NO;
543 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
544 | CLANG_ANALYZER_NONNULL = YES;
545 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
546 | CLANG_CXX_LIBRARY = "libc++";
547 | CLANG_ENABLE_MODULES = YES;
548 | CLANG_ENABLE_OBJC_ARC = YES;
549 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
550 | CLANG_WARN_BOOL_CONVERSION = YES;
551 | CLANG_WARN_COMMA = YES;
552 | CLANG_WARN_CONSTANT_CONVERSION = YES;
553 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
554 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
555 | CLANG_WARN_EMPTY_BODY = YES;
556 | CLANG_WARN_ENUM_CONVERSION = YES;
557 | CLANG_WARN_INFINITE_RECURSION = YES;
558 | CLANG_WARN_INT_CONVERSION = YES;
559 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
560 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
561 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
562 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
563 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
564 | CLANG_WARN_STRICT_PROTOTYPES = YES;
565 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
566 | CLANG_WARN_UNREACHABLE_CODE = YES;
567 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
568 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
569 | COPY_PHASE_STRIP = NO;
570 | DEBUG_INFORMATION_FORMAT = dwarf;
571 | ENABLE_STRICT_OBJC_MSGSEND = YES;
572 | ENABLE_TESTABILITY = YES;
573 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
574 | GCC_C_LANGUAGE_STANDARD = gnu99;
575 | GCC_DYNAMIC_NO_PIC = NO;
576 | GCC_NO_COMMON_BLOCKS = YES;
577 | GCC_OPTIMIZATION_LEVEL = 0;
578 | GCC_PREPROCESSOR_DEFINITIONS = (
579 | "DEBUG=1",
580 | "$(inherited)",
581 | );
582 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
583 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
584 | GCC_WARN_UNDECLARED_SELECTOR = YES;
585 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
586 | GCC_WARN_UNUSED_FUNCTION = YES;
587 | GCC_WARN_UNUSED_VARIABLE = YES;
588 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
589 | MTL_ENABLE_DEBUG_INFO = YES;
590 | ONLY_ACTIVE_ARCH = YES;
591 | SDKROOT = iphoneos;
592 | TARGETED_DEVICE_FAMILY = "1,2";
593 | };
594 | name = Debug;
595 | };
596 | 97C147041CF9000F007C117D /* Release */ = {
597 | isa = XCBuildConfiguration;
598 | buildSettings = {
599 | ALWAYS_SEARCH_USER_PATHS = NO;
600 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
601 | CLANG_ANALYZER_NONNULL = YES;
602 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
603 | CLANG_CXX_LIBRARY = "libc++";
604 | CLANG_ENABLE_MODULES = YES;
605 | CLANG_ENABLE_OBJC_ARC = YES;
606 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
607 | CLANG_WARN_BOOL_CONVERSION = YES;
608 | CLANG_WARN_COMMA = YES;
609 | CLANG_WARN_CONSTANT_CONVERSION = YES;
610 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
611 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
612 | CLANG_WARN_EMPTY_BODY = YES;
613 | CLANG_WARN_ENUM_CONVERSION = YES;
614 | CLANG_WARN_INFINITE_RECURSION = YES;
615 | CLANG_WARN_INT_CONVERSION = YES;
616 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
617 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
618 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
619 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
620 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
621 | CLANG_WARN_STRICT_PROTOTYPES = YES;
622 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
623 | CLANG_WARN_UNREACHABLE_CODE = YES;
624 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
625 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
626 | COPY_PHASE_STRIP = NO;
627 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
628 | ENABLE_NS_ASSERTIONS = NO;
629 | ENABLE_STRICT_OBJC_MSGSEND = YES;
630 | ENABLE_USER_SCRIPT_SANDBOXING = NO;
631 | GCC_C_LANGUAGE_STANDARD = gnu99;
632 | GCC_NO_COMMON_BLOCKS = YES;
633 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
634 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
635 | GCC_WARN_UNDECLARED_SELECTOR = YES;
636 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
637 | GCC_WARN_UNUSED_FUNCTION = YES;
638 | GCC_WARN_UNUSED_VARIABLE = YES;
639 | IPHONEOS_DEPLOYMENT_TARGET = 12.0;
640 | MTL_ENABLE_DEBUG_INFO = NO;
641 | SDKROOT = iphoneos;
642 | SUPPORTED_PLATFORMS = iphoneos;
643 | SWIFT_COMPILATION_MODE = wholemodule;
644 | SWIFT_OPTIMIZATION_LEVEL = "-O";
645 | TARGETED_DEVICE_FAMILY = "1,2";
646 | VALIDATE_PRODUCT = YES;
647 | };
648 | name = Release;
649 | };
650 | 97C147061CF9000F007C117D /* Debug */ = {
651 | isa = XCBuildConfiguration;
652 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
653 | buildSettings = {
654 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
655 | CLANG_ENABLE_MODULES = YES;
656 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
657 | DEVELOPMENT_TEAM = 2HHTRN5N5L;
658 | ENABLE_BITCODE = NO;
659 | INFOPLIST_FILE = Runner/Info.plist;
660 | LD_RUNPATH_SEARCH_PATHS = (
661 | "$(inherited)",
662 | "@executable_path/Frameworks",
663 | );
664 | PRODUCT_BUNDLE_IDENTIFIER = com.octmon.flutterDesExample;
665 | PRODUCT_NAME = "$(TARGET_NAME)";
666 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
667 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
668 | SWIFT_VERSION = 5.0;
669 | VERSIONING_SYSTEM = "apple-generic";
670 | };
671 | name = Debug;
672 | };
673 | 97C147071CF9000F007C117D /* Release */ = {
674 | isa = XCBuildConfiguration;
675 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
676 | buildSettings = {
677 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
678 | CLANG_ENABLE_MODULES = YES;
679 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
680 | DEVELOPMENT_TEAM = 2HHTRN5N5L;
681 | ENABLE_BITCODE = NO;
682 | INFOPLIST_FILE = Runner/Info.plist;
683 | LD_RUNPATH_SEARCH_PATHS = (
684 | "$(inherited)",
685 | "@executable_path/Frameworks",
686 | );
687 | PRODUCT_BUNDLE_IDENTIFIER = com.octmon.flutterDesExample;
688 | PRODUCT_NAME = "$(TARGET_NAME)";
689 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
690 | SWIFT_VERSION = 5.0;
691 | VERSIONING_SYSTEM = "apple-generic";
692 | };
693 | name = Release;
694 | };
695 | /* End XCBuildConfiguration section */
696 |
697 | /* Begin XCConfigurationList section */
698 | 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
699 | isa = XCConfigurationList;
700 | buildConfigurations = (
701 | 331C8088294A63A400263BE5 /* Debug */,
702 | 331C8089294A63A400263BE5 /* Release */,
703 | 331C808A294A63A400263BE5 /* Profile */,
704 | );
705 | defaultConfigurationIsVisible = 0;
706 | defaultConfigurationName = Release;
707 | };
708 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
709 | isa = XCConfigurationList;
710 | buildConfigurations = (
711 | 97C147031CF9000F007C117D /* Debug */,
712 | 97C147041CF9000F007C117D /* Release */,
713 | 249021D3217E4FDB00AE95B9 /* Profile */,
714 | );
715 | defaultConfigurationIsVisible = 0;
716 | defaultConfigurationName = Release;
717 | };
718 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
719 | isa = XCConfigurationList;
720 | buildConfigurations = (
721 | 97C147061CF9000F007C117D /* Debug */,
722 | 97C147071CF9000F007C117D /* Release */,
723 | 249021D4217E4FDB00AE95B9 /* Profile */,
724 | );
725 | defaultConfigurationIsVisible = 0;
726 | defaultConfigurationName = Release;
727 | };
728 | /* End XCConfigurationList section */
729 | };
730 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
731 | }
732 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/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.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 |
4 | @main
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}}
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/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/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Flutter Des
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | flutter_des_example
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 |
6 | @testable import flutter_des
7 |
8 | // This demonstrates a simple unit test of the Swift portion of this plugin's implementation.
9 | //
10 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
11 |
12 | class RunnerTests: XCTestCase {
13 |
14 | func testGetPlatformVersion() {
15 | let plugin = FlutterDesPlugin()
16 |
17 | let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: [])
18 |
19 | let resultExpectation = expectation(description: "result block must be called.")
20 | plugin.handle(call) { result in
21 | XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion)
22 | resultExpectation.fulfill()
23 | }
24 | waitForExpectations(timeout: 1)
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter/material.dart';
3 | import 'dart:async';
4 |
5 | import 'package:flutter_des/flutter_des.dart';
6 |
7 | void main() => runApp(const MyApp());
8 |
9 | class MyApp extends StatefulWidget {
10 | const MyApp({super.key});
11 |
12 | @override
13 | State createState() => _MyAppState();
14 | }
15 |
16 | const _string =
17 | "Java, Android, iOS, macOS, get the same result by DES encryption and decryption.";
18 |
19 | class _MyAppState extends State {
20 | static const _key = "u1BvOHzUOcklgNpn1MaWvdn9DT4LyzSX";
21 | static const _iv = "12345678";
22 | final _controller = TextEditingController();
23 | Uint8List? _encrypt;
24 | String? _decrypt = '';
25 | String? _encryptHex = '';
26 | String? _decryptHex = '';
27 | String _encryptBase64 = '';
28 | String? _decryptBase64 = '';
29 | String _text = _string;
30 |
31 | @override
32 | void initState() {
33 | super.initState();
34 |
35 | crypt();
36 |
37 | _controller.addListener(() {
38 | _text = _controller.text;
39 | crypt();
40 | });
41 | }
42 |
43 | @override
44 | void dispose() {
45 | super.dispose();
46 | _controller.dispose();
47 | }
48 |
49 | // Platform messages are asynchronous, so we initialize in an async method.
50 | Future crypt() async {
51 | if (_text.isEmpty) {
52 | _text = _string;
53 | }
54 | try {
55 | _encrypt = await FlutterDes.encrypt(_text, _key, iv: _iv);
56 | _decrypt = await FlutterDes.decrypt(
57 | _encrypt ?? Uint8List.fromList([]), _key,
58 | iv: _iv);
59 | _encryptHex = await FlutterDes.encryptToHex(_text, _key, iv: _iv);
60 | _decryptHex = await FlutterDes.decryptFromHex(_encryptHex, _key, iv: _iv);
61 | _encryptBase64 = await FlutterDes.encryptToBase64(_text, _key, iv: _iv);
62 | _decryptBase64 =
63 | await FlutterDes.decryptFromBase64(_encryptBase64, _key, iv: _iv);
64 | setState(() {});
65 | } catch (e) {
66 | if (kDebugMode) {
67 | print(e);
68 | }
69 | }
70 | }
71 |
72 | @override
73 | Widget build(BuildContext context) {
74 | return MaterialApp(
75 | home: Scaffold(
76 | appBar: AppBar(
77 | title: TextField(
78 | decoration: const InputDecoration(
79 | labelText: _string,
80 | ),
81 | controller: _controller,
82 | ),
83 | ),
84 | body: Padding(
85 | padding: const EdgeInsets.all(15.0),
86 | child: Center(
87 | child: ListView(
88 | children: [
89 | const Chip(
90 | labelPadding: EdgeInsets.all(5),
91 | avatar: CircleAvatar(
92 | child: Text('key'),
93 | ),
94 | label: Text(_key),
95 | ),
96 | const Chip(
97 | avatar: CircleAvatar(
98 | backgroundColor: Colors.red,
99 | child: Text('iv'),
100 | ),
101 | label: Text(_iv),
102 | ),
103 | const Divider(),
104 | _build('Data', _encrypt?.toString() ?? '', _decrypt ?? ''),
105 | const Divider(),
106 | _build('Hex', _encryptHex ?? '', _decryptHex ?? ''),
107 | const Divider(),
108 | _build('Base64', _encryptBase64, _decryptBase64 ?? ''),
109 | const Divider(),
110 | ],
111 | ),
112 | ),
113 | ),
114 | ),
115 | );
116 | }
117 |
118 | Widget _build(String tag, String string, String result) {
119 | return Row(
120 | children: [
121 | ClipRRect(
122 | borderRadius: BorderRadius.circular(5),
123 | child: Container(
124 | width: 60,
125 | padding: const EdgeInsets.all(3.0),
126 | color: Colors.grey.shade800,
127 | child: Text(
128 | tag,
129 | textAlign: TextAlign.center,
130 | style: const TextStyle(
131 | color: Colors.white,
132 | ),
133 | ),
134 | ),
135 | ),
136 | const SizedBox(
137 | width: 15,
138 | ),
139 | Expanded(
140 | child: Column(
141 | children: [
142 | Text(
143 | string,
144 | softWrap: true,
145 | maxLines: 100,
146 | ),
147 | const Divider(),
148 | Text(
149 | result,
150 | softWrap: true,
151 | maxLines: 100,
152 | ),
153 | ],
154 | ),
155 | ),
156 | ],
157 | );
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import flutter_des
9 |
10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
11 | FlutterDesPlugin.register(with: registry.registrar(forPlugin: "FlutterDesPlugin"))
12 | }
13 |
--------------------------------------------------------------------------------
/example/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.14'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | target 'RunnerTests' do
35 | inherit! :search_paths
36 | end
37 | end
38 |
39 | post_install do |installer|
40 | installer.pods_project.targets.each do |target|
41 | flutter_additional_macos_build_settings(target)
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/example/macos/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - flutter_des (0.0.1):
3 | - FlutterMacOS
4 | - FlutterMacOS (1.0.0)
5 |
6 | DEPENDENCIES:
7 | - flutter_des (from `Flutter/ephemeral/.symlinks/plugins/flutter_des/macos`)
8 | - FlutterMacOS (from `Flutter/ephemeral`)
9 |
10 | EXTERNAL SOURCES:
11 | flutter_des:
12 | :path: Flutter/ephemeral/.symlinks/plugins/flutter_des/macos
13 | FlutterMacOS:
14 | :path: Flutter/ephemeral
15 |
16 | SPEC CHECKSUMS:
17 | flutter_des: 2199459307c37443919645c5b1c84d284a4cecbf
18 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
19 |
20 | PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
21 |
22 | COCOAPODS: 1.16.2
23 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
65 |
71 |
72 |
73 |
74 |
80 |
82 |
88 |
89 |
90 |
91 |
93 |
94 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @main
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info": {
3 | "version": 1,
4 | "author": "xcode"
5 | },
6 | "images": [
7 | {
8 | "size": "16x16",
9 | "idiom": "mac",
10 | "filename": "app_icon_16.png",
11 | "scale": "1x"
12 | },
13 | {
14 | "size": "16x16",
15 | "idiom": "mac",
16 | "filename": "app_icon_32.png",
17 | "scale": "2x"
18 | },
19 | {
20 | "size": "32x32",
21 | "idiom": "mac",
22 | "filename": "app_icon_32.png",
23 | "scale": "1x"
24 | },
25 | {
26 | "size": "32x32",
27 | "idiom": "mac",
28 | "filename": "app_icon_64.png",
29 | "scale": "2x"
30 | },
31 | {
32 | "size": "128x128",
33 | "idiom": "mac",
34 | "filename": "app_icon_128.png",
35 | "scale": "1x"
36 | },
37 | {
38 | "size": "128x128",
39 | "idiom": "mac",
40 | "filename": "app_icon_256.png",
41 | "scale": "2x"
42 | },
43 | {
44 | "size": "256x256",
45 | "idiom": "mac",
46 | "filename": "app_icon_256.png",
47 | "scale": "1x"
48 | },
49 | {
50 | "size": "256x256",
51 | "idiom": "mac",
52 | "filename": "app_icon_512.png",
53 | "scale": "2x"
54 | },
55 | {
56 | "size": "512x512",
57 | "idiom": "mac",
58 | "filename": "app_icon_512.png",
59 | "scale": "1x"
60 | },
61 | {
62 | "size": "512x512",
63 | "idiom": "mac",
64 | "filename": "app_icon_1024.png",
65 | "scale": "2x"
66 | }
67 | ]
68 | }
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/example/macos/Runner/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = flutter_des_example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.octmon.flutterDesExample
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.octmon. All rights reserved.
15 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 | import XCTest
4 |
5 |
6 | @testable import flutter_des
7 |
8 | // This demonstrates a simple unit test of the Swift portion of this plugin's implementation.
9 | //
10 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
11 |
12 | class RunnerTests: XCTestCase {
13 |
14 | func testGetPlatformVersion() {
15 | let plugin = FlutterDesPlugin()
16 |
17 | let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: [])
18 |
19 | let resultExpectation = expectation(description: "result block must be called.")
20 | plugin.handle(call) { result in
21 | XCTAssertEqual(result as! String,
22 | "macOS " + ProcessInfo.processInfo.operatingSystemVersionString)
23 | resultExpectation.fulfill()
24 | }
25 | waitForExpectations(timeout: 1)
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | sha256: "08064924cbf0ab88280a0c3f60db9dd24fec693927e725ecb176f16c629d1cb8"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "4.0.1"
12 | args:
13 | dependency: transitive
14 | description:
15 | name: args
16 | sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.6.0"
20 | async:
21 | dependency: transitive
22 | description:
23 | name: async
24 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "2.11.0"
28 | boolean_selector:
29 | dependency: transitive
30 | description:
31 | name: boolean_selector
32 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "2.1.1"
36 | characters:
37 | dependency: transitive
38 | description:
39 | name: characters
40 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.3.0"
44 | checked_yaml:
45 | dependency: transitive
46 | description:
47 | name: checked_yaml
48 | sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "2.0.3"
52 | cli_util:
53 | dependency: transitive
54 | description:
55 | name: cli_util
56 | sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
57 | url: "https://pub.dev"
58 | source: hosted
59 | version: "0.4.2"
60 | clock:
61 | dependency: transitive
62 | description:
63 | name: clock
64 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
65 | url: "https://pub.dev"
66 | source: hosted
67 | version: "1.1.1"
68 | collection:
69 | dependency: transitive
70 | description:
71 | name: collection
72 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
73 | url: "https://pub.dev"
74 | source: hosted
75 | version: "1.18.0"
76 | crypto:
77 | dependency: transitive
78 | description:
79 | name: crypto
80 | sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
81 | url: "https://pub.dev"
82 | source: hosted
83 | version: "3.0.6"
84 | cupertino_icons:
85 | dependency: "direct main"
86 | description:
87 | name: cupertino_icons
88 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
89 | url: "https://pub.dev"
90 | source: hosted
91 | version: "1.0.8"
92 | fake_async:
93 | dependency: transitive
94 | description:
95 | name: fake_async
96 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
97 | url: "https://pub.dev"
98 | source: hosted
99 | version: "1.3.1"
100 | ffi:
101 | dependency: transitive
102 | description:
103 | name: ffi
104 | sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
105 | url: "https://pub.dev"
106 | source: hosted
107 | version: "2.1.3"
108 | file:
109 | dependency: transitive
110 | description:
111 | name: file
112 | sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
113 | url: "https://pub.dev"
114 | source: hosted
115 | version: "7.0.0"
116 | flutter:
117 | dependency: "direct main"
118 | description: flutter
119 | source: sdk
120 | version: "0.0.0"
121 | flutter_des:
122 | dependency: "direct main"
123 | description:
124 | path: ".."
125 | relative: true
126 | source: path
127 | version: "3.0.0"
128 | flutter_driver:
129 | dependency: transitive
130 | description: flutter
131 | source: sdk
132 | version: "0.0.0"
133 | flutter_launcher_icons:
134 | dependency: "direct dev"
135 | description:
136 | name: flutter_launcher_icons
137 | sha256: "31cd0885738e87c72d6f055564d37fabcdacee743b396b78c7636c169cac64f5"
138 | url: "https://pub.dev"
139 | source: hosted
140 | version: "0.14.2"
141 | flutter_lints:
142 | dependency: "direct dev"
143 | description:
144 | name: flutter_lints
145 | sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
146 | url: "https://pub.dev"
147 | source: hosted
148 | version: "4.0.0"
149 | flutter_test:
150 | dependency: "direct dev"
151 | description: flutter
152 | source: sdk
153 | version: "0.0.0"
154 | fuchsia_remote_debug_protocol:
155 | dependency: transitive
156 | description: flutter
157 | source: sdk
158 | version: "0.0.0"
159 | image:
160 | dependency: transitive
161 | description:
162 | name: image
163 | sha256: "20842a5ad1555be624c314b0c0cc0566e8ece412f61e859a42efeb6d4101a26c"
164 | url: "https://pub.dev"
165 | source: hosted
166 | version: "4.5.0"
167 | integration_test:
168 | dependency: "direct dev"
169 | description: flutter
170 | source: sdk
171 | version: "0.0.0"
172 | json_annotation:
173 | dependency: transitive
174 | description:
175 | name: json_annotation
176 | sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
177 | url: "https://pub.dev"
178 | source: hosted
179 | version: "4.9.0"
180 | leak_tracker:
181 | dependency: transitive
182 | description:
183 | name: leak_tracker
184 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
185 | url: "https://pub.dev"
186 | source: hosted
187 | version: "10.0.5"
188 | leak_tracker_flutter_testing:
189 | dependency: transitive
190 | description:
191 | name: leak_tracker_flutter_testing
192 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
193 | url: "https://pub.dev"
194 | source: hosted
195 | version: "3.0.5"
196 | leak_tracker_testing:
197 | dependency: transitive
198 | description:
199 | name: leak_tracker_testing
200 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
201 | url: "https://pub.dev"
202 | source: hosted
203 | version: "3.0.1"
204 | lints:
205 | dependency: transitive
206 | description:
207 | name: lints
208 | sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
209 | url: "https://pub.dev"
210 | source: hosted
211 | version: "4.0.0"
212 | matcher:
213 | dependency: transitive
214 | description:
215 | name: matcher
216 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
217 | url: "https://pub.dev"
218 | source: hosted
219 | version: "0.12.16+1"
220 | material_color_utilities:
221 | dependency: transitive
222 | description:
223 | name: material_color_utilities
224 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
225 | url: "https://pub.dev"
226 | source: hosted
227 | version: "0.11.1"
228 | meta:
229 | dependency: transitive
230 | description:
231 | name: meta
232 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
233 | url: "https://pub.dev"
234 | source: hosted
235 | version: "1.15.0"
236 | path:
237 | dependency: transitive
238 | description:
239 | name: path
240 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
241 | url: "https://pub.dev"
242 | source: hosted
243 | version: "1.9.0"
244 | petitparser:
245 | dependency: transitive
246 | description:
247 | name: petitparser
248 | sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
249 | url: "https://pub.dev"
250 | source: hosted
251 | version: "6.0.2"
252 | platform:
253 | dependency: transitive
254 | description:
255 | name: platform
256 | sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
257 | url: "https://pub.dev"
258 | source: hosted
259 | version: "3.1.5"
260 | plugin_platform_interface:
261 | dependency: transitive
262 | description:
263 | name: plugin_platform_interface
264 | sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
265 | url: "https://pub.dev"
266 | source: hosted
267 | version: "2.1.8"
268 | posix:
269 | dependency: transitive
270 | description:
271 | name: posix
272 | sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
273 | url: "https://pub.dev"
274 | source: hosted
275 | version: "6.0.1"
276 | process:
277 | dependency: transitive
278 | description:
279 | name: process
280 | sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32"
281 | url: "https://pub.dev"
282 | source: hosted
283 | version: "5.0.2"
284 | sky_engine:
285 | dependency: transitive
286 | description: flutter
287 | source: sdk
288 | version: "0.0.99"
289 | source_span:
290 | dependency: transitive
291 | description:
292 | name: source_span
293 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
294 | url: "https://pub.dev"
295 | source: hosted
296 | version: "1.10.0"
297 | stack_trace:
298 | dependency: transitive
299 | description:
300 | name: stack_trace
301 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
302 | url: "https://pub.dev"
303 | source: hosted
304 | version: "1.11.1"
305 | stream_channel:
306 | dependency: transitive
307 | description:
308 | name: stream_channel
309 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
310 | url: "https://pub.dev"
311 | source: hosted
312 | version: "2.1.2"
313 | string_scanner:
314 | dependency: transitive
315 | description:
316 | name: string_scanner
317 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
318 | url: "https://pub.dev"
319 | source: hosted
320 | version: "1.2.0"
321 | sync_http:
322 | dependency: transitive
323 | description:
324 | name: sync_http
325 | sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
326 | url: "https://pub.dev"
327 | source: hosted
328 | version: "0.3.1"
329 | term_glyph:
330 | dependency: transitive
331 | description:
332 | name: term_glyph
333 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
334 | url: "https://pub.dev"
335 | source: hosted
336 | version: "1.2.1"
337 | test_api:
338 | dependency: transitive
339 | description:
340 | name: test_api
341 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
342 | url: "https://pub.dev"
343 | source: hosted
344 | version: "0.7.2"
345 | typed_data:
346 | dependency: transitive
347 | description:
348 | name: typed_data
349 | sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
350 | url: "https://pub.dev"
351 | source: hosted
352 | version: "1.4.0"
353 | vector_math:
354 | dependency: transitive
355 | description:
356 | name: vector_math
357 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
358 | url: "https://pub.dev"
359 | source: hosted
360 | version: "2.1.4"
361 | vm_service:
362 | dependency: transitive
363 | description:
364 | name: vm_service
365 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
366 | url: "https://pub.dev"
367 | source: hosted
368 | version: "14.2.5"
369 | webdriver:
370 | dependency: transitive
371 | description:
372 | name: webdriver
373 | sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e"
374 | url: "https://pub.dev"
375 | source: hosted
376 | version: "3.0.3"
377 | xml:
378 | dependency: transitive
379 | description:
380 | name: xml
381 | sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
382 | url: "https://pub.dev"
383 | source: hosted
384 | version: "6.5.0"
385 | yaml:
386 | dependency: transitive
387 | description:
388 | name: yaml
389 | sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
390 | url: "https://pub.dev"
391 | source: hosted
392 | version: "3.1.2"
393 | sdks:
394 | dart: ">=3.5.4 <4.0.0"
395 | flutter: ">=3.18.0-18.0.pre.54"
396 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_des_example
2 | description: "Demonstrates how to use the flutter_des plugin."
3 | # The following line prevents the package from being accidentally published to
4 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
6 |
7 | environment:
8 | sdk: ^3.5.4
9 |
10 | # Dependencies specify other packages that your package needs in order to work.
11 | # To automatically upgrade your package dependencies to the latest versions
12 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
13 | # dependencies can be manually updated by changing the version numbers below to
14 | # the latest version available on pub.dev. To see which dependencies have newer
15 | # versions available, run `flutter pub outdated`.
16 | dependencies:
17 | flutter:
18 | sdk: flutter
19 |
20 | flutter_des:
21 | # When depending on this package from a real application you should use:
22 | # flutter_des: ^x.y.z
23 | # See https://dart.dev/tools/pub/dependencies#version-constraints
24 | # The example app is bundled with the plugin so we use a path dependency on
25 | # the parent directory to use the current plugin's version.
26 | path: ../
27 |
28 | # The following adds the Cupertino Icons font to your application.
29 | # Use with the CupertinoIcons class for iOS style icons.
30 | cupertino_icons: ^1.0.8
31 |
32 | dev_dependencies:
33 | integration_test:
34 | sdk: flutter
35 | flutter_test:
36 | sdk: flutter
37 |
38 | # The "flutter_lints" package below contains a set of recommended lints to
39 | # encourage good coding practices. The lint set provided by the package is
40 | # activated in the `analysis_options.yaml` file located at the root of your
41 | # package. See that file for information about deactivating specific lint
42 | # rules and activating additional ones.
43 | flutter_lints: ^4.0.0
44 |
45 | # ===============================================================================
46 | # A command-line tool which simplifies the task of updating your Flutter app's launcher icon.
47 | # Fully flexible, allowing you to choose what platform you wish to update the launcher icon
48 | # for and if you want, the option to keep your old launcher icon in case you want to revert
49 | # back sometime in the future.
50 | # pub: https://pub.dev/packages/flutter_launcher_icons
51 | # git: https://github.com/fluttercommunity/flutter_launcher_icons
52 | # ===============================================================================
53 | flutter_launcher_icons: ^0.14.2
54 |
55 | # For information on the generic Dart part of this file, see the
56 | # following page: https://dart.dev/tools/pub/pubspec
57 |
58 | # The following section is specific to Flutter packages.
59 | flutter:
60 |
61 | # The following line ensures that the Material Icons font is
62 | # included with your application, so that you can use the icons in
63 | # the material Icons class.
64 | uses-material-design: true
65 |
66 | # To add assets to your application, add an assets section, like this:
67 | # assets:
68 | # - images/a_dot_burr.jpeg
69 | # - images/a_dot_ham.jpeg
70 |
71 | # An image asset can refer to one or more resolution-specific "variants", see
72 | # https://flutter.dev/to/resolution-aware-images
73 |
74 | # For details regarding adding assets from package dependencies, see
75 | # https://flutter.dev/to/asset-from-package
76 |
77 | # To add custom fonts to your application, add a fonts section here,
78 | # in this "flutter" section. Each entry in this list should have a
79 | # "family" key with the font family name, and a "fonts" key with a
80 | # list giving the asset and other descriptors for the font. For
81 | # example:
82 | # fonts:
83 | # - family: Schyler
84 | # fonts:
85 | # - asset: fonts/Schyler-Regular.ttf
86 | # - asset: fonts/Schyler-Italic.ttf
87 | # style: italic
88 | # - family: Trajan Pro
89 | # fonts:
90 | # - asset: fonts/TrajanPro.ttf
91 | # - asset: fonts/TrajanPro_Bold.ttf
92 | # weight: 700
93 | #
94 | # For details regarding fonts from package dependencies,
95 | # see https://flutter.dev/to/font-from-package
96 |
97 | # 执行命令:
98 | # dart run flutter_launcher_icons
99 | flutter_launcher_icons:
100 | image_path: "icons/icon.png"
101 | # image_path_android: "icons/ic_launcher.png"
102 | # image_path_ios: "icons/ios_marketing.png"
103 | android: true # can specify file name here e.g. "ic_launcher"
104 | ios: true # can specify file name here e.g. "My-Launcher-Icon"
105 | adaptive_icon_background: "#ffffff" # only available for Android 8.0 devices and above
106 | adaptive_icon_foreground: "icons/icon.png" # only available for Android 8.0 devices and above
107 | macos:
108 | generate: true
109 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility in the flutter_test package. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:flutter_des_example/main.dart';
12 |
13 | void main() {
14 | testWidgets('Verify Platform version', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(const MyApp());
17 |
18 | // Verify that platform version is retrieved.
19 | expect(
20 | find.byWidgetPredicate(
21 | (Widget widget) =>
22 | widget is Text && widget.data!.startsWith('Running on:'),
23 | ),
24 | findsOneWidget,
25 | );
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/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 | /Flutter/ephemeral/
38 | /Flutter/flutter_export_environment.sh
39 |
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OctMon/flutter_des/9151b547832a7bd8c808fc3b48e1346d7a09cd37/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/FlutterDesPlugin.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import CommonCrypto
4 |
5 | public class FlutterDesPlugin: NSObject, FlutterPlugin {
6 | public static func register(with registrar: FlutterPluginRegistrar) {
7 | let channel = FlutterMethodChannel(name: "flutter_des", binaryMessenger: registrar.messenger())
8 | let instance = FlutterDesPlugin()
9 | registrar.addMethodCallDelegate(instance, channel: channel)
10 | }
11 |
12 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
13 | let arguments = call.arguments as? [Any] ?? []
14 | guard arguments.count > 2 else {
15 | result(nil)
16 | return
17 | }
18 | let key = arguments[1] as? String ?? ""
19 | let iv = arguments[2] as? String ?? ""
20 | switch call.method {
21 | case "encrypt":
22 | encrypt(string: arguments[0] as? String ?? "", key: key, iv: iv, result: result)
23 | case "encryptToHex":
24 | encryptToHex(string: arguments[0] as? String ?? "", key: key, iv: iv, result: result)
25 | case "decrypt":
26 | if let data = arguments[0] as? FlutterStandardTypedData {
27 | decrypt(data: data.data, key: key, iv: iv, result: result)
28 | } else {
29 | result(nil)
30 | }
31 | case "decryptFromHex":
32 | decryptFromHex(string: arguments[0] as? String ?? "", key: key, iv: iv, result: result)
33 | default:
34 | result(nil)
35 | break
36 | }
37 | }
38 |
39 | func encryptToHex(string: String, key: String, iv: String, result: FlutterResult) {
40 | result(encrypt(string: string, key: key, iv: iv)?.toHexString)
41 | }
42 |
43 | func encrypt(string: String, key: String, iv: String, result: FlutterResult) {
44 | result(encrypt(string: string, key: key, iv: iv))
45 | }
46 |
47 | func encrypt(string: String, key: String, iv: String) -> Data? {
48 | return string.data(using: .utf8)?.crypt(operation: CCOperation(kCCEncrypt), key: key, iv: iv)
49 | }
50 |
51 | func decryptFromHex(string: String, key: String, iv: String, result: FlutterResult) {
52 | result(decrypt(data: string.hexToData, key: key, iv: iv))
53 | }
54 |
55 | func decrypt(data: Data, key: String, iv: String, result: FlutterResult) {
56 | result(decrypt(data: data, key: key, iv: iv))
57 | }
58 |
59 | func decrypt(data: Data, key: String, iv: String) -> String? {
60 | guard let data = data.crypt(operation: CCOperation(kCCDecrypt), key: key, iv: iv) else {
61 | return nil
62 | }
63 | return String(data: data, encoding: .utf8)
64 | }
65 |
66 | }
67 |
68 | private extension Data {
69 |
70 | func crypt(operation: CCOperation, key: String, iv: String) -> Data? {
71 | let algorithm = kCCAlgorithmDES
72 | let options = kCCOptionPKCS7Padding
73 | let keyData = [UInt8](key.data(using: .utf8) ?? Data())
74 | let ivData = [UInt8](iv.data(using: .utf8) ?? Data())
75 | let keyLength = kCCKeySizeDES
76 | let dataIn = [UInt8](self)
77 | let dataInLength = self.count
78 | let dataOutAvailable = dataInLength + kCCBlockSizeDES
79 | let dataOut = UnsafeMutablePointer.allocate(capacity: dataOutAvailable)
80 | var dataOutMoved = 0
81 |
82 | let cryptStatus = CCCrypt(
83 | CCOperation(operation), //加密(解密)模式 kCCEncrypt:加密, kCCDecrypt:解密
84 | CCAlgorithm(algorithm), //加密(解密)方式
85 | CCOptions(options), //填充算法
86 | keyData, //密钥(超出密钥长度的部分将被忽略)
87 | keyLength, //密钥长度
88 | ivData, //初始化向量
89 | dataIn, //待加密(待解密)的数据
90 | dataInLength, //待加密(待解密)的数据长度
91 | dataOut, //将输出的已加密(已解密)数据的缓冲区
92 | dataOutAvailable, //将输出的已加密(已解密)数据的缓冲区长度
93 | &dataOutMoved) //将输出的已加密(已解密)数据的实际长度
94 |
95 | if cryptStatus == kCCSuccess {
96 | let result = Data(bytes: dataOut, count: dataOutMoved)
97 | dataOut.deallocate()
98 | return result
99 | } else {
100 | print("\(#function) error = \(cryptStatus)")
101 | dataOut.deallocate()
102 | return nil
103 | }
104 | }
105 |
106 | }
107 |
108 | private extension Data {
109 |
110 | var toHexString: String {
111 | return toHexString()
112 | }
113 |
114 | var toHexLowercasedString: String {
115 | return toHexString(isLowercased: true)
116 | }
117 |
118 | private func toHexString(isLowercased: Bool = false) -> String {
119 | return map { String(format: "%02\(isLowercased ? "x" : "X")", $0) }.joined(separator: "")
120 | }
121 |
122 | }
123 |
124 | private extension String {
125 |
126 | /// 16进制字符串转为Data
127 | var hexToData: Data {
128 | let bytes = hexToBytes
129 | #if swift(>=4.2)
130 | return Data(bytes)
131 | #else
132 | return Data(bytes: bytes)
133 | #endif
134 | }
135 |
136 | /// 16进制字符串转为 [UInt8]
137 | var hexToBytes: [UInt8] {
138 | assert(count % 2 == 0, "输入字符串格式不对,8位代表一个字符")
139 | var bytes = [UInt8]()
140 | var sum = 0
141 | // 整形 utf8 编码范围
142 | let intRange = 48...57
143 | // 小写 a~f 的 utf8 的编码范围
144 | let lowercaseRange = 97...102
145 | // 大写 A~F 的 utf8 的编码范围
146 | let uppercasedRange = 65...70
147 | for (index, c) in utf8CString.enumerated() {
148 | var intC = Int(c.byteSwapped)
149 | if intC == 0 {
150 | break
151 | } else if intRange.contains(intC) {
152 | intC -= 48
153 | } else if lowercaseRange.contains(intC) {
154 | intC -= 87
155 | } else if uppercasedRange.contains(intC) {
156 | intC -= 55
157 | } else {
158 | assertionFailure("输入字符串格式不对,每个字符都需要在0~9,a~f,A~F范围内")
159 | }
160 | sum = sum * 16 + intC
161 | // 每两个十六进制字母代表8位,即一个字节
162 | if index % 2 != 0 {
163 | bytes.append(UInt8(sum))
164 | sum = 0
165 | }
166 | }
167 | return bytes
168 | }
169 |
170 | }
171 |
--------------------------------------------------------------------------------
/ios/Resources/PrivacyInfo.xcprivacy:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrivacyTrackingDomains
6 |
7 | NSPrivacyAccessedAPITypes
8 |
9 | NSPrivacyCollectedDataTypes
10 |
11 | NSPrivacyTracking
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ios/flutter_des.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
3 | # Run `pod lib lint flutter_des.podspec` to validate before publishing.
4 | #
5 | Pod::Spec.new do |s|
6 | s.name = 'flutter_des'
7 | s.version = '0.0.1'
8 | s.summary = 'Java, Android, iOS, macOS, get the same result by DES encryption and decryption.'
9 | s.description = <<-DESC
10 | Java, Android, iOS, macOS, get the same result by DES encryption and decryption.
11 | DESC
12 | s.homepage = 'http://example.com'
13 | s.license = { :file => '../LICENSE' }
14 | s.author = { 'Your Company' => 'email@example.com' }
15 | s.source = { :path => '.' }
16 | s.source_files = 'Classes/**/*'
17 | s.dependency 'Flutter'
18 | s.platform = :ios, '12.0'
19 |
20 | # Flutter.framework does not contain a i386 slice.
21 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
22 | s.swift_version = '5.0'
23 |
24 | # If your plugin requires a privacy manifest, for example if it uses any
25 | # required reason APIs, update the PrivacyInfo.xcprivacy file to describe your
26 | # plugin's privacy impact, and then uncomment this line. For more information,
27 | # see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
28 | # s.resource_bundles = {'flutter_des_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
29 | end
30 |
--------------------------------------------------------------------------------
/lib/flutter_des.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/foundation.dart';
4 |
5 | import 'flutter_des_platform_interface.dart';
6 |
7 | const String _iv = '01234567';
8 |
9 | class FlutterDes {
10 | static Future encrypt(String string, String key,
11 | {String iv = _iv}) async {
12 | if (string.isEmpty) {
13 | return null;
14 | }
15 | final Uint8List? crypt =
16 | await FlutterDesPlatform.instance.encrypt(string, key, iv: iv);
17 | return crypt;
18 | }
19 |
20 | static Future encryptToHex(String string, String key,
21 | {String iv = _iv}) async {
22 | if (string.isEmpty) {
23 | return '';
24 | }
25 | final String? crypt =
26 | await FlutterDesPlatform.instance.encryptToHex(string, key, iv: iv);
27 | return crypt;
28 | }
29 |
30 | static Future encryptToBase64(String string, String key,
31 | {String iv = _iv}) async {
32 | if (string.isEmpty) {
33 | return '';
34 | }
35 | final String crypt = base64Encode(
36 | await (encrypt(string, key, iv: iv)) ?? Uint8List.fromList([]));
37 | return crypt;
38 | }
39 |
40 | static Future decrypt(Uint8List data, String key,
41 | {String iv = _iv}) async {
42 | final String? crypt =
43 | await FlutterDesPlatform.instance.decrypt(data, key, iv: iv);
44 | return crypt;
45 | }
46 |
47 | static Future decryptFromHex(String? hex, String key,
48 | {String iv = _iv}) async {
49 | final String? crypt =
50 | await FlutterDesPlatform.instance.decryptFromHex(hex, key, iv: iv);
51 | return crypt;
52 | }
53 |
54 | static Future decryptFromBase64(String base64, String key,
55 | {String iv = _iv}) async {
56 | final String? crypt = await decrypt(base64Decode(base64), key, iv: iv);
57 | return crypt;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/flutter_des_method_channel.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/foundation.dart';
4 | import 'package:flutter/services.dart';
5 |
6 | import 'flutter_des_platform_interface.dart';
7 |
8 | const String _iv = '01234567';
9 |
10 | /// An implementation of [FlutterDesPlatform] that uses method channels.
11 | class MethodChannelFlutterDes extends FlutterDesPlatform {
12 | /// The method channel used to interact with the native platform.
13 | @visibleForTesting
14 | final methodChannel = const MethodChannel('flutter_des');
15 |
16 | @override
17 | Future encrypt(String string, String key,
18 | {String iv = _iv}) async {
19 | if (string.isEmpty) {
20 | return null;
21 | }
22 | final Uint8List? crypt =
23 | await methodChannel.invokeMethod('encrypt', [string, key, iv]);
24 | return crypt;
25 | }
26 |
27 | @override
28 | Future encryptToHex(String string, String key,
29 | {String iv = _iv}) async {
30 | if (string.isEmpty) {
31 | return '';
32 | }
33 | final String? crypt =
34 | await methodChannel.invokeMethod('encryptToHex', [string, key, iv]);
35 | return crypt;
36 | }
37 |
38 | @override
39 | Future encryptToBase64(String string, String key,
40 | {String iv = _iv}) async {
41 | if (string.isEmpty) {
42 | return '';
43 | }
44 | final String crypt = base64Encode(
45 | await (encrypt(string, key, iv: iv)) ?? Uint8List.fromList([]));
46 | return crypt;
47 | }
48 |
49 | @override
50 | Future decrypt(Uint8List data, String key, {String iv = _iv}) async {
51 | final String? crypt =
52 | await methodChannel.invokeMethod('decrypt', [data, key, iv]);
53 | return crypt;
54 | }
55 |
56 | @override
57 | Future decryptFromHex(String? hex, String key,
58 | {String iv = _iv}) async {
59 | final String? crypt =
60 | await methodChannel.invokeMethod('decryptFromHex', [hex, key, iv]);
61 | return crypt;
62 | }
63 |
64 | @override
65 | Future decryptFromBase64(String base64, String key,
66 | {String iv = _iv}) async {
67 | final String? crypt = await decrypt(base64Decode(base64), key, iv: iv);
68 | return crypt;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/lib/flutter_des_platform_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:plugin_platform_interface/plugin_platform_interface.dart';
3 |
4 | import 'flutter_des_method_channel.dart';
5 |
6 | const String _iv = '01234567';
7 |
8 | abstract class FlutterDesPlatform extends PlatformInterface {
9 | /// Constructs a FlutterDesPlatform.
10 | FlutterDesPlatform() : super(token: _token);
11 |
12 | static final Object _token = Object();
13 |
14 | static FlutterDesPlatform _instance = MethodChannelFlutterDes();
15 |
16 | /// The default instance of [FlutterDesPlatform] to use.
17 | ///
18 | /// Defaults to [MethodChannelFlutterDes].
19 | static FlutterDesPlatform get instance => _instance;
20 |
21 | /// Platform-specific implementations should set this with their own
22 | /// platform-specific class that extends [FlutterDesPlatform] when
23 | /// they register themselves.
24 | static set instance(FlutterDesPlatform instance) {
25 | PlatformInterface.verifyToken(instance, _token);
26 | _instance = instance;
27 | }
28 |
29 | Future getPlatformVersion() {
30 | throw UnimplementedError('platformVersion() has not been implemented.');
31 | }
32 |
33 | Future encrypt(String string, String key,
34 | {String iv = _iv}) async {
35 | throw UnimplementedError('encrypt() has not been implemented.');
36 | }
37 |
38 | Future encryptToHex(String string, String key,
39 | {String iv = _iv}) async {
40 | throw UnimplementedError('encryptToHex() has not been implemented.');
41 | }
42 |
43 | Future encryptToBase64(String string, String key,
44 | {String iv = _iv}) async {
45 | throw UnimplementedError('encryptToBase64() has not been implemented.');
46 | }
47 |
48 | Future decrypt(Uint8List data, String key, {String iv = _iv}) async {
49 | throw UnimplementedError('decrypt() has not been implemented.');
50 | }
51 |
52 | Future decryptFromHex(String? hex, String key,
53 | {String iv = _iv}) async {
54 | throw UnimplementedError('decryptFromHex() has not been implemented.');
55 | }
56 |
57 | Future decryptFromBase64(String base64, String key,
58 | {String iv = _iv}) async {
59 | throw UnimplementedError('decryptFromBase64() has not been implemented.');
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/macos/Classes/FlutterDesPlugin.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 | import CommonCrypto
4 |
5 | public class FlutterDesPlugin: NSObject, FlutterPlugin {
6 | public static func register(with registrar: FlutterPluginRegistrar) {
7 | let channel = FlutterMethodChannel(name: "flutter_des", binaryMessenger: registrar.messenger)
8 | let instance = FlutterDesPlugin()
9 | registrar.addMethodCallDelegate(instance, channel: channel)
10 | }
11 |
12 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
13 | let arguments = call.arguments as? [Any] ?? []
14 | guard arguments.count > 2 else {
15 | result(nil)
16 | return
17 | }
18 | let key = arguments[1] as? String ?? ""
19 | let iv = arguments[2] as? String ?? ""
20 | switch call.method {
21 | case "encrypt":
22 | encrypt(string: arguments[0] as? String ?? "", key: key, iv: iv, result: result)
23 | case "encryptToHex":
24 | encryptToHex(string: arguments[0] as? String ?? "", key: key, iv: iv, result: result)
25 | case "decrypt":
26 | if let data = arguments[0] as? FlutterStandardTypedData {
27 | decrypt(data: data.data, key: key, iv: iv, result: result)
28 | } else {
29 | result(nil)
30 | }
31 | case "decryptFromHex":
32 | decryptFromHex(string: arguments[0] as? String ?? "", key: key, iv: iv, result: result)
33 | default:
34 | result(nil)
35 | break
36 | }
37 | }
38 |
39 | func encryptToHex(string: String, key: String, iv: String, result: FlutterResult) {
40 | result(encrypt(string: string, key: key, iv: iv)?.toHexString)
41 | }
42 |
43 | func encrypt(string: String, key: String, iv: String, result: FlutterResult) {
44 | result(encrypt(string: string, key: key, iv: iv))
45 | }
46 |
47 | func encrypt(string: String, key: String, iv: String) -> Data? {
48 | return string.data(using: .utf8)?.crypt(operation: CCOperation(kCCEncrypt), key: key, iv: iv)
49 | }
50 |
51 | func decryptFromHex(string: String, key: String, iv: String, result: FlutterResult) {
52 | result(decrypt(data: string.hexToData, key: key, iv: iv))
53 | }
54 |
55 | func decrypt(data: Data, key: String, iv: String, result: FlutterResult) {
56 | result(decrypt(data: data, key: key, iv: iv))
57 | }
58 |
59 | func decrypt(data: Data, key: String, iv: String) -> String? {
60 | guard let data = data.crypt(operation: CCOperation(kCCDecrypt), key: key, iv: iv) else {
61 | return nil
62 | }
63 | return String(data: data, encoding: .utf8)
64 | }
65 | }
66 |
67 | private extension Data {
68 |
69 | func crypt(operation: CCOperation, key: String, iv: String) -> Data? {
70 | let algorithm = kCCAlgorithmDES
71 | let options = kCCOptionPKCS7Padding
72 | let keyData = [UInt8](key.data(using: .utf8) ?? Data())
73 | let ivData = [UInt8](iv.data(using: .utf8) ?? Data())
74 | let keyLength = kCCKeySizeDES
75 | let dataIn = [UInt8](self)
76 | let dataInLength = self.count
77 | let dataOutAvailable = dataInLength + kCCBlockSizeDES
78 | let dataOut = UnsafeMutablePointer.allocate(capacity: dataOutAvailable)
79 | var dataOutMoved = 0
80 |
81 | let cryptStatus = CCCrypt(
82 | CCOperation(operation), //加密(解密)模式 kCCEncrypt:加密, kCCDecrypt:解密
83 | CCAlgorithm(algorithm), //加密(解密)方式
84 | CCOptions(options), //填充算法
85 | keyData, //密钥(超出密钥长度的部分将被忽略)
86 | keyLength, //密钥长度
87 | ivData, //初始化向量
88 | dataIn, //待加密(待解密)的数据
89 | dataInLength, //待加密(待解密)的数据长度
90 | dataOut, //将输出的已加密(已解密)数据的缓冲区
91 | dataOutAvailable, //将输出的已加密(已解密)数据的缓冲区长度
92 | &dataOutMoved) //将输出的已加密(已解密)数据的实际长度
93 |
94 | if cryptStatus == kCCSuccess {
95 | let result = Data(bytes: dataOut, count: dataOutMoved)
96 | dataOut.deallocate()
97 | return result
98 | } else {
99 | print("\(#function) error = \(cryptStatus)")
100 | dataOut.deallocate()
101 | return nil
102 | }
103 | }
104 |
105 | }
106 |
107 | private extension Data {
108 |
109 | var toHexString: String {
110 | return toHexString()
111 | }
112 |
113 | var toHexLowercasedString: String {
114 | return toHexString(isLowercased: true)
115 | }
116 |
117 | private func toHexString(isLowercased: Bool = false) -> String {
118 | return map { String(format: "%02\(isLowercased ? "x" : "X")", $0) }.joined(separator: "")
119 | }
120 |
121 | }
122 |
123 | private extension String {
124 |
125 | /// 16进制字符串转为Data
126 | var hexToData: Data {
127 | let bytes = hexToBytes
128 | #if swift(>=4.2)
129 | return Data(bytes)
130 | #else
131 | return Data(bytes: bytes)
132 | #endif
133 | }
134 |
135 | /// 16进制字符串转为 [UInt8]
136 | var hexToBytes: [UInt8] {
137 | assert(count % 2 == 0, "输入字符串格式不对,8位代表一个字符")
138 | var bytes = [UInt8]()
139 | var sum = 0
140 | // 整形 utf8 编码范围
141 | let intRange = 48...57
142 | // 小写 a~f 的 utf8 的编码范围
143 | let lowercaseRange = 97...102
144 | // 大写 A~F 的 utf8 的编码范围
145 | let uppercasedRange = 65...70
146 | for (index, c) in utf8CString.enumerated() {
147 | var intC = Int(c.byteSwapped)
148 | if intC == 0 {
149 | break
150 | } else if intRange.contains(intC) {
151 | intC -= 48
152 | } else if lowercaseRange.contains(intC) {
153 | intC -= 87
154 | } else if uppercasedRange.contains(intC) {
155 | intC -= 55
156 | } else {
157 | assertionFailure("输入字符串格式不对,每个字符都需要在0~9,a~f,A~F范围内")
158 | }
159 | sum = sum * 16 + intC
160 | // 每两个十六进制字母代表8位,即一个字节
161 | if index % 2 != 0 {
162 | bytes.append(UInt8(sum))
163 | sum = 0
164 | }
165 | }
166 | return bytes
167 | }
168 |
169 | }
170 |
--------------------------------------------------------------------------------
/macos/flutter_des.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
3 | # Run `pod lib lint flutter_des.podspec` to validate before publishing.
4 | #
5 | Pod::Spec.new do |s|
6 | s.name = 'flutter_des'
7 | s.version = '0.0.1'
8 | s.summary = 'Java, Android, iOS, macOS, get the same result by DES encryption and decryption.'
9 | s.description = <<-DESC
10 | Java, Android, iOS, macOS, get the same result by DES encryption and decryption.
11 | DESC
12 | s.homepage = 'http://example.com'
13 | s.license = { :file => '../LICENSE' }
14 | s.author = { 'Your Company' => 'email@example.com' }
15 |
16 | s.source = { :path => '.' }
17 | s.source_files = 'Classes/**/*'
18 | s.dependency 'FlutterMacOS'
19 |
20 | s.platform = :osx, '10.11'
21 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
22 | s.swift_version = '5.0'
23 | end
24 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | fake_async:
45 | dependency: transitive
46 | description:
47 | name: fake_async
48 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.3.1"
52 | flutter:
53 | dependency: "direct main"
54 | description: flutter
55 | source: sdk
56 | version: "0.0.0"
57 | flutter_lints:
58 | dependency: "direct dev"
59 | description:
60 | name: flutter_lints
61 | sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
62 | url: "https://pub.dev"
63 | source: hosted
64 | version: "4.0.0"
65 | flutter_test:
66 | dependency: "direct dev"
67 | description: flutter
68 | source: sdk
69 | version: "0.0.0"
70 | leak_tracker:
71 | dependency: transitive
72 | description:
73 | name: leak_tracker
74 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
75 | url: "https://pub.dev"
76 | source: hosted
77 | version: "10.0.5"
78 | leak_tracker_flutter_testing:
79 | dependency: transitive
80 | description:
81 | name: leak_tracker_flutter_testing
82 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
83 | url: "https://pub.dev"
84 | source: hosted
85 | version: "3.0.5"
86 | leak_tracker_testing:
87 | dependency: transitive
88 | description:
89 | name: leak_tracker_testing
90 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
91 | url: "https://pub.dev"
92 | source: hosted
93 | version: "3.0.1"
94 | lints:
95 | dependency: transitive
96 | description:
97 | name: lints
98 | sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
99 | url: "https://pub.dev"
100 | source: hosted
101 | version: "4.0.0"
102 | matcher:
103 | dependency: transitive
104 | description:
105 | name: matcher
106 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
107 | url: "https://pub.dev"
108 | source: hosted
109 | version: "0.12.16+1"
110 | material_color_utilities:
111 | dependency: transitive
112 | description:
113 | name: material_color_utilities
114 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
115 | url: "https://pub.dev"
116 | source: hosted
117 | version: "0.11.1"
118 | meta:
119 | dependency: transitive
120 | description:
121 | name: meta
122 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
123 | url: "https://pub.dev"
124 | source: hosted
125 | version: "1.15.0"
126 | path:
127 | dependency: transitive
128 | description:
129 | name: path
130 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
131 | url: "https://pub.dev"
132 | source: hosted
133 | version: "1.9.0"
134 | plugin_platform_interface:
135 | dependency: "direct main"
136 | description:
137 | name: plugin_platform_interface
138 | sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
139 | url: "https://pub.dev"
140 | source: hosted
141 | version: "2.1.8"
142 | sky_engine:
143 | dependency: transitive
144 | description: flutter
145 | source: sdk
146 | version: "0.0.99"
147 | source_span:
148 | dependency: transitive
149 | description:
150 | name: source_span
151 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
152 | url: "https://pub.dev"
153 | source: hosted
154 | version: "1.10.0"
155 | stack_trace:
156 | dependency: transitive
157 | description:
158 | name: stack_trace
159 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
160 | url: "https://pub.dev"
161 | source: hosted
162 | version: "1.11.1"
163 | stream_channel:
164 | dependency: transitive
165 | description:
166 | name: stream_channel
167 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "2.1.2"
171 | string_scanner:
172 | dependency: transitive
173 | description:
174 | name: string_scanner
175 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
176 | url: "https://pub.dev"
177 | source: hosted
178 | version: "1.2.0"
179 | term_glyph:
180 | dependency: transitive
181 | description:
182 | name: term_glyph
183 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
184 | url: "https://pub.dev"
185 | source: hosted
186 | version: "1.2.1"
187 | test_api:
188 | dependency: transitive
189 | description:
190 | name: test_api
191 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
192 | url: "https://pub.dev"
193 | source: hosted
194 | version: "0.7.2"
195 | vector_math:
196 | dependency: transitive
197 | description:
198 | name: vector_math
199 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
200 | url: "https://pub.dev"
201 | source: hosted
202 | version: "2.1.4"
203 | vm_service:
204 | dependency: transitive
205 | description:
206 | name: vm_service
207 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
208 | url: "https://pub.dev"
209 | source: hosted
210 | version: "14.2.5"
211 | sdks:
212 | dart: ">=3.5.4 <4.0.0"
213 | flutter: ">=3.18.0-18.0.pre.54"
214 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_des
2 | description: "Java, Android, iOS, macOS, get the same result by DES encryption and decryption."
3 | version: 3.0.0
4 | homepage: https://github.com/OctMon/flutter_des
5 |
6 | environment:
7 | sdk: ^3.5.4
8 | flutter: '>=3.3.0'
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 | plugin_platform_interface: ^2.0.2
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 | flutter_lints: ^4.0.0
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://dart.dev/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter packages.
24 | flutter:
25 | # This section identifies this Flutter project as a plugin project.
26 | # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
27 | # which should be registered in the plugin registry. This is required for
28 | # using method channels.
29 | # The Android 'package' specifies package in which the registered class is.
30 | # This is required for using method channels on Android.
31 | # The 'ffiPlugin' specifies that native code should be built and bundled.
32 | # This is required for using `dart:ffi`.
33 | # All these are used by the tooling to maintain consistency when
34 | # adding or updating assets for this project.
35 | plugin:
36 | platforms:
37 | android:
38 | package: com.octmon.flutter_des
39 | pluginClass: FlutterDesPlugin
40 | ios:
41 | pluginClass: FlutterDesPlugin
42 | macos:
43 | pluginClass: FlutterDesPlugin
44 |
45 | # To add assets to your plugin package, add an assets section, like this:
46 | # assets:
47 | # - images/a_dot_burr.jpeg
48 | # - images/a_dot_ham.jpeg
49 | #
50 | # For details regarding assets in packages, see
51 | # https://flutter.dev/to/asset-from-package
52 | #
53 | # An image asset can refer to one or more resolution-specific "variants", see
54 | # https://flutter.dev/to/resolution-aware-images
55 |
56 | # To add custom fonts to your plugin package, add a fonts section here,
57 | # in this "flutter" section. Each entry in this list should have a
58 | # "family" key with the font family name, and a "fonts" key with a
59 | # list giving the asset and other descriptors for the font. For
60 | # example:
61 | # fonts:
62 | # - family: Schyler
63 | # fonts:
64 | # - asset: fonts/Schyler-Regular.ttf
65 | # - asset: fonts/Schyler-Italic.ttf
66 | # style: italic
67 | # - family: Trajan Pro
68 | # fonts:
69 | # - asset: fonts/TrajanPro.ttf
70 | # - asset: fonts/TrajanPro_Bold.ttf
71 | # weight: 700
72 | #
73 | # For details regarding fonts in packages, see
74 | # https://flutter.dev/to/font-from-package
75 |
--------------------------------------------------------------------------------
/test/flutter_des_method_channel_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 |
4 | void main() {
5 | TestWidgetsFlutterBinding.ensureInitialized();
6 |
7 | const MethodChannel channel = MethodChannel('flutter_des');
8 |
9 | setUp(() {
10 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
11 | .setMockMethodCallHandler(channel, (MethodCall methodCall) {
12 | return null;
13 | });
14 | });
15 |
16 | tearDown(() {
17 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
18 | .setMockMethodCallHandler(channel, null);
19 | });
20 | }
21 |
--------------------------------------------------------------------------------
/test/flutter_des_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter_test/flutter_test.dart';
3 | import 'package:flutter_des/flutter_des_platform_interface.dart';
4 | import 'package:flutter_des/flutter_des_method_channel.dart';
5 | import 'package:plugin_platform_interface/plugin_platform_interface.dart';
6 |
7 | const String _iv = '01234567';
8 |
9 | class MockFlutterDesPlatform
10 | with MockPlatformInterfaceMixin
11 | implements FlutterDesPlatform {
12 | @override
13 | Future getPlatformVersion() => Future.value('42');
14 |
15 | @override
16 | Future decrypt(Uint8List data, String key, {String iv = _iv}) {
17 | // TODO: implement decrypt
18 | throw UnimplementedError();
19 | }
20 |
21 | @override
22 | Future decryptFromBase64(String base64, String key,
23 | {String iv = _iv}) {
24 | // TODO: implement decryptFromBase64
25 | throw UnimplementedError();
26 | }
27 |
28 | @override
29 | Future decryptFromHex(String? hex, String key, {String iv = _iv}) {
30 | // TODO: implement decryptFromHex
31 | throw UnimplementedError();
32 | }
33 |
34 | @override
35 | Future encrypt(String string, String key, {String iv = _iv}) {
36 | // TODO: implement encrypt
37 | throw UnimplementedError();
38 | }
39 |
40 | @override
41 | Future encryptToBase64(String string, String key, {String iv = _iv}) {
42 | // TODO: implement encryptToBase64
43 | throw UnimplementedError();
44 | }
45 |
46 | @override
47 | Future encryptToHex(String string, String key, {String iv = _iv}) {
48 | // TODO: implement encryptToHex
49 | throw UnimplementedError();
50 | }
51 | }
52 |
53 | void main() {
54 | final FlutterDesPlatform initialPlatform = FlutterDesPlatform.instance;
55 |
56 | test('$MethodChannelFlutterDes is the default instance', () {
57 | expect(initialPlatform, isInstanceOf());
58 | });
59 | }
60 |
--------------------------------------------------------------------------------