├── .github └── FUNDING.yml ├── .gitignore ├── .vs ├── ProjectSettings.json └── slnx.sqlite ├── CHANGELOG.md ├── CODEOWNERS ├── Flutter └── json_to_dart │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── README.md │ ├── analysis_options.yaml │ ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── json_to_dart │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle │ ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h │ └── RunnerTests │ │ └── RunnerTests.swift │ ├── l10n.yaml │ ├── lib │ ├── collection │ │ ├── list.dart │ │ └── map.dart │ ├── l10n │ │ ├── app_en.arb │ │ ├── app_zh.arb │ │ └── app_zh_Hant.arb │ ├── main.dart │ ├── main_controller.dart │ ├── models │ │ ├── config.dart │ │ ├── config.g.dart │ │ ├── dart_object.dart │ │ └── dart_property.dart │ ├── pages │ │ ├── json_text_field.dart │ │ ├── json_tree.dart │ │ ├── json_tree_header.dart │ │ ├── json_tree_item.dart │ │ ├── result.dart │ │ └── setting.dart │ ├── style │ │ ├── color.dart │ │ ├── size.dart │ │ └── text.dart │ ├── utils │ │ ├── camel_under_score_converter.dart │ │ ├── dart_helper.dart │ │ ├── enums.dart │ │ ├── error_check │ │ │ ├── error_checker.dart │ │ │ └── text_editing_controller.dart │ │ ├── extension.dart │ │ ├── my_string_buffer.dart │ │ └── string_helper.dart │ └── widget │ │ ├── button.dart │ │ ├── checkBox.dart │ │ ├── drag_icon.dart │ │ ├── picker.dart │ │ └── tapped.dart │ ├── linux │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ │ ├── CMakeLists.txt │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ ├── main.cc │ ├── my_application.cc │ ├── my_application.h │ └── runner │ │ ├── CMakeLists.txt │ │ ├── main.cc │ │ ├── my_application.cc │ │ └── my_application.h │ ├── 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 │ ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── index.html │ ├── manifest.json │ └── splash │ │ └── img │ │ ├── dark-1x.png │ │ ├── dark-2x.png │ │ ├── dark-3x.png │ │ ├── dark-4x.png │ │ ├── light-1x.png │ │ ├── light-2x.png │ │ ├── light-3x.png │ │ └── light-4x.png │ └── windows │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake │ └── runner │ ├── CMakeLists.txt │ ├── Runner.rc │ ├── flutter_window.cpp │ ├── flutter_window.h │ ├── main.cpp │ ├── resource.h │ ├── resources │ └── app_icon.ico │ ├── runner.exe.manifest │ ├── utils.cpp │ ├── utils.h │ ├── win32_window.cpp │ └── win32_window.h ├── Image ├── JsonToDart.ico └── JsonToDart.png ├── LICENSE ├── README-ZH.md ├── README.md ├── Silverlight ├── .vs │ └── FlutterCandiesJsonToDart │ │ └── v14 │ │ └── .suo ├── App.xaml ├── App.xaml.cs ├── FlutterCandiesJsonToDart.csproj ├── FlutterCandiesJsonToDart.csproj.user ├── FlutterCandiesJsonToDart.sln ├── FlutterCandiesJsonToDart_TemporaryKey.pfx ├── MainPage.xaml ├── Properties │ ├── AppManifest.xml │ └── AssemblyInfo.cs └── packages.config ├── UWP ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── BadgeLogo.scale-100.png │ ├── BadgeLogo.scale-125.png │ ├── BadgeLogo.scale-150.png │ ├── BadgeLogo.scale-200.png │ ├── BadgeLogo.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-125.png │ ├── SplashScreen.scale-150.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square310x310Logo.scale-100.png │ ├── Square310x310Logo.scale-125.png │ ├── Square310x310Logo.scale-150.png │ ├── Square310x310Logo.scale-200.png │ ├── Square310x310Logo.scale-400.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-24.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-125.png │ ├── Square44x44Logo.scale-150.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-24.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-32.png │ ├── Square44x44Logo.targetsize-48.png │ ├── Square71x71Logo.scale-100.png │ ├── Square71x71Logo.scale-125.png │ ├── Square71x71Logo.scale-150.png │ ├── Square71x71Logo.scale-200.png │ ├── Square71x71Logo.scale-400.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-125.png │ ├── StoreLogo.scale-150.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── Toast.xml │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-125.png │ ├── Wide310x150Logo.scale-150.png │ ├── Wide310x150Logo.scale-200.png │ └── Wide310x150Logo.scale-400.png ├── FlutterCandiesJsonToDart.csproj ├── FlutterCandiesJsonToDart.csproj.user ├── FlutterCandiesJsonToDart.sln ├── FlutterCandiesJsonToDart_TemporaryKey.pfx ├── MainPage.xaml ├── MainPage.xaml.cs ├── Models │ ├── BindableBase.cs │ ├── Config.cs │ ├── ExtendedJObject.cs │ └── ExtendedProperty.cs ├── Package.StoreAssociation.xml ├── Package.appxmanifest ├── Privacy Policy.md ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml └── Utils │ ├── CamelUnderScoreConverter.cs │ ├── ConfigHelper.cs │ ├── Converter.cs │ ├── DartHelper.cs │ ├── Enums.cs │ └── MessageBox.cs ├── WPF ├── App.config ├── App.xaml ├── App.xaml.cs ├── FlutterCandiesJsonToDart.csproj ├── FlutterCandiesJsonToDart.csproj.user ├── FlutterCandiesJsonToDart.sln ├── FlutterCandiesJsonToDart_TemporaryKey.pfx ├── JsonToDart.ico ├── MainWindow.xaml ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── SplashScreen.png └── packages.config └── test.txt /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | #github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | #patreon: # Replace with a single Patreon username 5 | #open_collective: # Replace with a single Open Collective username 6 | #ko_fi: # Replace with a single Ko-fi username 7 | #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | #liberapay: zmtzawqlp 10 | #issuehunt: # Replace with a single IssueHunt username 11 | #otechie: # Replace with a single Otechie username 12 | custom: http://zmtzawqlp.gitee.io/my_images/images/qrcode.png 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio. 3 | ################################################################################ 4 | 5 | /UWP/obj 6 | /UWP/bin/x86/Debug 7 | /UWP/.vs/FlutterCandiesJsonToDart/v15 8 | /WPF/packages/Newtonsoft.Json.12.0.2 9 | /WPF/obj/Debug 10 | /WPF/bin/Debug 11 | /WPF/.vs/FlutterCandiesJsonToDart/v15 12 | /UWP/bin/x86/Release 13 | /WPF/publish 14 | /WPF/obj/Release 15 | /WPF/bin/Release 16 | /UWP/AppPackages/FlutterCandiesJsonToDart_1.0.1.0_Test 17 | /UWP/bin/x64/Release 18 | /UWP/BundleArtifacts 19 | /Silverlight/.vs/FlutterCandiesJsonToDart/v15 20 | /Silverlight/Bin/Release 21 | /Silverlight/obj/Release 22 | /Silverlight/packages/Newtonsoft.Json.12.0.2 23 | /Silverlight/obj/Debug 24 | /Silverlight/Bin/Debug 25 | /.vs/JsonToDart/v15/.suo 26 | -------------------------------------------------------------------------------- /.vs/ProjectSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "CurrentProjectSetting": null 3 | } -------------------------------------------------------------------------------- /.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/.vs/slnx.sqlite -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.2.0] 2 | 3 | * 1.修复dart模板生成错误 4 | * 2.增加go-flutter的windows安装包 5 | 6 | ## [1.1.0] 7 | 8 | * 修复参数名字修改不生效问题 9 | * 增加Mac支持 10 | 11 | ## [1.0.0] 12 | 13 | * First Release 14 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @zmtzawqlp 2 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Generated.xcconfig 62 | **/ios/Flutter/app.flx 63 | **/ios/Flutter/app.zip 64 | **/ios/Flutter/flutter_assets/ 65 | **/ios/Flutter/flutter_export_environment.sh 66 | **/ios/ServiceDefinitions.json 67 | **/ios/Runner/GeneratedPluginRegistrant.* 68 | 69 | # Web related 70 | 71 | # Exceptions to above rules. 72 | !**/ios/**/default.mode1v3 73 | !**/ios/**/default.mode2v3 74 | !**/ios/**/default.pbxuser 75 | !**/ios/**/default.perspectivev3 76 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 77 | .vscode -------------------------------------------------------------------------------- /Flutter/json_to_dart/.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: "d8a9f9a52e5af486f80d932e838ee93861ffd863" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 17 | base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 18 | - platform: android 19 | create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 20 | base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 21 | - platform: ios 22 | create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 23 | base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 24 | - platform: linux 25 | create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 26 | base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 27 | - platform: macos 28 | create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 29 | base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 30 | - platform: web 31 | create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 32 | base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 33 | - platform: windows 34 | create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 35 | base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.5.0 2 | 3 | * add copyWith support 4 | * add object equality method (none, official, equatable) 5 | 6 | ## 1.4.3 7 | 8 | * fix config not save 9 | 10 | ## 1.4.2 11 | 12 | * fix camelName error 13 | 14 | ## 1.4.1 15 | 16 | * correct property and class name automatically(avoid keyword and special character). 17 | * support nest list object merge 18 | * add more friendly warning 19 | 20 | ## 1.4.0 21 | 22 | * Fix error when List is empty 23 | * Add const ctor when properties are all final 24 | 25 | ## 1.3.0 26 | 27 | * Add copy method button 28 | 29 | ## 1.2.0 30 | 31 | * Add smart nullable to support when data is null, set it to nullable automatically 32 | * Support List format json 33 | 34 | ## 1.1.0 35 | 36 | * Add clone method 37 | 38 | ## 1.0.0 39 | 40 | * First Release 41 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/README.md: -------------------------------------------------------------------------------- 1 | # json_to_dart 2 | 3 | The tool to convert json to dart code. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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.example.json_to_dart" 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.example.json_to_dart" 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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/kotlin/com/example/json_to_dart/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.json_to_dart 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/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. -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Json To Dart 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | json_to_dart 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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: lib/l10n 2 | template-arb-file: app_en.arb 3 | output-localization-file: app_localizations.dart -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/collection/list.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | 3 | class IList extends ListBase { 4 | final List _list = []; 5 | @override 6 | int get length => _list.length; 7 | @override 8 | set length(int value) { 9 | _list.length = value; 10 | } 11 | 12 | @override 13 | T operator [](int index) { 14 | return _list[index]; 15 | } 16 | 17 | @override 18 | void operator []=(int index, T value) { 19 | _list[index] = value; 20 | } 21 | 22 | @override 23 | void add(T element) { 24 | _list.add(element); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/collection/map.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | 3 | class IMap extends MapBase { 4 | final Map _map = {}; 5 | @override 6 | V? operator [](Object? key) { 7 | return _map[key]; 8 | } 9 | 10 | @override 11 | void operator []=(K key, V value) { 12 | _map[key] = value; 13 | } 14 | 15 | @override 16 | void clear() { 17 | _map.clear(); 18 | } 19 | 20 | @override 21 | Iterable get keys => _map.keys; 22 | 23 | @override 24 | V? remove(Object? key) { 25 | return _map.remove(key); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/l10n/app_en.arb: -------------------------------------------------------------------------------- 1 | { 2 | "formatButtonLabel": "Format", 3 | "generateButtonLabel": "Generate", 4 | "settingButtonLabel": "Setting", 5 | "classNameAssert": "{name}'s class name is empty.", 6 | "@classNameAssert": { 7 | "placeholders": { 8 | "name": {} 9 | } 10 | }, 11 | "propertyNameAssert": "{name}: property name is empty", 12 | "@propertyNameAssert": { 13 | "placeholders": { 14 | "name": {} 15 | } 16 | }, 17 | "formatErrorInfo": "There is something wrong to format. The error has copied into Clipboard.", 18 | "illegalJson": "Illegal JSON format", 19 | "timeFormatError": "The format of time is not right.", 20 | "generateSucceed": "The dart code is generated successfully. It has copied into Clipboard.", 21 | "generateFailed": "The dart code is generated failed. The error has copied into Clipboard.", 22 | "inputHelp": "Please input your json string, and click Format button.", 23 | "type": "Type", 24 | "name": "Name", 25 | "dataProtection": "Data Protection", 26 | "arrayProtection": "Array Protection", 27 | "traverseArrayCount": "Traverse Array Count", 28 | "nameRule": "Name Rule", 29 | "original": "Original", 30 | "camelCase": "CamelCase", 31 | "pascal": "Pascal", 32 | "hungarianNotation": "Hungarian Notation", 33 | "propertyOrder": "Property Order", 34 | "ascending": "Ascending", 35 | "descending": "Descending", 36 | "addMethod": "Add Protection Method", 37 | "fileHeader": "File Header", 38 | "fileHeaderHelp": "You can add copyright,dart code, creator into here. support [Date yyyy MM-dd] format to generate time.", 39 | "nullsafety": "Null Safety", 40 | "nullable": "Nullable", 41 | "smartNullable": "Smart Nullable", 42 | "addCopyMethod":"Add Copy Method", 43 | "duplicateClasses":"There are duplicate classes", 44 | "warning":"Warning", 45 | "ok":"OK", 46 | "propertyCantSameAsClassName":"property can't the same as Class name", 47 | "keywordCheckFailed": "'{name}' is a key word!", 48 | "@keywordCheckFailed": { 49 | "placeholders": { 50 | "name": {} 51 | } 52 | }, 53 | "propertyCantSameAsType": "property can't the same as Type", 54 | "containsIllegalCharacters": "contains illegal characters", 55 | "duplicateProperties":"There are duplicate properties", 56 | "automaticCheck":"Automatic Check", 57 | "buttonCopyText":"Copy", 58 | "buttonCopySuccess":"Copy Success", 59 | "resultDialogTitle":"Result", 60 | "showResultDialog":"show result dialog", 61 | "equalityMethodType":"Equality Method Type", 62 | "none":"non-generate", 63 | "official":"official", 64 | "equatable":"equatable" 65 | } -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/l10n/app_zh.arb: -------------------------------------------------------------------------------- 1 | { 2 | "formatButtonLabel": "格式化", 3 | "generateButtonLabel": "生成", 4 | "settingButtonLabel": "设置", 5 | "classNameAssert": "{name} 的 Class 名字为空。", 6 | "@classNameAssert": { 7 | "placeholders": { 8 | "name": {} 9 | } 10 | }, 11 | "propertyNameAssert": "{name}: 属性名字为空。", 12 | "@propertyNameAssert": { 13 | "placeholders": { 14 | "name": {} 15 | } 16 | }, 17 | "formatErrorInfo": "格式化出错. 错误信息已复制到剪切板。", 18 | "illegalJson": "Json格式不正確", 19 | "timeFormatError": "时间格式不正确。", 20 | "generateSucceed": "Dart 代码生成成功,已复制到剪切板。", 21 | "generateFailed": "Dart 代码生成失败,错误信息已复制到剪切板。", 22 | "inputHelp": "请输入Json字符串,按格式化按钮。", 23 | "type": "类型", 24 | "name": "名字", 25 | "dataProtection": "数据保护", 26 | "arrayProtection": "数组保护", 27 | "traverseArrayCount": "数组循环次数", 28 | "nameRule": "名字规则", 29 | "original": "默认", 30 | "camelCase": "小驼峰", 31 | "pascal": "大驼峰", 32 | "hungarianNotation": "匈牙利命名法", 33 | "propertyOrder": "属性排序", 34 | "ascending": "升序", 35 | "descending": "降序", 36 | "addMethod": "添加保护方法", 37 | "fileHeader": "文件头信息", 38 | "fileHeaderHelp": "可以在这里添加 Copyright,导入 Dart 代码,创建人信息等等。支持[Date yyyy MM-dd]来生成时间,Date后面为日期格式.", 39 | "nullsafety": "空安全", 40 | "nullable": "可空", 41 | "smartNullable": "智能可空", 42 | "addCopyMethod":"添加复制方法", 43 | "duplicateClasses":"包含重复的类", 44 | "warning":"警告", 45 | "ok":"确认", 46 | "propertyCantSameAsClassName":"属性名不能为类名", 47 | "keywordCheckFailed": "'{name}' 是关键字!", 48 | "@keywordCheckFailed": { 49 | "placeholders": { 50 | "name": {} 51 | } 52 | }, 53 | "propertyCantSameAsType": "属性名不能跟类型相同", 54 | "containsIllegalCharacters": "包含非法字符", 55 | "duplicateProperties":"属性名重复", 56 | "automaticCheck":"自动校验", 57 | "buttonCopyText":"复制", 58 | "buttonCopySuccess":"复制成功", 59 | "resultDialogTitle":"结果", 60 | "showResultDialog":"显示结果弹框", 61 | "equalityMethodType":"对比相等方法类型", 62 | "none":"不生成", 63 | "official":"官方方式", 64 | "equatable":"Equatable 的方式" 65 | } -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/l10n/app_zh_Hant.arb: -------------------------------------------------------------------------------- 1 | { 2 | "formatButtonLabel": "格式化", 3 | "generateButtonLabel": "生成", 4 | "settingButtonLabel": "設置", 5 | "classNameAssert": "{name} 的 Class 名字為空。", 6 | "@classNameAssert": { 7 | "placeholders": { 8 | "name": {} 9 | } 10 | }, 11 | "propertyNameAssert": "{name}: 屬性名字為空。", 12 | "@propertyNameAssert": { 13 | "placeholders": { 14 | "name": {} 15 | } 16 | }, 17 | "formatErrorInfo": "格式化出错. 錯誤資訊已複製到剪切板。", 18 | "illegalJson": "Json格式不正确", 19 | "timeFormatError": "時間格式不正確。", 20 | "generateSucceed": "Dart 代碼生成成功,已複製到剪切板。", 21 | "generateFailed": "Dart 代碼生成失敗,錯誤資訊已複製到剪切板。", 22 | "inputHelp": "請輸入Json字串,按格式化按鈕。", 23 | "type": "類型", 24 | "name": "名字", 25 | "dataProtection": "數據保護", 26 | "arrayProtection": "數組保護", 27 | "traverseArrayCount": "數組迴圈次數", 28 | "nameRule": "名字規則", 29 | "original": "默認", 30 | "camelCase": "小駝峰", 31 | "pascal": "大駝峰", 32 | "hungarianNotation": "匈牙利命名法", 33 | "propertyOrder": "屬性排序", 34 | "ascending": "昇冪", 35 | "descending": "降序", 36 | "addMethod": "添加保護方法", 37 | "fileHeader": "文件头信息", 38 | "fileHeaderHelp": "可以在這裏添加 Copyright,導入 Dart 代碼,創建人資訊等等。支持[Date yyyy MM-dd]來生成時間,Date後面為日期格式。", 39 | "nullsafety": "空安全", 40 | "nullable": "可空", 41 | "smartNullable": "智能可空", 42 | "addCopyMethod":"添加複製方法", 43 | "duplicateClasses":"包含重複的類", 44 | "warning":"警告", 45 | "ok":"確認", 46 | "propertyCantSameAsClassName":"屬性名不能為類名", 47 | "keywordCheckFailed": "'{name}' 是關鍵字!", 48 | "@keywordCheckFailed": { 49 | "placeholders": { 50 | "name": {} 51 | } 52 | }, 53 | "propertyCantSameAsType": "屬性名不能跟類型相同", 54 | "containsIllegalCharacters": "包含非法字符", 55 | "duplicateProperties":"屬性名重複", 56 | "automaticCheck":"自動校驗", 57 | "buttonCopyText":"複製", 58 | "buttonCopySuccess":"複製成功", 59 | "resultDialogTitle":"結果", 60 | "showResultDialog":"顯示結果彈框", 61 | "equalityMethodType":"對比相等方法類型", 62 | "none":"不生成", 63 | "official":"官方方式", 64 | "equatable":"Equatable 的方式" 65 | } -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/models/config.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'config.dart'; 4 | 5 | // ************************************************************************** 6 | // TypeAdapterGenerator 7 | // ************************************************************************** 8 | 9 | class ConfigSettingAdapter extends TypeAdapter { 10 | @override 11 | final int typeId = 0; 12 | 13 | @override 14 | ConfigSetting read(BinaryReader reader) { 15 | final numOfFields = reader.readByte(); 16 | final fields = { 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), 18 | }; 19 | final result = ConfigSetting(); 20 | if (fields[0] != null) { 21 | result.addMethod = fields[0] as RxBool; 22 | } 23 | if (fields[1] != null) { 24 | result.column1Width = fields[1] as int; 25 | } 26 | if (fields[2] != null) { 27 | result.column2Width = fields[2] as int; 28 | } 29 | if (fields[3] != null) { 30 | result.enableArrayProtection = fields[3] as RxBool; 31 | } 32 | if (fields[4] != null) { 33 | result.enableDataProtection = fields[4] as RxBool; 34 | } 35 | if (fields[5] != null) { 36 | result.fileHeaderInfo = fields[5] as String; 37 | } 38 | if (fields[6] != null) { 39 | result.traverseArrayCount = fields[6] as RxInt; 40 | } 41 | if (fields[7] != null) { 42 | result.propertyNamingConventionsType = 43 | fields[7] as Rx; 44 | } 45 | if (fields[8] != null) { 46 | result.propertyAccessorType = fields[8] as Rx; 47 | } 48 | if (fields[9] != null) { 49 | result.propertyNameSortingType = fields[9] as Rx; 50 | } 51 | if (fields[16] != null) { 52 | result.nullsafety = fields[16] as RxBool; 53 | } 54 | if (fields[17] != null) { 55 | result.nullable = fields[17] as RxBool; 56 | } 57 | if (fields[12] != null) { 58 | result.locale = fields[12] as Rx; 59 | } 60 | if (fields[18] != null) { 61 | result.smartNullable = fields[18] as RxBool; 62 | } 63 | if (fields[14] != null) { 64 | result.addCopyMethod = fields[14] as RxBool; 65 | } 66 | if (fields[15] != null) { 67 | result.automaticCheck = fields[15] as RxBool; 68 | } 69 | if (fields[19] != null) { 70 | result.showResultDialog = fields[19] as RxBool; 71 | } 72 | if (fields[20] != null) { 73 | result.equalityMethodType = fields[20] as Rx; 74 | } 75 | return result; 76 | } 77 | 78 | @override 79 | void write(BinaryWriter writer, ConfigSetting obj) { 80 | writer 81 | ..writeByte(18) 82 | ..writeByte(0) 83 | ..write(obj.addMethod) 84 | ..writeByte(1) 85 | ..write(obj.column1Width) 86 | ..writeByte(2) 87 | ..write(obj.column2Width) 88 | ..writeByte(3) 89 | ..write(obj.enableArrayProtection) 90 | ..writeByte(4) 91 | ..write(obj.enableDataProtection) 92 | ..writeByte(5) 93 | ..write(obj.fileHeaderInfo) 94 | ..writeByte(6) 95 | ..write(obj.traverseArrayCount) 96 | ..writeByte(7) 97 | ..write(obj.propertyNamingConventionsType) 98 | ..writeByte(8) 99 | ..write(obj.propertyAccessorType) 100 | ..writeByte(9) 101 | ..write(obj.propertyNameSortingType) 102 | ..writeByte(16) 103 | ..write(obj.nullsafety) 104 | ..writeByte(17) 105 | ..write(obj.nullable) 106 | ..writeByte(12) 107 | ..write(obj.locale) 108 | ..writeByte(18) 109 | ..write(obj.smartNullable) 110 | ..writeByte(14) 111 | ..write(obj.addCopyMethod) 112 | ..writeByte(15) 113 | ..write(obj.automaticCheck) 114 | ..writeByte(19) 115 | ..write(obj.showResultDialog) 116 | ..writeByte(20) 117 | ..write(obj.equalityMethodType); 118 | } 119 | 120 | @override 121 | int get hashCode => typeId.hashCode; 122 | 123 | @override 124 | bool operator ==(Object other) => 125 | identical(this, other) || 126 | other is ConfigSettingAdapter && 127 | runtimeType == other.runtimeType && 128 | typeId == other.typeId; 129 | } 130 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/pages/json_text_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:json_to_dart/main_controller.dart'; 4 | import 'package:json_to_dart/style/color.dart'; 5 | import 'package:json_to_dart/utils/extension.dart'; 6 | 7 | class JsonTextField extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | final MainController controller = Get.find(); 11 | return Container( 12 | margin: const EdgeInsets.only(top: 10.0), 13 | decoration: ShapeDecoration( 14 | shape: RoundedRectangleBorder( 15 | borderRadius: BorderRadius.circular(6), 16 | ), 17 | color: ColorPlate.lightGray, 18 | ), 19 | child: TextField( 20 | controller: controller.textEditingController, 21 | maxLines: null, 22 | decoration: InputDecoration( 23 | border: InputBorder.none, 24 | hintText: appLocalizations.inputHelp, 25 | hintStyle: const TextStyle( 26 | color: ColorPlate.gray, 27 | ), 28 | contentPadding: const EdgeInsets.symmetric(horizontal: 12), 29 | ), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/pages/json_tree.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:json_to_dart/main_controller.dart'; 4 | import 'package:json_to_dart/models/dart_object.dart'; 5 | import 'package:json_to_dart/models/dart_property.dart'; 6 | import 'package:json_to_dart/style/color.dart'; 7 | import 'json_tree_item.dart'; 8 | 9 | class JsonTree extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | decoration: BoxDecoration( 14 | border: Border.all( 15 | color: ColorPlate.borderGray, 16 | width: 1.0, 17 | ), 18 | borderRadius: BorderRadius.circular(4), 19 | ), 20 | child: SingleChildScrollView(child: GetBuilder( 21 | builder: (MainController controller) { 22 | if (controller.dartObject == null || 23 | controller.dartObject?.uid == '') { 24 | return Container(); 25 | } 26 | return Column( 27 | crossAxisAlignment: CrossAxisAlignment.stretch, 28 | children: _buildTree(controller.dartObject!), 29 | ); 30 | }, 31 | )), 32 | ); 33 | } 34 | 35 | List _buildTree(DartObject extendedObject) { 36 | final List list = []; 37 | _drawOject( 38 | list, 39 | extendedObject, 40 | ); 41 | return list; 42 | } 43 | 44 | void _drawOject(List result, DartObject object, {int depth = 0}) { 45 | ///root 46 | if (object.depth == 0) { 47 | _drawPoperty(result, object, object, 48 | isArray: false, isObject: true, depth: -1); 49 | } 50 | 51 | for (final DartProperty item in object.properties) { 52 | final bool isArray = item.value is List; 53 | final bool isObject = item is DartObject && item.properties.isNotEmpty; 54 | 55 | _drawPoperty(result, object, item, 56 | isArray: isArray, isObject: isObject, depth: depth); 57 | 58 | if (isObject) { 59 | _drawOject(result, object.objectKeys[item.key]!, depth: depth); 60 | } else if (isArray) { 61 | //var array = item.value as List; 62 | if (object.objectKeys.containsKey(item.key)) { 63 | final DartObject oject = object.objectKeys[item.key]!; 64 | _drawPoperty(result, object, oject, 65 | depth: depth + 1, isArrayOject: true, isObject: true); 66 | _drawOject(result, oject, depth: depth + 2); 67 | } 68 | } 69 | } 70 | } 71 | 72 | void _drawPoperty( 73 | List result, DartObject object, DartProperty property, 74 | {bool isArray = false, 75 | bool isObject = false, 76 | int depth = 0, 77 | bool isArrayOject = false}) { 78 | result.add(JsonTreeItem( 79 | object, 80 | property, 81 | isArray: isArray, 82 | isObject: isObject, 83 | isArrayOject: isArrayOject, 84 | depth: depth, 85 | )); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/pages/json_tree_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:json_to_dart/main_controller.dart'; 4 | 5 | import 'package:json_to_dart/models/config.dart'; 6 | import 'package:json_to_dart/style/color.dart'; 7 | import 'package:json_to_dart/style/text.dart'; 8 | import 'package:json_to_dart/utils/enums.dart'; 9 | import 'package:json_to_dart/utils/extension.dart'; 10 | 11 | import '../widget/checkBox.dart'; 12 | 13 | class JsonTreeHeader extends StatelessWidget { 14 | const JsonTreeHeader({Key? key}) : super(key: key); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Row( 19 | children: [ 20 | const Expanded( 21 | child: Padding( 22 | padding: EdgeInsets.only(left: 8.0), 23 | child: StText.normal( 24 | 'JsonKey', 25 | style: TextStyle( 26 | color: ColorPlate.gray, 27 | fontWeight: FontWeight.w600, 28 | ), 29 | ), 30 | ), 31 | flex: 3, 32 | ), 33 | Expanded( 34 | child: Padding( 35 | padding: const EdgeInsets.only(left: 8.0), 36 | child: StText.normal( 37 | appLocalizations.type, 38 | style: const TextStyle( 39 | color: ColorPlate.gray, 40 | fontWeight: FontWeight.w600, 41 | ), 42 | ), 43 | ), 44 | flex: 1, 45 | ), 46 | Expanded( 47 | child: Padding( 48 | padding: const EdgeInsets.only(left: 8.0), 49 | child: StText.normal( 50 | appLocalizations.name, 51 | style: const TextStyle( 52 | color: ColorPlate.gray, 53 | fontWeight: FontWeight.w600, 54 | ), 55 | ), 56 | ), 57 | flex: 1, 58 | ), 59 | Expanded( 60 | child: Padding( 61 | padding: const EdgeInsets.only(left: 8.0), 62 | child: Obx(() { 63 | return DropdownButton( 64 | value: ConfigSetting().propertyAccessorType.value, 65 | underline: Container(), 66 | items: PropertyAccessorType.values 67 | .where((PropertyAccessorType element) => 68 | element == PropertyAccessorType.none || 69 | element == PropertyAccessorType.final_) 70 | .map>( 71 | (PropertyAccessorType f) => 72 | DropdownMenuItem( 73 | value: f, 74 | child: Text(f 75 | .toString() 76 | .replaceAll('PropertyAccessorType.', '') 77 | .replaceAll('_', '') 78 | .toLowerCase()), 79 | )) 80 | .toList(), 81 | onChanged: (PropertyAccessorType? value) { 82 | //controller.updatePropertyAccessorType(); 83 | ConfigSetting().propertyAccessorType.value = value!; 84 | ConfigSetting().save(); 85 | }, 86 | ); 87 | }), 88 | ), 89 | flex: 1, 90 | ), 91 | Obx(() { 92 | if (ConfigSetting().nullsafety.value) { 93 | return Expanded( 94 | child: Padding( 95 | padding: const EdgeInsets.only(left: 8.0), 96 | child: StCheckBox( 97 | title: appLocalizations.nullable, 98 | value: ConfigSetting().nullable.value, 99 | onChanged: (bool value) { 100 | ConfigSetting().nullable.value = value; 101 | ConfigSetting().save(); 102 | Get.find().updateNullable(value); 103 | }, 104 | ), 105 | ), 106 | flex: 1, 107 | ); 108 | } else { 109 | return Container( 110 | width: 0, 111 | height: 0, 112 | ); 113 | } 114 | }), 115 | ], 116 | ); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/pages/result.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; 4 | import 'package:json_to_dart/utils/extension.dart'; 5 | import 'package:json_to_dart/widget/button.dart'; 6 | 7 | class ResultDialog extends StatelessWidget { 8 | const ResultDialog({ 9 | Key? key, 10 | required this.text, 11 | }) : super(key: key); 12 | 13 | final String text; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final TextEditingController controller = TextEditingController(text: text); 18 | return Center( 19 | child: Container( 20 | color: Colors.white, 21 | padding: const EdgeInsets.all(16), 22 | margin: const EdgeInsets.all(48), 23 | child: Column( 24 | mainAxisSize: MainAxisSize.min, 25 | children: [ 26 | Row( 27 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 28 | children: [ 29 | Text( 30 | appLocalizations.resultDialogTitle, 31 | ), 32 | CloseButton( 33 | onPressed: () { 34 | SmartDialog.dismiss(); 35 | }, 36 | ), 37 | ], 38 | ), 39 | Expanded( 40 | child: TextField( 41 | controller: controller, 42 | maxLines: null, 43 | decoration: const InputDecoration( 44 | border: OutlineInputBorder(), 45 | ), 46 | ), 47 | ), 48 | Row( 49 | children: [ 50 | TapButton( 51 | icon: Icons.copy, 52 | title: appLocalizations.buttonCopyText, 53 | onPressed: () { 54 | Clipboard.setData( 55 | ClipboardData(text: controller.text), 56 | ); 57 | SmartDialog.showToast(appLocalizations.buttonCopySuccess); 58 | }, 59 | ), 60 | ], 61 | ), 62 | ], 63 | ), 64 | ), 65 | ); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/style/color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColorPlate { 4 | /// base 5 | static const Color white = Colors.white; 6 | static const Color black = Colors.black; 7 | static const Color clear = Colors.transparent; 8 | 9 | /// grey 10 | static const Color darkGray = Color(0xff4A4A4A); 11 | static const Color gray = Color(0xff9B9B9B); 12 | static const Color borderGray = Color(0xffCDCDCD); 13 | static const Color lightGray = Color(0xfff5f5f4); 14 | 15 | /// 16 | /// special 17 | /// 18 | static const Color blue = Colors.blue; 19 | static const Color red = Color(0xffF24C61); 20 | static const Color green = Color(0xff37C628); 21 | static const Color orange = Color(0xFFFF9800); 22 | } 23 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/style/size.dart: -------------------------------------------------------------------------------- 1 | class SysSize { 2 | static const double huge = 22; 3 | static const double big = 16; 4 | static const double normal = 14; 5 | static const double small = 12; 6 | static const double tiny = 10; 7 | } 8 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/style/text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'color.dart'; 3 | import 'size.dart'; 4 | 5 | class StandardTextStyle { 6 | static const TextStyle big = TextStyle( 7 | fontFamily: 'MyraidPro', 8 | fontWeight: FontWeight.w600, 9 | fontSize: SysSize.big, 10 | color: ColorPlate.darkGray, 11 | inherit: true, 12 | ); 13 | static const TextStyle normalW = TextStyle( 14 | fontFamily: 'MyraidPro', 15 | fontWeight: FontWeight.w600, 16 | fontSize: SysSize.normal, 17 | color: ColorPlate.darkGray, 18 | inherit: true, 19 | ); 20 | static const TextStyle normal = TextStyle( 21 | fontFamily: 'MyraidPro', 22 | fontWeight: FontWeight.normal, 23 | fontSize: SysSize.normal, 24 | color: ColorPlate.darkGray, 25 | inherit: true, 26 | ); 27 | static const TextStyle small = TextStyle( 28 | fontFamily: 'MyraidPro', 29 | fontWeight: FontWeight.normal, 30 | fontSize: SysSize.small, 31 | color: ColorPlate.gray, 32 | inherit: true, 33 | ); 34 | } 35 | 36 | class StText extends StatelessWidget { 37 | const StText({ 38 | Key? key, 39 | this.text, 40 | this.style, 41 | this.defaultStyle, 42 | this.enableOffset = false, 43 | this.maxLines, 44 | }) : super(key: key); 45 | 46 | const StText.small( 47 | String text, { 48 | Key? key, 49 | TextStyle? style, 50 | bool? enableOffset, 51 | int? maxLines, 52 | }) : this( 53 | key: key, 54 | text: text, 55 | style: style, 56 | defaultStyle: StandardTextStyle.small, 57 | enableOffset: enableOffset, 58 | maxLines: maxLines, 59 | ); 60 | 61 | const StText.normal( 62 | String text, { 63 | Key? key, 64 | TextStyle? style, 65 | bool? enableOffset, 66 | int? maxLines, 67 | }) : this( 68 | key: key, 69 | text: text, 70 | style: style, 71 | defaultStyle: StandardTextStyle.normal, 72 | enableOffset: enableOffset, 73 | maxLines: maxLines, 74 | ); 75 | 76 | const StText.big( 77 | String text, { 78 | Key? key, 79 | TextStyle? style, 80 | bool? enableOffset, 81 | int? maxLines, 82 | }) : this( 83 | key: key, 84 | text: text, 85 | style: style, 86 | defaultStyle: StandardTextStyle.big, 87 | enableOffset: enableOffset, 88 | maxLines: maxLines, 89 | ); 90 | final String? text; 91 | final TextStyle? style; 92 | final TextStyle? defaultStyle; 93 | final bool? enableOffset; 94 | final int? maxLines; 95 | 96 | double get offset { 97 | // if (!isAscii) { 98 | // return 0; 99 | // } 100 | if (enableOffset != true) { 101 | return 0; 102 | } 103 | if (defaultStyle != null) { 104 | return (defaultStyle?.fontSize ?? 0) * 2 / 10; 105 | } 106 | if (style != null) { 107 | return (style?.fontSize ?? 0) * 2 / 10; 108 | } 109 | return 0; 110 | } 111 | 112 | bool isAscii(String str) { 113 | for (final int unit in str.codeUnits) { 114 | if (unit > 0xff) { 115 | return false; 116 | } 117 | } 118 | return true; 119 | } 120 | 121 | @override 122 | Widget build(BuildContext context) { 123 | final String finalText = text!; 124 | final bool hasOffset = isAscii(finalText); 125 | return Container( 126 | // fix font offset, if it's chinese, it should be zero 127 | padding: EdgeInsets.only(top: hasOffset ? offset : 0), 128 | child: DefaultTextStyle( 129 | style: defaultStyle!, 130 | child: Text( 131 | finalText, 132 | maxLines: maxLines ?? 5, 133 | style: style, 134 | ), 135 | ), 136 | ); 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/utils/enums.dart: -------------------------------------------------------------------------------- 1 | enum DartType { 2 | String, 3 | int, 4 | Object, 5 | bool, 6 | double, 7 | Null, 8 | } 9 | 10 | enum PropertyAccessorType { 11 | /// 12 | /// default 13 | /// 14 | none, 15 | 16 | /// 17 | /// final readonly 18 | /// 19 | final_, 20 | 21 | /// 22 | /// readonly 23 | /// 24 | //get_, 25 | 26 | /// 27 | /// get and set 28 | /// 29 | //getSet, 30 | } 31 | 32 | enum PropertyNamingConventionsType { 33 | /// 34 | /// default 35 | /// 36 | none, 37 | 38 | /// 39 | /// camelCase 40 | /// 41 | camelCase, 42 | 43 | /// 44 | /// pascal 45 | /// 46 | pascal, 47 | 48 | /// 49 | /// hungarianNotation 50 | /// 51 | hungarianNotation 52 | } 53 | 54 | enum PropertyNameSortingType { 55 | none, 56 | ascending, 57 | descending, 58 | } 59 | 60 | enum EqualityMethodType { 61 | none, 62 | official, 63 | equatable, 64 | } 65 | 66 | extension DartTypeE on DartType { 67 | String get text => 68 | this == DartType.Null ? 'Object' : toString().replaceAll('DartType.', ''); 69 | 70 | bool get isNull => this == DartType.Null; 71 | } 72 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/utils/error_check/text_editing_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:diff_match_patch/diff_match_patch.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:json_to_dart/models/dart_object.dart'; 4 | import 'package:json_to_dart/models/dart_property.dart'; 5 | 6 | import '../camel_under_score_converter.dart'; 7 | 8 | class PropertyNameCheckerTextEditingController 9 | extends ErrorCheckerTextEditingController { 10 | PropertyNameCheckerTextEditingController(DartProperty property) 11 | : super(property); 12 | 13 | @override 14 | TextSpan buildTextSpan( 15 | {required BuildContext context, 16 | TextStyle? style, 17 | required bool withComposing}) { 18 | // avoid property as following: 19 | // int int; 20 | // Test Test; 21 | // double double; 22 | // List List; 23 | // List int; 24 | if (property is DartObject && 25 | (property as DartObject).className.value == text) { 26 | return errorTextSpan(style); 27 | } else if (property.value is List) { 28 | if (text == 'List') { 29 | return errorTextSpan(style); 30 | } else if (property.getTypeString().contains('<$text>')) { 31 | return errorTextSpan(style); 32 | } 33 | } else if (property.getBaseTypeString() == text) { 34 | return errorTextSpan(style); 35 | } 36 | 37 | return super.buildTextSpan( 38 | context: context, style: style, withComposing: withComposing); 39 | } 40 | } 41 | 42 | class ClassNameCheckerTextEditingController 43 | extends ErrorCheckerTextEditingController { 44 | ClassNameCheckerTextEditingController(DartProperty property) 45 | : super(property); 46 | } 47 | 48 | class ErrorCheckerTextEditingController extends TextEditingController { 49 | ErrorCheckerTextEditingController(this.property); 50 | final DartProperty property; 51 | final DiffMatchPatch dmp = DiffMatchPatch() 52 | ..diffTimeout = 1 53 | ..diffEditCost = 4; 54 | @override 55 | TextSpan buildTextSpan( 56 | {required BuildContext context, 57 | TextStyle? style, 58 | required bool withComposing}) { 59 | if (this is ClassNameCheckerTextEditingController && 60 | classNameKeyWord.contains(text)) { 61 | return errorTextSpan(style); 62 | } else if (propertyKeyWord.contains(text)) { 63 | return errorTextSpan(style); 64 | } 65 | 66 | String pass = ''; 67 | for (int i = 0; i < text.length; i++) { 68 | final String char = text[i]; 69 | if (char == '_' || 70 | (pass.isEmpty ? RegExp('[a-zA-Z]') : RegExp('[a-zA-Z0-9]')) 71 | .hasMatch(char)) { 72 | pass += char; 73 | } 74 | } 75 | if (pass != text) { 76 | final List diffs = dmp.diff(text, pass); 77 | dmp.diffCleanupSemantic(diffs); 78 | final List textSpans = List.empty(growable: true); 79 | 80 | for (final Diff diff in diffs) { 81 | textSpans.add(TextSpan( 82 | text: diff.text, 83 | style: 84 | diff.operation == -1 ? const TextStyle(color: Colors.red) : null, 85 | )); 86 | } 87 | return TextSpan(children: textSpans, style: style); 88 | } 89 | 90 | return super.buildTextSpan( 91 | context: context, style: style, withComposing: withComposing); 92 | } 93 | 94 | TextSpan errorTextSpan(TextStyle? style) { 95 | return TextSpan(text: text, style: style?.copyWith(color: Colors.red)); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/utils/extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_gen/gen_l10n/app_localizations.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | extension StringE on String { 5 | String get uid => this + '${DateTime.now().microsecondsSinceEpoch}'; 6 | } 7 | 8 | AppLocalizations get appLocalizations => AppLocalizations.of(Get.context!)!; 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/utils/my_string_buffer.dart: -------------------------------------------------------------------------------- 1 | class MyStringBuffer { 2 | final StringBuffer _buffer = StringBuffer(); 3 | 4 | int get length => _buffer.length; 5 | 6 | void writeLine(String? value) { 7 | _buffer.write('\n'); 8 | _buffer.write(value); 9 | } 10 | 11 | void write(String value) { 12 | _buffer.write(value); 13 | } 14 | 15 | @override 16 | String toString() { 17 | return _buffer.toString(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/utils/string_helper.dart: -------------------------------------------------------------------------------- 1 | String stringFormat(String format, List? args) { 2 | if (format == '') { 3 | return format; 4 | } 5 | if (args != null) { 6 | String result = format; 7 | for (int i = 0; i < args.length; i++) { 8 | result = result.replaceAll('{$i}', args[i]); 9 | } 10 | return result; 11 | } 12 | return format; 13 | } 14 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/widget/button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:json_to_dart/style/color.dart'; 3 | import 'package:json_to_dart/style/size.dart'; 4 | import 'package:json_to_dart/style/text.dart'; 5 | import 'tapped.dart'; 6 | 7 | class TapButton extends StatelessWidget { 8 | const TapButton({ 9 | Key? key, 10 | this.icon, 11 | this.title, 12 | this.onPressed, 13 | }) : super(key: key); 14 | final IconData? icon; 15 | final String? title; 16 | final Function? onPressed; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Tapped( 21 | onTap: onPressed, 22 | child: Container( 23 | margin: const EdgeInsets.all(6), 24 | decoration: ShapeDecoration( 25 | shape: RoundedRectangleBorder( 26 | borderRadius: BorderRadius.circular(4), 27 | ), 28 | color: ColorPlate.blue, 29 | ), 30 | padding: const EdgeInsets.symmetric( 31 | horizontal: 12, 32 | vertical: 8, 33 | ), 34 | child: Row( 35 | mainAxisSize: MainAxisSize.min, 36 | crossAxisAlignment: CrossAxisAlignment.center, 37 | children: [ 38 | Icon( 39 | icon ?? Icons.help_outline, 40 | color: ColorPlate.white, 41 | size: SysSize.normal + 2, 42 | ), 43 | Container(width: 4), 44 | Container( 45 | // color: ColorPlate.red, 46 | child: StText.normal( 47 | title ?? '--', 48 | style: const TextStyle(color: ColorPlate.white), 49 | ), 50 | ), 51 | ], 52 | ), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/widget/checkBox.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:json_to_dart/style/color.dart'; 3 | import 'package:json_to_dart/style/size.dart'; 4 | import 'package:json_to_dart/style/text.dart'; 5 | import 'tapped.dart'; 6 | 7 | class StCheckBox extends StatelessWidget { 8 | const StCheckBox({ 9 | Key? key, 10 | this.title, 11 | this.value = false, 12 | this.onChanged, 13 | }) : super(key: key); 14 | final String? title; 15 | final bool? value; 16 | final Function(bool)? onChanged; 17 | 18 | Color get color => value! ? ColorPlate.blue : ColorPlate.gray; 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Tapped( 23 | onTap: () => onChanged?.call(!value!), 24 | child: Container( 25 | margin: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), 26 | padding: const EdgeInsets.all(12), 27 | decoration: ShapeDecoration( 28 | shape: RoundedRectangleBorder( 29 | borderRadius: BorderRadius.circular(4), 30 | ), 31 | color: ColorPlate.lightGray, 32 | ), 33 | child: Row( 34 | mainAxisSize: MainAxisSize.min, 35 | children: [ 36 | Icon( 37 | value! ? Icons.check_box : Icons.check_box_outline_blank, 38 | color: color, 39 | size: SysSize.normal + 2, 40 | ), 41 | Container(width: 4), 42 | StText.normal( 43 | title ?? '--', 44 | style: TextStyle( 45 | color: color, 46 | ), 47 | ), 48 | ], 49 | ), 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/widget/drag_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:json_to_dart/style/color.dart'; 3 | 4 | class DragIcon extends StatelessWidget { 5 | const DragIcon({ 6 | Key? key, 7 | }) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | width: 16.0, 13 | alignment: Alignment.center, 14 | height: double.infinity, 15 | child: Row( 16 | mainAxisSize: MainAxisSize.min, 17 | children: [ 18 | Container( 19 | height: 14, 20 | width: 2, 21 | decoration: ShapeDecoration( 22 | color: ColorPlate.gray.withOpacity(0.5), 23 | shape: RoundedRectangleBorder( 24 | borderRadius: BorderRadius.circular(1), 25 | ), 26 | ), 27 | ), 28 | Container(width: 4), 29 | Container( 30 | height: 14, 31 | width: 2, 32 | decoration: ShapeDecoration( 33 | color: ColorPlate.gray.withOpacity(0.5), 34 | shape: RoundedRectangleBorder( 35 | borderRadius: BorderRadius.circular(1), 36 | ), 37 | ), 38 | ), 39 | ], 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/widget/picker.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:json_to_dart/style/color.dart'; 3 | import 'package:json_to_dart/style/text.dart'; 4 | 5 | class StPicker extends StatelessWidget { 6 | const StPicker({ 7 | Key? key, 8 | this.child, 9 | this.title, 10 | }) : super(key: key); 11 | final DropdownButton? child; 12 | final String? title; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | margin: const EdgeInsets.symmetric(horizontal: 6), 18 | padding: const EdgeInsets.symmetric(horizontal: 12), 19 | decoration: ShapeDecoration( 20 | shape: RoundedRectangleBorder( 21 | borderRadius: BorderRadius.circular(4), 22 | ), 23 | color: ColorPlate.lightGray, 24 | ), 25 | child: Row( 26 | mainAxisSize: MainAxisSize.min, 27 | children: [ 28 | StText.small(title ?? '--'), 29 | Container(width: 14), 30 | child ?? Container(), 31 | ], 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/lib/widget/tapped.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Tapped extends StatefulWidget { 4 | const Tapped({this.child, this.onTap, this.onLongTap}); 5 | final Widget? child; 6 | final Function? onTap; 7 | final Function? onLongTap; 8 | 9 | @override 10 | _TappedState createState() => _TappedState(); 11 | } 12 | 13 | class _TappedState extends State with TickerProviderStateMixin { 14 | bool _isChangeAlpha = false; 15 | Duration duration = const Duration(milliseconds: 50); 16 | Duration showDuration = const Duration(milliseconds: 660); 17 | AnimationController? _controller; 18 | late Animation _animation; 19 | 20 | @override 21 | void initState() { 22 | _controller = AnimationController(value: 1, vsync: this); 23 | _animation = CurvedAnimation( 24 | parent: _controller!, 25 | curve: Curves.easeInOutCubic, 26 | ); 27 | _animation.addListener(() { 28 | setState(() {}); 29 | }); 30 | super.initState(); 31 | } 32 | 33 | bool _tapDown = false; 34 | 35 | @override 36 | void dispose() { 37 | _controller?.dispose(); 38 | super.dispose(); 39 | } 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return GestureDetector( 44 | onTap: () async { 45 | await Future.delayed(const Duration(milliseconds: 100), () {}); 46 | widget.onTap?.call(); 47 | }, 48 | onLongPress: widget.onLongTap == null 49 | ? null 50 | : () async { 51 | await Future.delayed( 52 | const Duration(milliseconds: 100), () {}); 53 | widget.onLongTap!(); 54 | }, 55 | onTapDown: (TapDownDetails detail) async { 56 | _tapDown = true; 57 | _isChangeAlpha = true; 58 | await _controller!.animateTo(0.4, duration: duration); 59 | if (!_tapDown) { 60 | await _controller!.animateTo(1, duration: showDuration); 61 | } 62 | _tapDown = false; 63 | _isChangeAlpha = false; 64 | }, 65 | onTapUp: (TapUpDetails detail) async { 66 | _tapDown = false; 67 | if (_isChangeAlpha == true) { 68 | return; 69 | } 70 | await _controller!.animateTo(1, duration: showDuration); 71 | _isChangeAlpha = false; 72 | }, 73 | onTapCancel: () async { 74 | _tapDown = false; 75 | _controller!.value = 1; 76 | _isChangeAlpha = false; 77 | }, 78 | child: Opacity( 79 | opacity: _animation.value, 80 | child: widget.child, 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} 10 | "main.cc" 11 | "my_application.cc" 12 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 13 | ) 14 | 15 | # Apply the standard set of build settings. This can be removed for applications 16 | # that need different build settings. 17 | apply_standard_settings(${BINARY_NAME}) 18 | 19 | # Add preprocessor definitions for the application ID. 20 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 21 | 22 | # Add dependency libraries. Add any application-specific dependencies here. 23 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 24 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 25 | 26 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 27 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/runner/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/linux/runner/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import path_provider_foundation 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FlutterMacOS (1.0.0) 3 | - path_provider_foundation (0.0.1): 4 | - Flutter 5 | - FlutterMacOS 6 | 7 | DEPENDENCIES: 8 | - FlutterMacOS (from `Flutter/ephemeral`) 9 | - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) 10 | 11 | EXTERNAL SOURCES: 12 | FlutterMacOS: 13 | :path: Flutter/ephemeral 14 | path_provider_foundation: 15 | :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin 16 | 17 | SPEC CHECKSUMS: 18 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 19 | path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 20 | 21 | PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 22 | 23 | COCOAPODS: 1.15.2 24 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 = json_to_dart 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.jsonToDart 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/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 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: json_to_dart 2 | description: The tool to convert json to dart code. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.5.0 15 | 16 | environment: 17 | sdk: '>=3.5.0 <4.0.0' 18 | flutter: ">=3.24.1" 19 | dependencies: 20 | 21 | # collection: any 22 | # The following adds the Cupertino Icons font to your application. 23 | # Use with the CupertinoIcons class for iOS style icons. 24 | dart_style: any 25 | dartx: any 26 | diff_match_patch: any 27 | equatable: any 28 | flutter: 29 | sdk: flutter 30 | flutter_localizations: 31 | sdk: flutter 32 | flutter_smart_dialog: any 33 | flutter_spinkit: any 34 | get: any 35 | hive: any 36 | hive_flutter: any 37 | intl: any 38 | nested: any 39 | 40 | 41 | # dependency_overrides: 42 | #dart_style: ^2.0.0 43 | dev_dependencies: 44 | build_runner: any 45 | flutter_native_splash: any 46 | flutter_test: 47 | sdk: flutter 48 | # hive_generator: any 49 | # hive_generator: 50 | # git: 51 | # url: https://github.com/zmtzawqlp/hive.git 52 | # path: hive_generator 53 | # hive_generator: 54 | # git: 55 | # url: https://gitee.com/zmtzawqlp/hive.git 56 | # path: hive_generator 57 | 58 | # For information on the generic Dart part of this file, see the 59 | # following page: https://dart.dev/tools/pub/pubspec 60 | 61 | # The following section is specific to Flutter. 62 | flutter: 63 | # The following line ensures that the Material Icons font is 64 | # included with your application, so that you can use the icons in 65 | # the material Icons class. 66 | uses-material-design: true 67 | generate: true 68 | 69 | # fonts: 70 | # - family: Roboto 71 | # fonts: 72 | # - asset: fonts/Roboto/Roboto-Thin.ttf 73 | # weight: 100 74 | # - asset: fonts/Roboto/Roboto-Light.ttf 75 | # weight: 300 76 | # - asset: fonts/Roboto/Roboto-Regular.ttf 77 | # weight: 400 78 | # - asset: fonts/Roboto/Roboto-Medium.ttf 79 | # weight: 500 80 | # - asset: fonts/Roboto/Roboto-Bold.ttf 81 | # weight: 700 82 | # - asset: fonts/Roboto/Roboto-Black.ttf 83 | # weight: 900 84 | # To add assets to your application, add an assets section, like this: 85 | # assets: 86 | # - images/a_dot_burr.jpeg 87 | # - images/a_dot_ham.jpeg 88 | # An image asset can refer to one or more resolution-specific "variants", see 89 | # https://flutter.dev/assets-and-images/#resolution-aware. 90 | # For details regarding adding assets from package dependencies, see 91 | # https://flutter.dev/assets-and-images/#from-packages 92 | # To add custom fonts to your application, add a fonts section here, 93 | # in this "flutter" section. Each entry in this list should have a 94 | # "family" key with the font family name, and a "fonts" key with a 95 | # list giving the asset and other descriptors for the font. For 96 | # example: 97 | # fonts: 98 | # - family: Schyler 99 | # fonts: 100 | # - asset: fonts/Schyler-Regular.ttf 101 | # - asset: fonts/Schyler-Italic.ttf 102 | # style: italic 103 | # - family: Trajan Pro 104 | # fonts: 105 | # - asset: fonts/TrajanPro.ttf 106 | # - asset: fonts/TrajanPro_Bold.ttf 107 | # weight: 700 108 | # 109 | # For details regarding fonts from package dependencies, 110 | # see https://flutter.dev/custom-fonts/#from-packages 111 | 112 | # flutter pub run flutter_native_splash:create 113 | # flutter pub run flutter_native_splash:remove 114 | flutter_native_splash: 115 | color: "#42a5f5" 116 | image: web/favicon.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/favicon.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/icons/Icon-192.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/icons/Icon-512.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | json_to_dart 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "json_to_dart", 3 | "short_name": "json_to_dart", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/dark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/dark-1x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/dark-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/dark-2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/dark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/dark-3x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/dark-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/dark-4x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/light-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/light-1x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/light-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/light-2x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/light-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/light-3x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/web/splash/img/light-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/web/splash/img/light-4x.png -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # Set fallback configurations for older versions of the flutter tool. 14 | if (NOT DEFINED FLUTTER_TARGET_PLATFORM) 15 | set(FLUTTER_TARGET_PLATFORM "windows-x64") 16 | endif() 17 | 18 | # === Flutter Library === 19 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 20 | 21 | # Published to parent scope for install step. 22 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 23 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 24 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 25 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 26 | 27 | list(APPEND FLUTTER_LIBRARY_HEADERS 28 | "flutter_export.h" 29 | "flutter_windows.h" 30 | "flutter_messenger.h" 31 | "flutter_plugin_registrar.h" 32 | "flutter_texture_registrar.h" 33 | ) 34 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 35 | add_library(flutter INTERFACE) 36 | target_include_directories(flutter INTERFACE 37 | "${EPHEMERAL_DIR}" 38 | ) 39 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 40 | add_dependencies(flutter flutter_assemble) 41 | 42 | # === Wrapper === 43 | list(APPEND CPP_WRAPPER_SOURCES_CORE 44 | "core_implementations.cc" 45 | "standard_codec.cc" 46 | ) 47 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 48 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 49 | "plugin_registrar.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 52 | list(APPEND CPP_WRAPPER_SOURCES_APP 53 | "flutter_engine.cc" 54 | "flutter_view_controller.cc" 55 | ) 56 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 57 | 58 | # Wrapper sources needed for a plugin. 59 | add_library(flutter_wrapper_plugin STATIC 60 | ${CPP_WRAPPER_SOURCES_CORE} 61 | ${CPP_WRAPPER_SOURCES_PLUGIN} 62 | ) 63 | apply_standard_settings(flutter_wrapper_plugin) 64 | set_target_properties(flutter_wrapper_plugin PROPERTIES 65 | POSITION_INDEPENDENT_CODE ON) 66 | set_target_properties(flutter_wrapper_plugin PROPERTIES 67 | CXX_VISIBILITY_PRESET hidden) 68 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 69 | target_include_directories(flutter_wrapper_plugin PUBLIC 70 | "${WRAPPER_ROOT}/include" 71 | ) 72 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 73 | 74 | # Wrapper sources needed for the runner. 75 | add_library(flutter_wrapper_app STATIC 76 | ${CPP_WRAPPER_SOURCES_CORE} 77 | ${CPP_WRAPPER_SOURCES_APP} 78 | ) 79 | apply_standard_settings(flutter_wrapper_app) 80 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 81 | target_include_directories(flutter_wrapper_app PUBLIC 82 | "${WRAPPER_ROOT}/include" 83 | ) 84 | add_dependencies(flutter_wrapper_app flutter_assemble) 85 | 86 | # === Flutter tool backend === 87 | # _phony_ is a non-existent file to force this command to run every time, 88 | # since currently there's no way to get a full input/output list from the 89 | # flutter tool. 90 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 91 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 92 | add_custom_command( 93 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 94 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 95 | ${CPP_WRAPPER_SOURCES_APP} 96 | ${PHONY_OUTPUT} 97 | COMMAND ${CMAKE_COMMAND} -E env 98 | ${FLUTTER_TOOL_ENVIRONMENT} 99 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 100 | ${FLUTTER_TARGET_PLATFORM} $ 101 | VERBATIM 102 | ) 103 | add_custom_target(flutter_assemble DEPENDS 104 | "${FLUTTER_LIBRARY}" 105 | ${FLUTTER_LIBRARY_HEADERS} 106 | ${CPP_WRAPPER_SOURCES_CORE} 107 | ${CPP_WRAPPER_SOURCES_PLUGIN} 108 | ${CPP_WRAPPER_SOURCES_APP} 109 | ) 110 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "json_to_dart" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "json_to_dart" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "json_to_dart.exe" "\0" 98 | VALUE "ProductName", "json_to_dart" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"json_to_dart", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Flutter/json_to_dart/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | unsigned int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length == 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /Flutter/json_to_dart/windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /Image/JsonToDart.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Image/JsonToDart.ico -------------------------------------------------------------------------------- /Image/JsonToDart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Image/JsonToDart.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 zmtzawqlp 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. -------------------------------------------------------------------------------- /Silverlight/.vs/FlutterCandiesJsonToDart/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Silverlight/.vs/FlutterCandiesJsonToDart/v14/.suo -------------------------------------------------------------------------------- /Silverlight/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Silverlight/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using FlutterCandiesJsonToDart.Utils; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Animation; 12 | using System.Windows.Shapes; 13 | 14 | namespace FlutterCandiesJsonToDart 15 | { 16 | public partial class App : Application 17 | { 18 | 19 | public App() 20 | { 21 | this.Startup += this.Application_Startup; 22 | this.Exit += this.Application_Exit; 23 | this.UnhandledException += this.Application_UnhandledException; 24 | 25 | InitializeComponent(); 26 | } 27 | 28 | private void Application_Startup(object sender, StartupEventArgs e) 29 | { 30 | ConfigHelper.Instance.Initialize(); 31 | this.RootVisual = new MainPage(); 32 | 33 | } 34 | 35 | private void Application_Exit(object sender, EventArgs e) 36 | { 37 | ConfigHelper.Instance.Save(); 38 | } 39 | 40 | private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) 41 | { 42 | // If the app is running outside of the debugger then report the exception using 43 | // the browser's exception mechanism. On IE this will display it a yellow alert 44 | // icon in the status bar and Firefox will display a script error. 45 | if (!System.Diagnostics.Debugger.IsAttached) 46 | { 47 | 48 | // NOTE: This will allow the application to continue running after an exception has been thrown 49 | // but not handled. 50 | // For production applications this error handling should be replaced with something that will 51 | // report the error to the website and stop the application. 52 | e.Handled = true; 53 | Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); }); 54 | } 55 | } 56 | 57 | private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e) 58 | { 59 | try 60 | { 61 | string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace; 62 | errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n"); 63 | 64 | System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");"); 65 | } 66 | catch (Exception) 67 | { 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Silverlight/FlutterCandiesJsonToDart.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | DynamicPage 10 | True 11 | False 12 | False 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | True 22 | FlutterCandiesJsonToDart 23 | True 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Silverlight/FlutterCandiesJsonToDart.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2003 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlutterCandiesJsonToDart", "FlutterCandiesJsonToDart.csproj", "{80BB62AC-9BC0-4B62-9F09-9CABBA0BFFB6}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {80BB62AC-9BC0-4B62-9F09-9CABBA0BFFB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {80BB62AC-9BC0-4B62-9F09-9CABBA0BFFB6}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {80BB62AC-9BC0-4B62-9F09-9CABBA0BFFB6}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {80BB62AC-9BC0-4B62-9F09-9CABBA0BFFB6}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {DBF0F925-FDAE-44CB-ADBE-85030F9FF663} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Silverlight/FlutterCandiesJsonToDart_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/Silverlight/FlutterCandiesJsonToDart_TemporaryKey.pfx -------------------------------------------------------------------------------- /Silverlight/Properties/AppManifest.xml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Silverlight/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("JsonToDart")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("zmtzawqlp")] 12 | [assembly: AssemblyProduct("JsonToDart")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("80bb62ac-9bc0-4b62-9f09-9cabba0bffb6")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Silverlight/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /UWP/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | -------------------------------------------------------------------------------- /UWP/Assets/BadgeLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/BadgeLogo.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/BadgeLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/BadgeLogo.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/BadgeLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/BadgeLogo.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/BadgeLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/BadgeLogo.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/BadgeLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/BadgeLogo.scale-400.png -------------------------------------------------------------------------------- /UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /UWP/Assets/Square310x310Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square310x310Logo.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/Square310x310Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square310x310Logo.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/Square310x310Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square310x310Logo.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/Square310x310Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square310x310Logo.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/Square310x310Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square310x310Logo.scale-400.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /UWP/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /UWP/Assets/Square71x71Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square71x71Logo.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/Square71x71Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square71x71Logo.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/Square71x71Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square71x71Logo.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/Square71x71Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square71x71Logo.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/Square71x71Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Square71x71Logo.scale-400.png -------------------------------------------------------------------------------- /UWP/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /UWP/Assets/Toast.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Dart生成成功 6 | 已复制到剪切板 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /UWP/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /UWP/Assets/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /UWP/Assets/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /UWP/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /UWP/FlutterCandiesJsonToDart.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | False 5 | False 6 | x86|x64 7 | True 8 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 9 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 10 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 11 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 12 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 13 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 14 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 15 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 16 | E:\Flutter\FlutterCandies\JsonToDartGitee\Image\JsonToDart.png 17 | StoreOnly 18 | 19 | 20 | 30F105C9-681E-420b-A277-7C086EAD8A4E 21 | true 22 | 23 | 24 | true 25 | 26 | -------------------------------------------------------------------------------- /UWP/FlutterCandiesJsonToDart.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2003 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlutterCandiesJsonToDart", "FlutterCandiesJsonToDart.csproj", "{18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|ARM = Debug|ARM 11 | Debug|x64 = Debug|x64 12 | Debug|x86 = Debug|x86 13 | Release|ARM = Release|ARM 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|ARM.ActiveCfg = Debug|ARM 19 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|ARM.Build.0 = Debug|ARM 20 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|ARM.Deploy.0 = Debug|ARM 21 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|x64.ActiveCfg = Debug|x64 22 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|x64.Build.0 = Debug|x64 23 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|x64.Deploy.0 = Debug|x64 24 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|x86.ActiveCfg = Debug|x86 25 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|x86.Build.0 = Debug|x86 26 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Debug|x86.Deploy.0 = Debug|x86 27 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|ARM.ActiveCfg = Release|ARM 28 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|ARM.Build.0 = Release|ARM 29 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|ARM.Deploy.0 = Release|ARM 30 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|x64.ActiveCfg = Release|x64 31 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|x64.Build.0 = Release|x64 32 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|x64.Deploy.0 = Release|x64 33 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|x86.ActiveCfg = Release|x86 34 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|x86.Build.0 = Release|x86 35 | {18FD3D86-8D1B-43D0-A4F6-34324E8D1A35}.Release|x86.Deploy.0 = Release|x86 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {77F70C81-C3FE-4801-ABE3-E7BB9B637072} 42 | EndGlobalSection 43 | EndGlobal 44 | -------------------------------------------------------------------------------- /UWP/FlutterCandiesJsonToDart_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/FlutterCandiesJsonToDart_TemporaryKey.pfx -------------------------------------------------------------------------------- /UWP/Models/BindableBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Runtime.CompilerServices; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace FlutterCandiesJsonToDart 10 | { 11 | /// 12 | /// Implementation of to simplify 13 | /// 14 | public abstract class BindableBase : INotifyPropertyChanged 15 | { 16 | /// 17 | /// Multicast event for property change notifications. 18 | /// 19 | public event PropertyChangedEventHandler PropertyChanged; 20 | 21 | /// 22 | /// Checks if a property already matches a desired value. Sets the property and 23 | /// notifies listeners only when necessary. 24 | /// 25 | /// Type of the property. 26 | /// Reference to a property with both getter and setter. 27 | /// Desired value for the property. 28 | /// Name of the property used to notify listeners. This 29 | /// value is optional and can be provided automatically when invoked from compilers that 30 | /// support CallerMemberName. 31 | /// True if the value was changed, false if the existing value matched the 32 | /// desired value. 33 | protected bool SetProperty(ref T storage, T value, 34 | #if !SILVERLIGHT 35 | [CallerMemberName] 36 | #endif 37 | string propertyName = null 38 | ) 39 | { 40 | if (Equals(storage, value)) 41 | return false; 42 | 43 | storage = value; 44 | OnPropertyChanged(propertyName); 45 | return true; 46 | } 47 | 48 | /// 49 | /// Notifies listeners that a property value has changed. 50 | /// 51 | /// Name of the property used to notify listeners. This 52 | /// value is optional and can be provided automatically when invoked from compilers 53 | /// that support . 54 | protected void OnPropertyChanged( 55 | #if !SILVERLIGHT 56 | [CallerMemberName] 57 | #endif 58 | string propertyName = null) 59 | => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 60 | 61 | protected void Dispose(ref T disposable) where T : class, IDisposable 62 | { 63 | if (disposable != null) 64 | { 65 | disposable.Dispose(); 66 | disposable = null; 67 | } 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | JsonToDart 7 | FlutterCandies 8 | Assets\StoreLogo.png 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /UWP/Privacy Policy.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/UWP/Privacy Policy.md -------------------------------------------------------------------------------- /UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FlutterCandiesJsonToDart")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FlutterCandiesJsonToDart")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /UWP/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /UWP/Utils/CamelUnderScoreConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace FlutterCandiesJsonToDart.Utils 8 | { 9 | /// 10 | /// https://dart.dev/guides/language/effective-dart/style 11 | /// UpperCamelCase names capitalize the first letter of each word, including the first. 12 | 13 | /// lowerCamelCase names capitalize the first letter of each word, except the first which is always lowercase, even if it’s an acronym. 14 | 15 | /// lowercase_with_underscores use only lowercase letters, even for acronyms, and separate words with _. 16 | /// 17 | /// 对于属性,方法推荐是lowerCamelCase 18 | /// 19 | public class CamelUnderScoreConverter 20 | { 21 | /// 22 | /// 驼峰转大写+下划线,abcAbcaBc->abc_abca_bc 23 | /// 24 | /// 25 | /// 26 | public static String UnderScoreName(String name) 27 | { 28 | if (String.IsNullOrWhiteSpace(name)) 29 | { 30 | return ""; 31 | } 32 | StringBuilder result = new StringBuilder(); 33 | 34 | result.Append(name.Substring(0, 1).ToLower()); 35 | for (int i = 1; i < name.Length; i++) 36 | { 37 | Char s = name[i]; 38 | var temp = s.ToString(); 39 | if ((temp.Equals(temp.ToUpper()) && s != '_' && (!Char.IsDigit(s)))) 40 | { 41 | result.Append("_"); 42 | } 43 | result.Append(temp.ToLower()); 44 | } 45 | 46 | 47 | return result.ToString(); 48 | } 49 | 50 | /// 51 | /// 下划线转驼峰,abc_abca_bc->abcAbcaBc 52 | /// 53 | /// 54 | /// 55 | 56 | public static String CamelName(String name) 57 | { 58 | StringBuilder result = new StringBuilder(); 59 | if (String.IsNullOrWhiteSpace(name)) 60 | { 61 | return ""; 62 | } 63 | if (!name.Contains('_')) 64 | { 65 | result.Append(name.Substring(0, 1).ToLower()); 66 | result.Append(name.Substring(1)); 67 | return result.ToString(); 68 | } 69 | String[] camels = name.Split('_'); 70 | foreach (var camel in camels) 71 | { 72 | if (!String.IsNullOrWhiteSpace(name)) 73 | { 74 | if (result.Length == 0) 75 | { 76 | result.Append(camel.ToLower()); 77 | } 78 | else 79 | { 80 | result.Append(camel.Substring(0, 1).ToUpper()); 81 | result.Append(camel.Substring(1).ToLower()); 82 | } 83 | } 84 | } 85 | 86 | return result.ToString(); 87 | } 88 | 89 | /// 90 | /// 下划线转首字母大写驼峰,abc_abca_bc->AbcAbcaBc 91 | /// 92 | /// 93 | /// 94 | public static String UpcaseCamelName(String name) 95 | { 96 | StringBuilder result = new StringBuilder(); 97 | if (String.IsNullOrWhiteSpace(name)) 98 | { 99 | return ""; 100 | } 101 | if (!name.Contains('_')) 102 | { 103 | result.Append(name.Substring(0, 1).ToUpper()); 104 | result.Append(name.Substring(1)); 105 | return result.ToString(); 106 | } 107 | String[] camels = name.Split('_'); 108 | foreach (var camel in camels) 109 | { 110 | if (!String.IsNullOrWhiteSpace(name)) 111 | { 112 | result.Append(camel.Substring(0, 1).ToUpper()); 113 | result.Append(camel.Substring(1).ToLower()); 114 | } 115 | } 116 | 117 | return result.ToString(); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /UWP/Utils/Converter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | #if WINDOWS_UWP 4 | using Windows.UI.Xaml.Data; 5 | #else 6 | using System.Windows.Data; 7 | #endif 8 | 9 | 10 | 11 | namespace FlutterCandiesJsonToDart.Utils 12 | { 13 | #if WINDOWS_UWP 14 | public class PropertyNameSortingTypeConverter : IValueConverter 15 | { 16 | public object Convert(object value, Type targetType, object parameter, string language) 17 | { 18 | return (int)value; 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, string language) 22 | { 23 | return (PropertyNameSortingType)value; 24 | } 25 | } 26 | public class PropertyNamingConventionsTypeConverter : IValueConverter 27 | { 28 | public object Convert(object value, Type targetType, object parameter, string language) 29 | { 30 | return (int)value; 31 | } 32 | 33 | public object ConvertBack(object value, Type targetType, object parameter, string language) 34 | { 35 | return (PropertyNamingConventionsType)value; 36 | } 37 | } 38 | #else 39 | public class PropertyNameSortingTypeConverter : IValueConverter 40 | { 41 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 42 | { 43 | return (int)value; 44 | } 45 | 46 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 47 | { 48 | return (PropertyNameSortingType)value; 49 | } 50 | } 51 | public class PropertyNamingConventionsTypeConverter : IValueConverter 52 | { 53 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 54 | { 55 | return (int)value; 56 | } 57 | 58 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 59 | { 60 | return (PropertyNamingConventionsType)value; 61 | } 62 | } 63 | #endif 64 | 65 | } 66 | -------------------------------------------------------------------------------- /UWP/Utils/Enums.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace FlutterCandiesJsonToDart.Utils 8 | { 9 | 10 | public enum DartType : int 11 | { 12 | String = 0, 13 | Int, 14 | Object, 15 | Bool, 16 | Double, 17 | } 18 | 19 | 20 | public enum PropertyAccessorType : int 21 | { 22 | /// 23 | /// 默认 24 | /// 25 | None = 0, 26 | /// 27 | /// 只读 28 | /// 29 | Final, 30 | /// 31 | /// get 32 | /// 33 | Get, 34 | /// 35 | /// get和set 36 | /// 37 | GetSet, 38 | } 39 | 40 | 41 | public enum PropertyNamingConventionsType : int 42 | { 43 | /// 44 | /// 保持原样 45 | /// 46 | None = 0, 47 | /// 48 | /// 驼峰式命名小驼峰 49 | /// 50 | CamelCase, 51 | /// 52 | /// 帕斯卡命名大驼峰 53 | /// 54 | Pascal, 55 | /// 56 | /// 匈牙利命名下划线 57 | /// 58 | HungarianNotation 59 | } 60 | 61 | public enum PropertyNameSortingType : int 62 | { 63 | None, 64 | Ascending, 65 | Descending, 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /UWP/Utils/MessageBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | 4 | 5 | #if WINDOWS_UWP 6 | using System.Threading.Tasks; 7 | using Windows.Foundation; 8 | using Windows.UI.Popups; 9 | using System.Linq; 10 | #else 11 | using System.Windows; 12 | #endif 13 | 14 | namespace FlutterCandiesJsonToDart.Utils 15 | { 16 | #if WINDOWS_UWP 17 | public static class MyMessageBox 18 | { 19 | public static async Task AskAsync(string content, string title = null, bool reverseIndex = false) 20 | { 21 | return (MessageBoxResult)(await AskAsync(content, title, reverseIndex, "确认", "取消")); 22 | } 23 | 24 | public static async Task AskAsync(string content, string title = null, bool reverseIndex = false, params string[] labels) 25 | { 26 | IUICommand[] commands = labels?.Select(label => new UICommand(label)).ToArray(); 27 | IUICommand command = await Show(content, title, reverseIndex, commands); 28 | return (commands == null ? 0 : Array.IndexOf(commands, command)); 29 | } 30 | 31 | public static IAsyncOperation Show(string content, string title = null, bool reverseIndex = false, params IUICommand[] commands) 32 | { 33 | var dialog = (title == null ? new MessageDialog(content) : new MessageDialog(content, title)); 34 | if (commands?.Length > 0) 35 | { 36 | foreach (IUICommand command in commands) 37 | { 38 | dialog.Commands.Add(command); 39 | } 40 | 41 | if (reverseIndex) 42 | { 43 | dialog.CancelCommandIndex = 0; 44 | dialog.DefaultCommandIndex = (uint)(commands.Length - 1); 45 | } 46 | else 47 | { 48 | dialog.DefaultCommandIndex = 0; 49 | dialog.CancelCommandIndex = (uint)(commands.Length - 1); 50 | } 51 | } 52 | //dialog.Options = MessageDialogOptions.AcceptUserInputAfterDelay; // 对话框弹出后,短时间内禁止用户单击命令按钮,以防止用户的误操作 53 | return dialog.ShowAsync(); 54 | } 55 | } 56 | 57 | public enum MessageBoxResult 58 | { 59 | OK, 60 | Cancel 61 | } 62 | #else 63 | public static class MyMessageBox 64 | { 65 | public static void Show(String msg) 66 | { 67 | MessageBox.Show(msg); 68 | } 69 | } 70 | #endif 71 | 72 | } 73 | -------------------------------------------------------------------------------- /WPF/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WPF/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /WPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using FlutterCandiesJsonToDart.Utils; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Configuration; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | 10 | namespace FlutterCandiesJsonToDart 11 | { 12 | /// 13 | /// Interaction logic for App.xaml 14 | /// 15 | public partial class App : Application 16 | { 17 | public App() 18 | { 19 | Startup += App_Startup; 20 | Exit += App_Exit; 21 | } 22 | 23 | private void App_Exit(object sender, ExitEventArgs e) 24 | { 25 | ConfigHelper.Instance.Save(); 26 | } 27 | 28 | private void App_Startup(object sender, StartupEventArgs e) 29 | { 30 | ConfigHelper.Instance.Initialize(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WPF/FlutterCandiesJsonToDart.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | publish\ 5 | 6 | https://github.com/fluttercandies/JsonToDart 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | 14 | false 15 | 16 | -------------------------------------------------------------------------------- /WPF/FlutterCandiesJsonToDart.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28010.2003 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlutterCandiesJsonToDart", "FlutterCandiesJsonToDart.csproj", "{D2124213-72F9-4FA5-9E72-785F38011CB2}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D2124213-72F9-4FA5-9E72-785F38011CB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D2124213-72F9-4FA5-9E72-785F38011CB2}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D2124213-72F9-4FA5-9E72-785F38011CB2}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D2124213-72F9-4FA5-9E72-785F38011CB2}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {D5695D77-884E-4486-8BB8-439E75972498} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WPF/FlutterCandiesJsonToDart_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/WPF/FlutterCandiesJsonToDart_TemporaryKey.pfx -------------------------------------------------------------------------------- /WPF/JsonToDart.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/WPF/JsonToDart.ico -------------------------------------------------------------------------------- /WPF/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("Json To Dart")] 11 | [assembly: AssemblyDescription("Json To Dart")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("zmtzawqlp")] 14 | [assembly: AssemblyProduct("Json To Dart")] 15 | [assembly: AssemblyCopyright("Copyright © 2019")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | [assembly: NeutralResourcesLanguage("zh-Hans")] 57 | 58 | -------------------------------------------------------------------------------- /WPF/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace FlutterCandiesJsonToDart.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FlutterCandiesJsonToDart.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /WPF/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace FlutterCandiesJsonToDart.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WPF/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WPF/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/JsonToDart/4e2e1e332e020008961a043a313d0e2233e3b8c3/WPF/SplashScreen.png -------------------------------------------------------------------------------- /WPF/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | --------------------------------------------------------------------------------