├── .gitignore ├── .metadata ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── jideguru │ │ │ │ └── flutter_drawing_board │ │ │ │ └── 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 ├── assets ├── screenshots │ ├── ss1.png │ └── ss2.png └── svgs │ └── color_wheel.svg ├── firebase.json ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── main.dart └── view │ ├── drawing_canvas │ ├── drawing_canvas.dart │ ├── models │ │ ├── drawing_mode.dart │ │ └── sketch.dart │ └── widgets │ │ ├── canvas_side_bar.dart │ │ └── color_palette.dart │ └── drawing_page.dart ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── app_icon_1024.png │ │ ├── app_icon_128.png │ │ ├── app_icon_16.png │ │ ├── app_icon_256.png │ │ ├── app_icon_32.png │ │ ├── app_icon_512.png │ │ └── app_icon_64.png │ ├── Base.lproj │ └── MainMenu.xib │ ├── Configs │ ├── AppInfo.xcconfig │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png ├── Icon-512.png ├── Icon-maskable-192.png └── Icon-maskable-512.png ├── index.html └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | 46 | 47 | /.firebaserc 48 | .firebase 49 | .fvm -------------------------------------------------------------------------------- /.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. 5 | 6 | version: 7 | revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 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: e3c29ec00c9c825c891d75054c63fcc46454dca1 17 | base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 18 | - platform: android 19 | create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 20 | base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 21 | - platform: ios 22 | create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 23 | base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 24 | - platform: macos 25 | create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 26 | base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 27 | - platform: web 28 | create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 29 | base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 30 | 31 | # User provided section 32 | 33 | # List of Local paths (relative to this file) that should be 34 | # ignored by the migrate tool. 35 | # 36 | # Files that are not part of the templates will be ignored by default. 37 | unmanaged_files: 38 | - 'lib/main.dart' 39 | - 'ios/Runner.xcodeproj/project.pbxproj' 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2022 Festus Olusegun 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🎨🎨Let's Draw 2 | [![Twitter Follow](https://img.shields.io/twitter/follow/iamjideguru.svg?style=social)](https://twitter.com/iamjideguru) 3 | 4 | A simple drawing app made with Flutter 5 | Try out the DEMO here 6 | [Link to Demo](https://letsdraw.jideguru.dev/) 7 | 8 | 9 | 10 | ## 💻 Requirements 11 | 12 | - Any Operating System (ie. MacOS X, Linux, Windows) 13 | - Any IDE with Flutter SDK installed (ie. IntelliJ, Android Studio, VSCode etc) 14 | - A little knowledge of Dart and Flutter 15 | 16 | 17 | ## ✨ Features 18 | 19 | #### Available Features 20 | - [x] Scribble. 21 | - [x] Draw Shapes (Line, Polygon, Ellipse and Rectangle). 22 | - [x] Eraser. 23 | - [x] Undo and Redo 24 | - [x] Export as Image 25 | 26 | #### Features to Explore 27 | - [ ] Canvas Zoom/Scroll. 28 | - [ ] Perfect circle option and Polygon rotation. 29 | - [ ] Move doodle and shapes around the canvas 30 | 31 | 32 | ## 📸 ScreenShots 33 | 34 | 35 | 36 | ## 🤓 Author(s) 37 | 38 | **Olusegun Festus Babajide** 39 | [![Twitter Follow](https://img.shields.io/twitter/follow/iamjideguru.svg?style=social)](https://twitter.com/iamjideguru) 40 | 41 | ## 🔖 LICENCE 42 | 43 | [Apache-2.0](https://github.com/JideGuru/FlutterEbookApp/blob/master/LICENSE) -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /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/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 33 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.jideguru.flutter_drawing_board" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion 19 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/jideguru/flutter_drawing_board/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.jideguru.flutter_drawing_board 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /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-7.4-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/screenshots/ss1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/assets/screenshots/ss1.png -------------------------------------------------------------------------------- /assets/screenshots/ss2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/assets/screenshots/ss2.png -------------------------------------------------------------------------------- /assets/svgs/color_wheel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | Color wheel 21 | 23 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | Color wheel 51 | 2016-01-25 52 | 53 | 54 | krzysiu.net 55 | 56 | 57 | 58 | 59 | OpenClipart.org 60 | 61 | 62 | 63 | 64 | wheel 65 | color 66 | hue 67 | palette 68 | 69 | 70 | Color wheel - 16 colors, H - different, S - 1.0, L - 0.5 71 | 73 | 74 | 76 | 78 | 80 | 82 | 83 | 84 | 85 | 90 | 92 | 96 | 101 | 106 | 111 | 116 | 121 | 126 | 131 | 136 | 141 | 146 | 151 | 156 | 161 | 166 | 171 | 176 | 181 | 187 | 193 | 199 | 205 | 211 | 217 | 223 | 229 | 230 | 231 | 232 | 233 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build/web", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1300; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | DEVELOPMENT_TEAM = 3DDPAAW5W3; 292 | ENABLE_BITCODE = NO; 293 | INFOPLIST_FILE = Runner/Info.plist; 294 | LD_RUNPATH_SEARCH_PATHS = ( 295 | "$(inherited)", 296 | "@executable_path/Frameworks", 297 | ); 298 | PRODUCT_BUNDLE_IDENTIFIER = com.jideguru.flutterDrawingBoard; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 301 | SWIFT_VERSION = 5.0; 302 | VERSIONING_SYSTEM = "apple-generic"; 303 | }; 304 | name = Profile; 305 | }; 306 | 97C147031CF9000F007C117D /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ALWAYS_SEARCH_USER_PATHS = NO; 310 | CLANG_ANALYZER_NONNULL = YES; 311 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 312 | CLANG_CXX_LIBRARY = "libc++"; 313 | CLANG_ENABLE_MODULES = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_COMMA = YES; 318 | CLANG_WARN_CONSTANT_CONVERSION = YES; 319 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 321 | CLANG_WARN_EMPTY_BODY = YES; 322 | CLANG_WARN_ENUM_CONVERSION = YES; 323 | CLANG_WARN_INFINITE_RECURSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 327 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 330 | CLANG_WARN_STRICT_PROTOTYPES = YES; 331 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 332 | CLANG_WARN_UNREACHABLE_CODE = YES; 333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 335 | COPY_PHASE_STRIP = NO; 336 | DEBUG_INFORMATION_FORMAT = dwarf; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | ENABLE_TESTABILITY = YES; 339 | GCC_C_LANGUAGE_STANDARD = gnu99; 340 | GCC_DYNAMIC_NO_PIC = NO; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_OPTIMIZATION_LEVEL = 0; 343 | GCC_PREPROCESSOR_DEFINITIONS = ( 344 | "DEBUG=1", 345 | "$(inherited)", 346 | ); 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 354 | MTL_ENABLE_DEBUG_INFO = YES; 355 | ONLY_ACTIVE_ARCH = YES; 356 | SDKROOT = iphoneos; 357 | TARGETED_DEVICE_FAMILY = "1,2"; 358 | }; 359 | name = Debug; 360 | }; 361 | 97C147041CF9000F007C117D /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ALWAYS_SEARCH_USER_PATHS = NO; 365 | CLANG_ANALYZER_NONNULL = YES; 366 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 367 | CLANG_CXX_LIBRARY = "libc++"; 368 | CLANG_ENABLE_MODULES = YES; 369 | CLANG_ENABLE_OBJC_ARC = YES; 370 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 371 | CLANG_WARN_BOOL_CONVERSION = YES; 372 | CLANG_WARN_COMMA = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 375 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 376 | CLANG_WARN_EMPTY_BODY = YES; 377 | CLANG_WARN_ENUM_CONVERSION = YES; 378 | CLANG_WARN_INFINITE_RECURSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 381 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 382 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 385 | CLANG_WARN_STRICT_PROTOTYPES = YES; 386 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 387 | CLANG_WARN_UNREACHABLE_CODE = YES; 388 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 389 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 390 | COPY_PHASE_STRIP = NO; 391 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 392 | ENABLE_NS_ASSERTIONS = NO; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | GCC_C_LANGUAGE_STANDARD = gnu99; 395 | GCC_NO_COMMON_BLOCKS = YES; 396 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 397 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 398 | GCC_WARN_UNDECLARED_SELECTOR = YES; 399 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 400 | GCC_WARN_UNUSED_FUNCTION = YES; 401 | GCC_WARN_UNUSED_VARIABLE = YES; 402 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 403 | MTL_ENABLE_DEBUG_INFO = NO; 404 | SDKROOT = iphoneos; 405 | SUPPORTED_PLATFORMS = iphoneos; 406 | SWIFT_COMPILATION_MODE = wholemodule; 407 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 408 | TARGETED_DEVICE_FAMILY = "1,2"; 409 | VALIDATE_PRODUCT = YES; 410 | }; 411 | name = Release; 412 | }; 413 | 97C147061CF9000F007C117D /* Debug */ = { 414 | isa = XCBuildConfiguration; 415 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 416 | buildSettings = { 417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 418 | CLANG_ENABLE_MODULES = YES; 419 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 420 | DEVELOPMENT_TEAM = 3DDPAAW5W3; 421 | ENABLE_BITCODE = NO; 422 | INFOPLIST_FILE = Runner/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = ( 424 | "$(inherited)", 425 | "@executable_path/Frameworks", 426 | ); 427 | PRODUCT_BUNDLE_IDENTIFIER = com.jideguru.flutterDrawingBoard; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 430 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 431 | SWIFT_VERSION = 5.0; 432 | VERSIONING_SYSTEM = "apple-generic"; 433 | }; 434 | name = Debug; 435 | }; 436 | 97C147071CF9000F007C117D /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 439 | buildSettings = { 440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 441 | CLANG_ENABLE_MODULES = YES; 442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 443 | DEVELOPMENT_TEAM = 3DDPAAW5W3; 444 | ENABLE_BITCODE = NO; 445 | INFOPLIST_FILE = Runner/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "@executable_path/Frameworks", 449 | ); 450 | PRODUCT_BUNDLE_IDENTIFIER = com.jideguru.flutterDrawingBoard; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 453 | SWIFT_VERSION = 5.0; 454 | VERSIONING_SYSTEM = "apple-generic"; 455 | }; 456 | name = Release; 457 | }; 458 | /* End XCBuildConfiguration section */ 459 | 460 | /* Begin XCConfigurationList section */ 461 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 97C147031CF9000F007C117D /* Debug */, 465 | 97C147041CF9000F007C117D /* Release */, 466 | 249021D3217E4FDB00AE95B9 /* Profile */, 467 | ); 468 | defaultConfigurationIsVisible = 0; 469 | defaultConfigurationName = Release; 470 | }; 471 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 472 | isa = XCConfigurationList; 473 | buildConfigurations = ( 474 | 97C147061CF9000F007C117D /* Debug */, 475 | 97C147071CF9000F007C117D /* Release */, 476 | 249021D4217E4FDB00AE95B9 /* Profile */, 477 | ); 478 | defaultConfigurationIsVisible = 0; 479 | defaultConfigurationName = Release; 480 | }; 481 | /* End XCConfigurationList section */ 482 | }; 483 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 484 | } 485 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Drawing Board 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_drawing_board 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 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | LSSupportsOpeningDocumentsInPlace 51 | 52 | UIFileSharingEnabled 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_drawing_board/view/drawing_page.dart'; 3 | 4 | void main() { 5 | runApp(const MyApp()); 6 | } 7 | 8 | const Color kCanvasColor = Color(0xfff2f3f7); 9 | 10 | class MyApp extends StatelessWidget { 11 | const MyApp({super.key}); 12 | 13 | // This widget is the root of your application. 14 | @override 15 | Widget build(BuildContext context) { 16 | return MaterialApp( 17 | title: 'Let\'s Draw', 18 | theme: ThemeData(primarySwatch: Colors.blue), 19 | debugShowCheckedModeBanner: false, 20 | home: const DrawingPage(), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/view/drawing_canvas/drawing_canvas.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math' as math; 2 | import 'dart:ui'; 3 | 4 | import 'package:flutter/material.dart' hide Image; 5 | import 'package:flutter_drawing_board/main.dart'; 6 | import 'package:flutter_drawing_board/view/drawing_canvas/models/drawing_mode.dart'; 7 | import 'package:flutter_drawing_board/view/drawing_canvas/models/sketch.dart'; 8 | import 'package:flutter_hooks/flutter_hooks.dart'; 9 | 10 | class DrawingCanvas extends HookWidget { 11 | final double height; 12 | final double width; 13 | final ValueNotifier selectedColor; 14 | final ValueNotifier strokeSize; 15 | final ValueNotifier backgroundImage; 16 | final ValueNotifier eraserSize; 17 | final ValueNotifier drawingMode; 18 | final AnimationController sideBarController; 19 | final ValueNotifier currentSketch; 20 | final ValueNotifier> allSketches; 21 | final GlobalKey canvasGlobalKey; 22 | final ValueNotifier polygonSides; 23 | final ValueNotifier filled; 24 | 25 | const DrawingCanvas({ 26 | Key? key, 27 | required this.height, 28 | required this.width, 29 | required this.selectedColor, 30 | required this.strokeSize, 31 | required this.eraserSize, 32 | required this.drawingMode, 33 | required this.sideBarController, 34 | required this.currentSketch, 35 | required this.allSketches, 36 | required this.canvasGlobalKey, 37 | required this.filled, 38 | required this.polygonSides, 39 | required this.backgroundImage, 40 | }) : super(key: key); 41 | 42 | @override 43 | Widget build(BuildContext context) { 44 | return MouseRegion( 45 | cursor: SystemMouseCursors.precise, 46 | child: Stack( 47 | children: [ 48 | buildAllSketches(context), 49 | buildCurrentPath(context), 50 | ], 51 | ), 52 | ); 53 | } 54 | 55 | void onPointerDown(PointerDownEvent details, BuildContext context) { 56 | final box = context.findRenderObject() as RenderBox; 57 | final offset = box.globalToLocal(details.position); 58 | currentSketch.value = Sketch.fromDrawingMode( 59 | Sketch( 60 | points: [offset], 61 | size: drawingMode.value == DrawingMode.eraser 62 | ? eraserSize.value 63 | : strokeSize.value, 64 | color: drawingMode.value == DrawingMode.eraser 65 | ? kCanvasColor 66 | : selectedColor.value, 67 | sides: polygonSides.value, 68 | ), 69 | drawingMode.value, 70 | filled.value, 71 | ); 72 | } 73 | 74 | void onPointerMove(PointerMoveEvent details, BuildContext context) { 75 | final box = context.findRenderObject() as RenderBox; 76 | final offset = box.globalToLocal(details.position); 77 | final points = List.from(currentSketch.value?.points ?? []) 78 | ..add(offset); 79 | currentSketch.value = Sketch.fromDrawingMode( 80 | Sketch( 81 | points: points, 82 | size: drawingMode.value == DrawingMode.eraser 83 | ? eraserSize.value 84 | : strokeSize.value, 85 | color: drawingMode.value == DrawingMode.eraser 86 | ? kCanvasColor 87 | : selectedColor.value, 88 | sides: polygonSides.value, 89 | ), 90 | drawingMode.value, 91 | filled.value, 92 | ); 93 | } 94 | 95 | void onPointerUp(PointerUpEvent details) { 96 | allSketches.value = List.from(allSketches.value) 97 | ..add(currentSketch.value!); 98 | } 99 | 100 | Widget buildAllSketches(BuildContext context) { 101 | return SizedBox( 102 | height: height, 103 | width: width, 104 | child: ValueListenableBuilder>( 105 | valueListenable: allSketches, 106 | builder: (context, sketches, _) { 107 | return RepaintBoundary( 108 | key: canvasGlobalKey, 109 | child: Container( 110 | height: height, 111 | width: width, 112 | color: kCanvasColor, 113 | child: CustomPaint( 114 | painter: SketchPainter( 115 | sketches: sketches, 116 | backgroundImage: backgroundImage.value, 117 | ), 118 | ), 119 | ), 120 | ); 121 | }, 122 | ), 123 | ); 124 | } 125 | 126 | Widget buildCurrentPath(BuildContext context) { 127 | return Listener( 128 | onPointerDown: (details) => onPointerDown(details, context), 129 | onPointerMove: (details) => onPointerMove(details, context), 130 | onPointerUp: onPointerUp, 131 | child: ValueListenableBuilder( 132 | valueListenable: currentSketch, 133 | builder: (context, sketch, child) { 134 | return RepaintBoundary( 135 | child: SizedBox( 136 | height: height, 137 | width: width, 138 | child: CustomPaint( 139 | painter: SketchPainter( 140 | sketches: sketch == null ? [] : [sketch], 141 | ), 142 | ), 143 | ), 144 | ); 145 | }, 146 | ), 147 | ); 148 | } 149 | } 150 | 151 | class SketchPainter extends CustomPainter { 152 | final List sketches; 153 | final Image? backgroundImage; 154 | 155 | const SketchPainter({ 156 | Key? key, 157 | this.backgroundImage, 158 | required this.sketches, 159 | }); 160 | 161 | @override 162 | void paint(Canvas canvas, Size size) { 163 | if (backgroundImage != null) { 164 | canvas.drawImageRect( 165 | backgroundImage!, 166 | Rect.fromLTWH(0, 0, backgroundImage!.width.toDouble(), 167 | backgroundImage!.height.toDouble()), 168 | Rect.fromLTWH(0, 0, size.width, size.height), 169 | Paint(), 170 | ); 171 | } 172 | for (Sketch sketch in sketches) { 173 | final points = sketch.points; 174 | if (points.isEmpty) return; 175 | 176 | final path = Path(); 177 | 178 | path.moveTo(points[0].dx, points[0].dy); 179 | if (points.length < 2) { 180 | // If the path only has one line, draw a dot. 181 | path.addOval( 182 | Rect.fromCircle( 183 | center: Offset(points[0].dx, points[0].dy), 184 | radius: 1, 185 | ), 186 | ); 187 | } 188 | 189 | for (int i = 1; i < points.length - 1; ++i) { 190 | final p0 = points[i]; 191 | final p1 = points[i + 1]; 192 | path.quadraticBezierTo( 193 | p0.dx, 194 | p0.dy, 195 | (p0.dx + p1.dx) / 2, 196 | (p0.dy + p1.dy) / 2, 197 | ); 198 | } 199 | 200 | Paint paint = Paint() 201 | ..color = sketch.color 202 | ..strokeCap = StrokeCap.round; 203 | 204 | if (!sketch.filled) { 205 | paint.style = PaintingStyle.stroke; 206 | paint.strokeWidth = sketch.size; 207 | } 208 | 209 | // define first and last points for convenience 210 | Offset firstPoint = sketch.points.first; 211 | Offset lastPoint = sketch.points.last; 212 | 213 | // create rect to use rectangle and circle 214 | Rect rect = Rect.fromPoints(firstPoint, lastPoint); 215 | 216 | // Calculate center point from the first and last points 217 | Offset centerPoint = (firstPoint / 2) + (lastPoint / 2); 218 | 219 | // Calculate path's radius from the first and last points 220 | double radius = (firstPoint - lastPoint).distance / 2; 221 | 222 | if (sketch.type == SketchType.scribble) { 223 | canvas.drawPath(path, paint); 224 | } else if (sketch.type == SketchType.square) { 225 | canvas.drawRRect( 226 | RRect.fromRectAndRadius(rect, const Radius.circular(5)), 227 | paint, 228 | ); 229 | } else if (sketch.type == SketchType.line) { 230 | canvas.drawLine(firstPoint, lastPoint, paint); 231 | } else if (sketch.type == SketchType.circle) { 232 | canvas.drawOval(rect, paint); 233 | // Uncomment this line if you need a PERFECT CIRCLE 234 | // canvas.drawCircle(centerPoint, radius , paint); 235 | } else if (sketch.type == SketchType.polygon) { 236 | Path polygonPath = Path(); 237 | int sides = sketch.sides; 238 | var angle = (math.pi * 2) / sides; 239 | 240 | double radian = 0.0; 241 | 242 | Offset startPoint = 243 | Offset(radius * math.cos(radian), radius * math.sin(radian)); 244 | 245 | polygonPath.moveTo( 246 | startPoint.dx + centerPoint.dx, startPoint.dy + centerPoint.dy); 247 | for (int i = 1; i <= sides; i++) { 248 | double x = radius * math.cos(radian + angle * i) + centerPoint.dx; 249 | double y = radius * math.sin(radian + angle * i) + centerPoint.dy; 250 | polygonPath.lineTo(x, y); 251 | } 252 | polygonPath.close(); 253 | canvas.drawPath(polygonPath, paint); 254 | } 255 | } 256 | } 257 | 258 | @override 259 | bool shouldRepaint(covariant SketchPainter oldDelegate) { 260 | return oldDelegate.sketches != sketches; 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /lib/view/drawing_canvas/models/drawing_mode.dart: -------------------------------------------------------------------------------- 1 | enum DrawingMode { pencil, line, arrow, eraser, square, circle, polygon } 2 | -------------------------------------------------------------------------------- /lib/view/drawing_canvas/models/sketch.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_drawing_board/view/drawing_canvas/models/drawing_mode.dart'; 3 | 4 | class Sketch { 5 | final List points; 6 | final Color color; 7 | final double size; 8 | final SketchType type; 9 | final bool filled; 10 | final int sides; 11 | 12 | Sketch({ 13 | required this.points, 14 | this.color = Colors.black, 15 | this.type = SketchType.scribble, 16 | this.filled = true, 17 | this.sides = 3, 18 | required this.size, 19 | }); 20 | 21 | factory Sketch.fromDrawingMode( 22 | Sketch sketch, DrawingMode drawingMode, bool filled) { 23 | return Sketch( 24 | points: sketch.points, 25 | color: sketch.color, 26 | size: sketch.size, 27 | filled: drawingMode == DrawingMode.line || 28 | drawingMode == DrawingMode.pencil || 29 | drawingMode == DrawingMode.eraser 30 | ? false 31 | : filled, 32 | sides: sketch.sides, 33 | type: () { 34 | switch (drawingMode) { 35 | case DrawingMode.eraser: 36 | case DrawingMode.pencil: 37 | return SketchType.scribble; 38 | case DrawingMode.line: 39 | return SketchType.line; 40 | case DrawingMode.square: 41 | return SketchType.square; 42 | case DrawingMode.circle: 43 | return SketchType.circle; 44 | case DrawingMode.polygon: 45 | return SketchType.polygon; 46 | default: 47 | return SketchType.scribble; 48 | } 49 | }(), 50 | ); 51 | } 52 | 53 | Map toJson() { 54 | List pointsMap = points.map((e) => {'dx': e.dx, 'dy': e.dy}).toList(); 55 | return { 56 | 'points': pointsMap, 57 | 'color': color.toHex(), 58 | 'size': size, 59 | 'filled': filled, 60 | 'type': type.toRegularString(), 61 | 'sides': sides, 62 | }; 63 | } 64 | 65 | factory Sketch.fromJson(Map json) { 66 | List points = 67 | (json['points'] as List).map((e) => Offset(e['dx'], e['dy'])).toList(); 68 | return Sketch( 69 | points: points, 70 | color: (json['color'] as String).toColor(), 71 | size: json['size'], 72 | filled: json['filled'], 73 | type: (json['type'] as String).toSketchTypeEnum(), 74 | sides: json['sides'], 75 | ); 76 | } 77 | } 78 | 79 | enum SketchType { scribble, line, square, circle, polygon } 80 | 81 | extension SketchTypeX on SketchType { 82 | toRegularString() => toString().split('.')[1]; 83 | } 84 | 85 | extension SketchTypeExtension on String { 86 | toSketchTypeEnum() => 87 | SketchType.values.firstWhere((e) => e.toString() == 'SketchType.${this}'); 88 | } 89 | 90 | extension ColorExtension on String { 91 | Color toColor() { 92 | var hexColor = replaceAll('#', ''); 93 | if (hexColor.length == 6) { 94 | hexColor = 'FF$hexColor'; 95 | } 96 | if (hexColor.length == 8) { 97 | return Color(int.parse('0x$hexColor')); 98 | } else { 99 | return Colors.black; 100 | } 101 | } 102 | } 103 | 104 | extension ColorExtensionX on Color { 105 | String toHex() => '#${value.toRadixString(16).substring(2, 8)}'; 106 | } 107 | -------------------------------------------------------------------------------- /lib/view/drawing_canvas/widgets/canvas_side_bar.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | import 'dart:ui' as ui; 4 | 5 | import 'package:file_picker/file_picker.dart'; 6 | import 'package:file_saver/file_saver.dart'; 7 | import 'package:flutter/foundation.dart'; 8 | import 'package:flutter/material.dart' hide Image; 9 | import 'package:flutter/rendering.dart'; 10 | import 'package:flutter/services.dart'; 11 | import 'package:flutter_drawing_board/main.dart'; 12 | import 'package:flutter_drawing_board/view/drawing_canvas/models/drawing_mode.dart'; 13 | import 'package:flutter_drawing_board/view/drawing_canvas/models/sketch.dart'; 14 | import 'package:flutter_drawing_board/view/drawing_canvas/widgets/color_palette.dart'; 15 | import 'package:flutter_hooks/flutter_hooks.dart'; 16 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 17 | import 'package:image_picker/image_picker.dart'; 18 | import 'package:universal_html/html.dart' as html; 19 | import 'package:url_launcher/url_launcher.dart'; 20 | 21 | class CanvasSideBar extends HookWidget { 22 | final ValueNotifier selectedColor; 23 | final ValueNotifier strokeSize; 24 | final ValueNotifier eraserSize; 25 | final ValueNotifier drawingMode; 26 | final ValueNotifier currentSketch; 27 | final ValueNotifier> allSketches; 28 | final GlobalKey canvasGlobalKey; 29 | final ValueNotifier filled; 30 | final ValueNotifier polygonSides; 31 | final ValueNotifier backgroundImage; 32 | 33 | const CanvasSideBar({ 34 | Key? key, 35 | required this.selectedColor, 36 | required this.strokeSize, 37 | required this.eraserSize, 38 | required this.drawingMode, 39 | required this.currentSketch, 40 | required this.allSketches, 41 | required this.canvasGlobalKey, 42 | required this.filled, 43 | required this.polygonSides, 44 | required this.backgroundImage, 45 | }) : super(key: key); 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | final undoRedoStack = useState(_UndoRedoStack( 50 | sketchesNotifier: allSketches, 51 | currentSketchNotifier: currentSketch, 52 | )); 53 | final scrollController = useScrollController(); 54 | return Container( 55 | width: 300, 56 | height: MediaQuery.of(context).size.height < 680 ? 450 : 610, 57 | decoration: BoxDecoration( 58 | color: Colors.white, 59 | borderRadius: const BorderRadius.horizontal(right: Radius.circular(10)), 60 | boxShadow: [ 61 | BoxShadow( 62 | color: Colors.grey.shade200, 63 | blurRadius: 3, 64 | offset: const Offset(3, 3), 65 | ), 66 | ], 67 | ), 68 | child: Scrollbar( 69 | controller: scrollController, 70 | thumbVisibility: true, 71 | trackVisibility: true, 72 | child: ListView( 73 | padding: const EdgeInsets.all(10.0), 74 | controller: scrollController, 75 | children: [ 76 | const SizedBox(height: 10), 77 | const Text( 78 | 'Shapes', 79 | style: TextStyle(fontWeight: FontWeight.bold), 80 | ), 81 | const Divider(), 82 | Wrap( 83 | alignment: WrapAlignment.start, 84 | spacing: 5, 85 | runSpacing: 5, 86 | children: [ 87 | _IconBox( 88 | iconData: FontAwesomeIcons.pencil, 89 | selected: drawingMode.value == DrawingMode.pencil, 90 | onTap: () => drawingMode.value = DrawingMode.pencil, 91 | tooltip: 'Pencil', 92 | ), 93 | _IconBox( 94 | selected: drawingMode.value == DrawingMode.line, 95 | onTap: () => drawingMode.value = DrawingMode.line, 96 | tooltip: 'Line', 97 | child: Column( 98 | mainAxisAlignment: MainAxisAlignment.center, 99 | children: [ 100 | Container( 101 | width: 22, 102 | height: 2, 103 | color: drawingMode.value == DrawingMode.line 104 | ? Colors.grey[900] 105 | : Colors.grey, 106 | ), 107 | ], 108 | ), 109 | ), 110 | _IconBox( 111 | iconData: Icons.hexagon_outlined, 112 | selected: drawingMode.value == DrawingMode.polygon, 113 | onTap: () => drawingMode.value = DrawingMode.polygon, 114 | tooltip: 'Polygon', 115 | ), 116 | _IconBox( 117 | iconData: FontAwesomeIcons.eraser, 118 | selected: drawingMode.value == DrawingMode.eraser, 119 | onTap: () => drawingMode.value = DrawingMode.eraser, 120 | tooltip: 'Eraser', 121 | ), 122 | _IconBox( 123 | iconData: FontAwesomeIcons.square, 124 | selected: drawingMode.value == DrawingMode.square, 125 | onTap: () => drawingMode.value = DrawingMode.square, 126 | tooltip: 'Square', 127 | ), 128 | _IconBox( 129 | iconData: FontAwesomeIcons.circle, 130 | selected: drawingMode.value == DrawingMode.circle, 131 | onTap: () => drawingMode.value = DrawingMode.circle, 132 | tooltip: 'Circle', 133 | ), 134 | ], 135 | ), 136 | const SizedBox(height: 8), 137 | Row( 138 | children: [ 139 | const Text( 140 | 'Fill Shape: ', 141 | style: TextStyle(fontSize: 12), 142 | ), 143 | Checkbox( 144 | value: filled.value, 145 | onChanged: (val) { 146 | filled.value = val ?? false; 147 | }, 148 | ), 149 | ], 150 | ), 151 | 152 | AnimatedSwitcher( 153 | duration: const Duration(milliseconds: 150), 154 | child: drawingMode.value == DrawingMode.polygon 155 | ? Row( 156 | children: [ 157 | const Text( 158 | 'Polygon Sides: ', 159 | style: TextStyle(fontSize: 12), 160 | ), 161 | Slider( 162 | value: polygonSides.value.toDouble(), 163 | min: 3, 164 | max: 8, 165 | onChanged: (val) { 166 | polygonSides.value = val.toInt(); 167 | }, 168 | label: '${polygonSides.value}', 169 | divisions: 5, 170 | ), 171 | ], 172 | ) 173 | : const SizedBox.shrink(), 174 | ), 175 | const SizedBox(height: 10), 176 | const Text( 177 | 'Colors', 178 | style: TextStyle(fontWeight: FontWeight.bold), 179 | ), 180 | const Divider(), 181 | ColorPalette( 182 | selectedColor: selectedColor, 183 | ), 184 | const SizedBox(height: 20), 185 | const Text( 186 | 'Size', 187 | style: TextStyle(fontWeight: FontWeight.bold), 188 | ), 189 | const Divider(), 190 | Row( 191 | children: [ 192 | const Text( 193 | 'Stroke Size: ', 194 | style: TextStyle(fontSize: 12), 195 | ), 196 | Slider( 197 | value: strokeSize.value, 198 | min: 0, 199 | max: 50, 200 | onChanged: (val) { 201 | strokeSize.value = val; 202 | }, 203 | ), 204 | ], 205 | ), 206 | Row( 207 | children: [ 208 | const Text( 209 | 'Eraser Size: ', 210 | style: TextStyle(fontSize: 12), 211 | ), 212 | Slider( 213 | value: eraserSize.value, 214 | min: 0, 215 | max: 80, 216 | onChanged: (val) { 217 | eraserSize.value = val; 218 | }, 219 | ), 220 | ], 221 | ), 222 | const SizedBox(height: 20), 223 | const Text( 224 | 'Actions', 225 | style: TextStyle(fontWeight: FontWeight.bold), 226 | ), 227 | const Divider(), 228 | Wrap( 229 | children: [ 230 | TextButton( 231 | onPressed: allSketches.value.isNotEmpty 232 | ? () => undoRedoStack.value.undo() 233 | : null, 234 | child: const Text('Undo'), 235 | ), 236 | ValueListenableBuilder( 237 | valueListenable: undoRedoStack.value._canRedo, 238 | builder: (_, canRedo, __) { 239 | return TextButton( 240 | onPressed: 241 | canRedo ? () => undoRedoStack.value.redo() : null, 242 | child: const Text('Redo'), 243 | ); 244 | }, 245 | ), 246 | TextButton( 247 | child: const Text('Clear'), 248 | onPressed: () => undoRedoStack.value.clear(), 249 | ), 250 | TextButton( 251 | onPressed: () async { 252 | if (backgroundImage.value != null) { 253 | backgroundImage.value = null; 254 | } else { 255 | backgroundImage.value = await _getImage; 256 | } 257 | }, 258 | child: Text( 259 | backgroundImage.value == null 260 | ? 'Add Background' 261 | : 'Remove Background', 262 | ), 263 | ), 264 | ], 265 | ), 266 | const SizedBox(height: 20), 267 | const Text( 268 | 'Export', 269 | style: TextStyle(fontWeight: FontWeight.bold), 270 | ), 271 | const Divider(), 272 | Row( 273 | children: [ 274 | SizedBox( 275 | width: 140, 276 | child: TextButton( 277 | child: const Text('Export PNG'), 278 | onPressed: () async { 279 | Uint8List? pngBytes = await getBytes(); 280 | if (pngBytes != null) { 281 | saveFile(pngBytes, 'png'); 282 | const snackBar = SnackBar( 283 | content: Text('Image saved in your app file directory'), 284 | ); 285 | ScaffoldMessenger.of(context).showSnackBar(snackBar); 286 | } 287 | }, 288 | ), 289 | ), 290 | SizedBox( 291 | width: 140, 292 | child: TextButton( 293 | child: const Text('Export JPEG'), 294 | onPressed: () async { 295 | Uint8List? pngBytes = await getBytes(); 296 | if (pngBytes != null) { 297 | saveFile(pngBytes, 'jpeg'); 298 | const snackBar = SnackBar( 299 | content: Text('Image saved in your app file directory'), 300 | ); 301 | ScaffoldMessenger.of(context).showSnackBar(snackBar); 302 | } 303 | }, 304 | ), 305 | ), 306 | ], 307 | ), 308 | // add about me button or follow buttons 309 | const Divider(), 310 | ], 311 | ), 312 | ), 313 | ); 314 | } 315 | 316 | void saveFile(Uint8List bytes, String extension) async { 317 | if (kIsWeb) { 318 | html.AnchorElement() 319 | ..href = '${Uri.dataFromBytes(bytes, mimeType: 'image/$extension')}' 320 | ..download = 321 | 'FlutterLetsDraw-${DateTime.now().toIso8601String()}.$extension' 322 | ..style.display = 'none' 323 | ..click(); 324 | } else { 325 | await FileSaver.instance.saveFile( 326 | 'FlutterLetsDraw-${DateTime.now().toIso8601String()}.$extension', 327 | bytes, 328 | extension, 329 | mimeType: extension == 'png' ? MimeType.PNG : MimeType.JPEG, 330 | ); 331 | } 332 | } 333 | 334 | Future get _getImage async { 335 | final completer = Completer(); 336 | if (!kIsWeb && !Platform.isAndroid && !Platform.isIOS) { 337 | final file = await FilePicker.platform.pickFiles( 338 | type: FileType.image, 339 | allowMultiple: false, 340 | ); 341 | if (file != null) { 342 | final filePath = file.files.single.path; 343 | final bytes = filePath == null 344 | ? file.files.first.bytes 345 | : File(filePath).readAsBytesSync(); 346 | if (bytes != null) { 347 | completer.complete(decodeImageFromList(bytes)); 348 | } else { 349 | completer.completeError('No image selected'); 350 | } 351 | } 352 | } else { 353 | final image = await ImagePicker().pickImage(source: ImageSource.gallery); 354 | if (image != null) { 355 | final bytes = await image.readAsBytes(); 356 | completer.complete( 357 | decodeImageFromList(bytes), 358 | ); 359 | } else { 360 | completer.completeError('No image selected'); 361 | } 362 | } 363 | 364 | return completer.future; 365 | } 366 | 367 | Future _launchUrl(String url) async { 368 | if (kIsWeb) { 369 | html.window.open( 370 | url, 371 | url, 372 | ); 373 | } else { 374 | if (!await launchUrl(Uri.parse(url))) { 375 | throw 'Could not launch $url'; 376 | } 377 | } 378 | } 379 | 380 | Future getBytes() async { 381 | RenderRepaintBoundary boundary = canvasGlobalKey.currentContext 382 | ?.findRenderObject() as RenderRepaintBoundary; 383 | ui.Image image = await boundary.toImage(); 384 | ByteData? byteData = await image.toByteData(format: ui.ImageByteFormat.png); 385 | Uint8List? pngBytes = byteData?.buffer.asUint8List(); 386 | return pngBytes; 387 | } 388 | } 389 | 390 | class _IconBox extends StatelessWidget { 391 | final IconData? iconData; 392 | final Widget? child; 393 | final bool selected; 394 | final VoidCallback onTap; 395 | final String? tooltip; 396 | 397 | const _IconBox({ 398 | Key? key, 399 | this.iconData, 400 | this.child, 401 | this.tooltip, 402 | required this.selected, 403 | required this.onTap, 404 | }) : assert(child != null || iconData != null), 405 | super(key: key); 406 | 407 | @override 408 | Widget build(BuildContext context) { 409 | return MouseRegion( 410 | cursor: SystemMouseCursors.click, 411 | child: GestureDetector( 412 | onTap: onTap, 413 | child: Container( 414 | height: 35, 415 | width: 35, 416 | decoration: BoxDecoration( 417 | border: Border.all( 418 | color: selected ? Colors.grey[900]! : Colors.grey, 419 | width: 1.5, 420 | ), 421 | borderRadius: const BorderRadius.all(Radius.circular(5)), 422 | ), 423 | child: Tooltip( 424 | message: tooltip, 425 | preferBelow: false, 426 | child: child ?? 427 | Icon( 428 | iconData, 429 | color: selected ? Colors.grey[900] : Colors.grey, 430 | size: 20, 431 | ), 432 | ), 433 | ), 434 | ), 435 | ); 436 | } 437 | } 438 | 439 | ///A data structure for undoing and redoing sketches. 440 | class _UndoRedoStack { 441 | _UndoRedoStack({ 442 | required this.sketchesNotifier, 443 | required this.currentSketchNotifier, 444 | }) { 445 | _sketchCount = sketchesNotifier.value.length; 446 | sketchesNotifier.addListener(_sketchesCountListener); 447 | } 448 | 449 | final ValueNotifier> sketchesNotifier; 450 | final ValueNotifier currentSketchNotifier; 451 | 452 | ///Collection of sketches that can be redone. 453 | late final List _redoStack = []; 454 | 455 | ///Whether redo operation is possible. 456 | ValueNotifier get canRedo => _canRedo; 457 | late final ValueNotifier _canRedo = ValueNotifier(false); 458 | 459 | late int _sketchCount; 460 | 461 | void _sketchesCountListener() { 462 | if (sketchesNotifier.value.length > _sketchCount) { 463 | //if a new sketch is drawn, 464 | //history is invalidated so clear redo stack 465 | _redoStack.clear(); 466 | _canRedo.value = false; 467 | _sketchCount = sketchesNotifier.value.length; 468 | } 469 | } 470 | 471 | void clear() { 472 | _sketchCount = 0; 473 | sketchesNotifier.value = []; 474 | _canRedo.value = false; 475 | currentSketchNotifier.value = null; 476 | } 477 | 478 | void undo() { 479 | final sketches = List.from(sketchesNotifier.value); 480 | if (sketches.isNotEmpty) { 481 | _sketchCount--; 482 | _redoStack.add(sketches.removeLast()); 483 | sketchesNotifier.value = sketches; 484 | _canRedo.value = true; 485 | currentSketchNotifier.value = null; 486 | } 487 | } 488 | 489 | void redo() { 490 | if (_redoStack.isEmpty) return; 491 | final sketch = _redoStack.removeLast(); 492 | _canRedo.value = _redoStack.isNotEmpty; 493 | _sketchCount++; 494 | sketchesNotifier.value = [...sketchesNotifier.value, sketch]; 495 | } 496 | 497 | void dispose() { 498 | sketchesNotifier.removeListener(_sketchesCountListener); 499 | } 500 | } 501 | -------------------------------------------------------------------------------- /lib/view/drawing_canvas/widgets/color_palette.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_colorpicker/flutter_colorpicker.dart'; 3 | import 'package:flutter_hooks/flutter_hooks.dart'; 4 | import 'package:flutter_svg/svg.dart'; 5 | 6 | class ColorPalette extends HookWidget { 7 | final ValueNotifier selectedColor; 8 | 9 | const ColorPalette({ 10 | Key? key, 11 | required this.selectedColor, 12 | }) : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | List colors = [ 17 | Colors.black, 18 | Colors.white, 19 | ...Colors.primaries, 20 | ]; 21 | return Column( 22 | mainAxisSize: MainAxisSize.min, 23 | mainAxisAlignment: MainAxisAlignment.start, 24 | crossAxisAlignment: CrossAxisAlignment.center, 25 | children: [ 26 | Wrap( 27 | alignment: WrapAlignment.center, 28 | spacing: 2, 29 | runSpacing: 2, 30 | children: [ 31 | for (Color color in colors) 32 | MouseRegion( 33 | cursor: SystemMouseCursors.click, 34 | child: GestureDetector( 35 | onTap: () => selectedColor.value = color, 36 | child: Container( 37 | height: 25, 38 | width: 25, 39 | decoration: BoxDecoration( 40 | color: color, 41 | border: Border.all( 42 | color: selectedColor.value == color 43 | ? Colors.blue 44 | : Colors.grey, 45 | width: 1.5), 46 | borderRadius: const BorderRadius.all(Radius.circular(5)), 47 | ), 48 | ), 49 | ), 50 | ), 51 | ], 52 | ), 53 | const SizedBox(height: 10), 54 | Row( 55 | mainAxisSize: MainAxisSize.min, 56 | children: [ 57 | Container( 58 | height: 30, 59 | width: 30, 60 | decoration: BoxDecoration( 61 | color: selectedColor.value, 62 | border: Border.all(color: Colors.blue, width: 1.5), 63 | borderRadius: const BorderRadius.all(Radius.circular(5)), 64 | ), 65 | ), 66 | const SizedBox(width: 10), 67 | MouseRegion( 68 | cursor: SystemMouseCursors.click, 69 | child: GestureDetector( 70 | onTap: () { 71 | showColorWheel(context, selectedColor); 72 | }, 73 | child: SvgPicture.asset( 74 | 'assets/svgs/color_wheel.svg', 75 | height: 30, 76 | width: 30, 77 | ), 78 | ), 79 | ), 80 | ], 81 | ), 82 | ], 83 | ); 84 | } 85 | 86 | showColorWheel(BuildContext context, ValueNotifier color) { 87 | showDialog( 88 | context: context, 89 | builder: (BuildContext context) { 90 | return AlertDialog( 91 | title: const Text('Pick a color!'), 92 | content: SingleChildScrollView( 93 | child: ColorPicker( 94 | pickerColor: color.value, 95 | onColorChanged: (value) { 96 | color.value = value; 97 | }, 98 | ), 99 | ), 100 | actions: [ 101 | TextButton( 102 | child: const Text('Done'), 103 | onPressed: () => Navigator.pop(context), 104 | ), 105 | ], 106 | ); 107 | }, 108 | ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /lib/view/drawing_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart' hide Image; 4 | import 'package:flutter_drawing_board/main.dart'; 5 | import 'package:flutter_drawing_board/view/drawing_canvas/drawing_canvas.dart'; 6 | import 'package:flutter_drawing_board/view/drawing_canvas/models/drawing_mode.dart'; 7 | import 'package:flutter_drawing_board/view/drawing_canvas/models/sketch.dart'; 8 | import 'package:flutter_drawing_board/view/drawing_canvas/widgets/canvas_side_bar.dart'; 9 | import 'package:flutter_hooks/flutter_hooks.dart'; 10 | 11 | /* 12 | * 13 | * drawing page ------------------------------ 14 | * 15 | * */ 16 | class DrawingPage extends HookWidget { 17 | const DrawingPage({Key? key}) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | final selectedColor = useState(Colors.black); 22 | final strokeSize = useState(10); 23 | final eraserSize = useState(30); 24 | final drawingMode = useState(DrawingMode.pencil); 25 | final filled = useState(false); 26 | final polygonSides = useState(3); 27 | final backgroundImage = useState(null); 28 | 29 | final canvasGlobalKey = GlobalKey(); 30 | 31 | ValueNotifier currentSketch = useState(null); 32 | ValueNotifier> allSketches = useState([]); 33 | 34 | final animationController = useAnimationController( 35 | duration: const Duration(milliseconds: 150), 36 | initialValue: 1, 37 | ); 38 | 39 | return Scaffold( 40 | body: SafeArea( 41 | child: Stack( 42 | children: [ 43 | /// 44 | /// container with the canvas 45 | Container( 46 | color: kCanvasColor, 47 | width: double.maxFinite, 48 | height: double.maxFinite, 49 | child: DrawingCanvas( 50 | width: MediaQuery.of(context).size.width, 51 | height: MediaQuery.of(context).size.height, 52 | drawingMode: drawingMode, 53 | selectedColor: selectedColor, 54 | strokeSize: strokeSize, 55 | eraserSize: eraserSize, 56 | sideBarController: animationController, 57 | currentSketch: currentSketch, 58 | allSketches: allSketches, 59 | canvasGlobalKey: canvasGlobalKey, 60 | filled: filled, 61 | polygonSides: polygonSides, 62 | backgroundImage: backgroundImage, 63 | ), 64 | ), 65 | 66 | /// 67 | /// drawer widget with animation slider 68 | Positioned( 69 | top: kToolbarHeight + 10, 70 | // left: -5, 71 | child: SlideTransition( 72 | position: Tween( 73 | begin: const Offset(-1, 0), 74 | end: Offset.zero, 75 | ).animate(animationController), 76 | child: CanvasSideBar( 77 | drawingMode: drawingMode, 78 | selectedColor: selectedColor, 79 | strokeSize: strokeSize, 80 | eraserSize: eraserSize, 81 | currentSketch: currentSketch, 82 | allSketches: allSketches, 83 | canvasGlobalKey: canvasGlobalKey, 84 | filled: filled, 85 | polygonSides: polygonSides, 86 | backgroundImage: backgroundImage, 87 | ), 88 | ), 89 | ), 90 | 91 | /// 92 | /// app bar on the top 93 | _CustomAppBar(animationController: animationController), 94 | ], 95 | ), 96 | ), 97 | ); 98 | } 99 | } 100 | 101 | 102 | /* 103 | * 104 | * app bar containing drawer icon ------------------------------ 105 | * 106 | * */ 107 | class _CustomAppBar extends StatelessWidget { 108 | final AnimationController animationController; 109 | 110 | const _CustomAppBar({Key? key, required this.animationController}) 111 | : super(key: key); 112 | 113 | @override 114 | Widget build(BuildContext context) { 115 | return SizedBox( 116 | height: kToolbarHeight, 117 | width: double.maxFinite, 118 | child: Padding( 119 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10), 120 | child: Row( 121 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 122 | children: [ 123 | IconButton( 124 | onPressed: () { 125 | if (animationController.value == 0) { 126 | animationController.forward(); 127 | } else { 128 | animationController.reverse(); 129 | } 130 | }, 131 | icon: const Icon(Icons.menu), 132 | ), 133 | const Text( 134 | 'Drawing Board', 135 | style: TextStyle( 136 | fontWeight: FontWeight.bold, 137 | fontSize: 19, 138 | ), 139 | ), 140 | const SizedBox.shrink(), 141 | ], 142 | ), 143 | ), 144 | ); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import file_saver 9 | import path_provider_macos 10 | import url_launcher_macos 11 | 12 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 13 | FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin")) 14 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 15 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 16 | } 17 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.11' 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 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - file_saver (0.0.1): 3 | - FlutterMacOS 4 | - FlutterMacOS (1.0.0) 5 | - path_provider_macos (0.0.1): 6 | - FlutterMacOS 7 | - url_launcher_macos (0.0.1): 8 | - FlutterMacOS 9 | 10 | DEPENDENCIES: 11 | - file_saver (from `Flutter/ephemeral/.symlinks/plugins/file_saver/macos`) 12 | - FlutterMacOS (from `Flutter/ephemeral`) 13 | - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) 14 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) 15 | 16 | EXTERNAL SOURCES: 17 | file_saver: 18 | :path: Flutter/ephemeral/.symlinks/plugins/file_saver/macos 19 | FlutterMacOS: 20 | :path: Flutter/ephemeral 21 | path_provider_macos: 22 | :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos 23 | url_launcher_macos: 24 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos 25 | 26 | SPEC CHECKSUMS: 27 | file_saver: 44e6fbf666677faf097302460e214e977fdd977b 28 | FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811 29 | path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 30 | url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3 31 | 32 | PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c 33 | 34 | COCOAPODS: 1.11.3 35 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = flutter_drawing_board 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.jideguru.flutterDrawingBoard 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.jideguru. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | com.apple.security.files.downloads.read-write 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 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 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "2.11.0" 12 | boolean_selector: 13 | dependency: transitive 14 | description: 15 | name: boolean_selector 16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "2.1.1" 20 | characters: 21 | dependency: transitive 22 | description: 23 | name: characters 24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "1.3.0" 28 | charcode: 29 | dependency: transitive 30 | description: 31 | name: charcode 32 | sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "1.3.1" 36 | clock: 37 | dependency: transitive 38 | description: 39 | name: clock 40 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "1.1.1" 44 | collection: 45 | dependency: transitive 46 | description: 47 | name: collection 48 | sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.17.1" 52 | cross_file: 53 | dependency: transitive 54 | description: 55 | name: cross_file 56 | sha256: f71079978789bc2fe78d79227f1f8cfe195b31bbd8db2399b0d15a4b96fb843b 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "0.3.3+2" 60 | crypto: 61 | dependency: transitive 62 | description: 63 | name: crypto 64 | sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "3.0.2" 68 | csslib: 69 | dependency: transitive 70 | description: 71 | name: csslib 72 | sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "0.17.2" 76 | cupertino_icons: 77 | dependency: "direct main" 78 | description: 79 | name: cupertino_icons 80 | sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "1.0.5" 84 | fake_async: 85 | dependency: transitive 86 | description: 87 | name: fake_async 88 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "1.3.1" 92 | ffi: 93 | dependency: transitive 94 | description: 95 | name: ffi 96 | sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 97 | url: "https://pub.dev" 98 | source: hosted 99 | version: "2.0.1" 100 | file: 101 | dependency: transitive 102 | description: 103 | name: file 104 | sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" 105 | url: "https://pub.dev" 106 | source: hosted 107 | version: "6.1.4" 108 | file_picker: 109 | dependency: "direct main" 110 | description: 111 | name: file_picker 112 | sha256: c24465c112b1a31a37ac450afc2e1f927b7c11599beab93233d7ffb449373fe3 113 | url: "https://pub.dev" 114 | source: hosted 115 | version: "5.2.2" 116 | file_saver: 117 | dependency: "direct main" 118 | description: 119 | name: file_saver 120 | sha256: "9efc615b43127952aa394e98b23d9e932715e8c008dc10710177008882b3d141" 121 | url: "https://pub.dev" 122 | source: hosted 123 | version: "0.1.1" 124 | flutter: 125 | dependency: "direct main" 126 | description: flutter 127 | source: sdk 128 | version: "0.0.0" 129 | flutter_colorpicker: 130 | dependency: "direct main" 131 | description: 132 | name: flutter_colorpicker 133 | sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b" 134 | url: "https://pub.dev" 135 | source: hosted 136 | version: "1.0.3" 137 | flutter_hooks: 138 | dependency: "direct main" 139 | description: 140 | name: flutter_hooks 141 | sha256: "2b202559a4ed3656bbb7aae9d8b335fb0037b23acc7ae3f377d1ba0b95c21aec" 142 | url: "https://pub.dev" 143 | source: hosted 144 | version: "0.18.5+1" 145 | flutter_lints: 146 | dependency: "direct dev" 147 | description: 148 | name: flutter_lints 149 | sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c 150 | url: "https://pub.dev" 151 | source: hosted 152 | version: "2.0.1" 153 | flutter_plugin_android_lifecycle: 154 | dependency: transitive 155 | description: 156 | name: flutter_plugin_android_lifecycle 157 | sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b" 158 | url: "https://pub.dev" 159 | source: hosted 160 | version: "2.0.7" 161 | flutter_svg: 162 | dependency: "direct main" 163 | description: 164 | name: flutter_svg 165 | sha256: f2aa23d9d1721cd5c2c5097558368d2a1f85be35a85a6cf26a626e80c369a47c 166 | url: "https://pub.dev" 167 | source: hosted 168 | version: "1.1.5" 169 | flutter_test: 170 | dependency: "direct dev" 171 | description: flutter 172 | source: sdk 173 | version: "0.0.0" 174 | flutter_web_plugins: 175 | dependency: transitive 176 | description: flutter 177 | source: sdk 178 | version: "0.0.0" 179 | font_awesome_flutter: 180 | dependency: "direct main" 181 | description: 182 | name: font_awesome_flutter 183 | sha256: "8f0ce0204bd0cafa8631536a6f3b7d05d9c16cdc6e8bd807843f917027c5cefd" 184 | url: "https://pub.dev" 185 | source: hosted 186 | version: "10.2.1" 187 | html: 188 | dependency: transitive 189 | description: 190 | name: html 191 | sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 192 | url: "https://pub.dev" 193 | source: hosted 194 | version: "0.15.1" 195 | http: 196 | dependency: transitive 197 | description: 198 | name: http 199 | sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" 200 | url: "https://pub.dev" 201 | source: hosted 202 | version: "0.13.5" 203 | http_parser: 204 | dependency: transitive 205 | description: 206 | name: http_parser 207 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" 208 | url: "https://pub.dev" 209 | source: hosted 210 | version: "4.0.2" 211 | image_picker: 212 | dependency: "direct main" 213 | description: 214 | name: image_picker 215 | sha256: a8f2f0aed50c03230ab37e93ca2905c50b6c4097245345956eb24a88f45328cd 216 | url: "https://pub.dev" 217 | source: hosted 218 | version: "0.8.6" 219 | image_picker_android: 220 | dependency: transitive 221 | description: 222 | name: image_picker_android 223 | sha256: "822f71a53336bf1e638dbf955047080ca49ba0197f52c4fece9cf584c368648a" 224 | url: "https://pub.dev" 225 | source: hosted 226 | version: "0.8.5+3" 227 | image_picker_for_web: 228 | dependency: transitive 229 | description: 230 | name: image_picker_for_web 231 | sha256: "7d319fb74955ca46d9bf7011497860e3923bb67feebcf068f489311065863899" 232 | url: "https://pub.dev" 233 | source: hosted 234 | version: "2.1.10" 235 | image_picker_ios: 236 | dependency: transitive 237 | description: 238 | name: image_picker_ios 239 | sha256: "1768087441bd69ca632249d212c26fa8d530552d37b4896a4dd8d6781435c147" 240 | url: "https://pub.dev" 241 | source: hosted 242 | version: "0.8.6+1" 243 | image_picker_platform_interface: 244 | dependency: transitive 245 | description: 246 | name: image_picker_platform_interface 247 | sha256: "7cef2f28f4f2fef99180f636c3d446b4ccbafd6ba0fad2adc9a80c4040f656b8" 248 | url: "https://pub.dev" 249 | source: hosted 250 | version: "2.6.2" 251 | js: 252 | dependency: transitive 253 | description: 254 | name: js 255 | sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 256 | url: "https://pub.dev" 257 | source: hosted 258 | version: "0.6.7" 259 | lints: 260 | dependency: transitive 261 | description: 262 | name: lints 263 | sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3" 264 | url: "https://pub.dev" 265 | source: hosted 266 | version: "2.0.0" 267 | matcher: 268 | dependency: transitive 269 | description: 270 | name: matcher 271 | sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" 272 | url: "https://pub.dev" 273 | source: hosted 274 | version: "0.12.15" 275 | material_color_utilities: 276 | dependency: transitive 277 | description: 278 | name: material_color_utilities 279 | sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 280 | url: "https://pub.dev" 281 | source: hosted 282 | version: "0.2.0" 283 | meta: 284 | dependency: transitive 285 | description: 286 | name: meta 287 | sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" 288 | url: "https://pub.dev" 289 | source: hosted 290 | version: "1.9.1" 291 | path: 292 | dependency: transitive 293 | description: 294 | name: path 295 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" 296 | url: "https://pub.dev" 297 | source: hosted 298 | version: "1.8.3" 299 | path_drawing: 300 | dependency: transitive 301 | description: 302 | name: path_drawing 303 | sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 304 | url: "https://pub.dev" 305 | source: hosted 306 | version: "1.0.1" 307 | path_parsing: 308 | dependency: transitive 309 | description: 310 | name: path_parsing 311 | sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf 312 | url: "https://pub.dev" 313 | source: hosted 314 | version: "1.0.1" 315 | path_provider: 316 | dependency: transitive 317 | description: 318 | name: path_provider 319 | sha256: "050e8e85e4b7fecdf2bb3682c1c64c4887a183720c802d323de8a5fd76d372dd" 320 | url: "https://pub.dev" 321 | source: hosted 322 | version: "2.0.11" 323 | path_provider_android: 324 | dependency: transitive 325 | description: 326 | name: path_provider_android 327 | sha256: "4d5542667150f5b779ba411dd5dc0b674a85d1355e45bda2877e0e82f4ad08d8" 328 | url: "https://pub.dev" 329 | source: hosted 330 | version: "2.0.20" 331 | path_provider_ios: 332 | dependency: transitive 333 | description: 334 | name: path_provider_ios 335 | sha256: "03d639406f5343478352433f00d3c4394d52dac8df3d847869c5e2333e0bbce8" 336 | url: "https://pub.dev" 337 | source: hosted 338 | version: "2.0.11" 339 | path_provider_linux: 340 | dependency: transitive 341 | description: 342 | name: path_provider_linux 343 | sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379 344 | url: "https://pub.dev" 345 | source: hosted 346 | version: "2.1.7" 347 | path_provider_macos: 348 | dependency: transitive 349 | description: 350 | name: path_provider_macos 351 | sha256: "2a97e7fbb7ae9dcd0dfc1220a78e9ec3e71da691912e617e8715ff2a13086ae8" 352 | url: "https://pub.dev" 353 | source: hosted 354 | version: "2.0.6" 355 | path_provider_platform_interface: 356 | dependency: transitive 357 | description: 358 | name: path_provider_platform_interface 359 | sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 360 | url: "https://pub.dev" 361 | source: hosted 362 | version: "2.0.5" 363 | path_provider_windows: 364 | dependency: transitive 365 | description: 366 | name: path_provider_windows 367 | sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c 368 | url: "https://pub.dev" 369 | source: hosted 370 | version: "2.1.3" 371 | petitparser: 372 | dependency: transitive 373 | description: 374 | name: petitparser 375 | sha256: "2ebb289dc4764ec397f5cd3ca9881c6d17196130a7d646ed022a0dd9c2e25a71" 376 | url: "https://pub.dev" 377 | source: hosted 378 | version: "5.0.0" 379 | platform: 380 | dependency: transitive 381 | description: 382 | name: platform 383 | sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" 384 | url: "https://pub.dev" 385 | source: hosted 386 | version: "3.1.0" 387 | plugin_platform_interface: 388 | dependency: transitive 389 | description: 390 | name: plugin_platform_interface 391 | sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a 392 | url: "https://pub.dev" 393 | source: hosted 394 | version: "2.1.3" 395 | process: 396 | dependency: transitive 397 | description: 398 | name: process 399 | sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" 400 | url: "https://pub.dev" 401 | source: hosted 402 | version: "4.2.4" 403 | sky_engine: 404 | dependency: transitive 405 | description: flutter 406 | source: sdk 407 | version: "0.0.99" 408 | source_span: 409 | dependency: transitive 410 | description: 411 | name: source_span 412 | sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 413 | url: "https://pub.dev" 414 | source: hosted 415 | version: "1.9.1" 416 | stack_trace: 417 | dependency: transitive 418 | description: 419 | name: stack_trace 420 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 421 | url: "https://pub.dev" 422 | source: hosted 423 | version: "1.11.0" 424 | stream_channel: 425 | dependency: transitive 426 | description: 427 | name: stream_channel 428 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" 429 | url: "https://pub.dev" 430 | source: hosted 431 | version: "2.1.1" 432 | string_scanner: 433 | dependency: transitive 434 | description: 435 | name: string_scanner 436 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 437 | url: "https://pub.dev" 438 | source: hosted 439 | version: "1.2.0" 440 | term_glyph: 441 | dependency: transitive 442 | description: 443 | name: term_glyph 444 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 445 | url: "https://pub.dev" 446 | source: hosted 447 | version: "1.2.1" 448 | test_api: 449 | dependency: transitive 450 | description: 451 | name: test_api 452 | sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb 453 | url: "https://pub.dev" 454 | source: hosted 455 | version: "0.5.1" 456 | typed_data: 457 | dependency: transitive 458 | description: 459 | name: typed_data 460 | sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" 461 | url: "https://pub.dev" 462 | source: hosted 463 | version: "1.3.1" 464 | universal_html: 465 | dependency: "direct main" 466 | description: 467 | name: universal_html 468 | sha256: "5ff50b7c14d201421cf5230ec389a0591c4deb5c817c9d7ccca3b26fe5f31e34" 469 | url: "https://pub.dev" 470 | source: hosted 471 | version: "2.0.8" 472 | universal_io: 473 | dependency: transitive 474 | description: 475 | name: universal_io 476 | sha256: "79f78ddad839ee3aae3ec7c01eb4575faf0d5c860f8e5223bc9f9c17f7f03cef" 477 | url: "https://pub.dev" 478 | source: hosted 479 | version: "2.0.4" 480 | url_launcher: 481 | dependency: "direct main" 482 | description: 483 | name: url_launcher 484 | sha256: "568176fc8ab5ac1d88ff0db8ff28659d103851670dda55e83b485664c2309299" 485 | url: "https://pub.dev" 486 | source: hosted 487 | version: "6.1.6" 488 | url_launcher_android: 489 | dependency: transitive 490 | description: 491 | name: url_launcher_android 492 | sha256: "9e262cbec69233717d5198f4d0b0c4961fa027e3685ba425442c43c64f38bb9b" 493 | url: "https://pub.dev" 494 | source: hosted 495 | version: "6.0.19" 496 | url_launcher_ios: 497 | dependency: transitive 498 | description: 499 | name: url_launcher_ios 500 | sha256: "6ba7dddee26c9fae27c9203c424631109d73c8fa26cfa7bc3e35e751cb87f62e" 501 | url: "https://pub.dev" 502 | source: hosted 503 | version: "6.0.17" 504 | url_launcher_linux: 505 | dependency: transitive 506 | description: 507 | name: url_launcher_linux 508 | sha256: "360fa359ab06bcb4f7c5cd3123a2a9a4d3364d4575d27c4b33468bd4497dd094" 509 | url: "https://pub.dev" 510 | source: hosted 511 | version: "3.0.1" 512 | url_launcher_macos: 513 | dependency: transitive 514 | description: 515 | name: url_launcher_macos 516 | sha256: a9b3ea9043eabfaadfa3fb89de67a11210d85569086d22b3854484beab8b3978 517 | url: "https://pub.dev" 518 | source: hosted 519 | version: "3.0.1" 520 | url_launcher_platform_interface: 521 | dependency: transitive 522 | description: 523 | name: url_launcher_platform_interface 524 | sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6" 525 | url: "https://pub.dev" 526 | source: hosted 527 | version: "2.1.1" 528 | url_launcher_web: 529 | dependency: transitive 530 | description: 531 | name: url_launcher_web 532 | sha256: "5669882643b96bb6d5786637cac727c6e918a790053b09245fd4513b8a07df2a" 533 | url: "https://pub.dev" 534 | source: hosted 535 | version: "2.0.13" 536 | url_launcher_windows: 537 | dependency: transitive 538 | description: 539 | name: url_launcher_windows 540 | sha256: e3c3b16d3104260c10eea3b0e34272aaa57921f83148b0619f74c2eced9b7ef1 541 | url: "https://pub.dev" 542 | source: hosted 543 | version: "3.0.1" 544 | vector_math: 545 | dependency: transitive 546 | description: 547 | name: vector_math 548 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 549 | url: "https://pub.dev" 550 | source: hosted 551 | version: "2.1.4" 552 | win32: 553 | dependency: transitive 554 | description: 555 | name: win32 556 | sha256: "9555cd63283445e101f0df32105862fdc0b30adb9b84fd0553e9433b3e074d4c" 557 | url: "https://pub.dev" 558 | source: hosted 559 | version: "3.0.1" 560 | xdg_directories: 561 | dependency: transitive 562 | description: 563 | name: xdg_directories 564 | sha256: "11541eedefbcaec9de35aa82650b695297ce668662bbd6e3911a7fabdbde589f" 565 | url: "https://pub.dev" 566 | source: hosted 567 | version: "0.2.0+2" 568 | xml: 569 | dependency: transitive 570 | description: 571 | name: xml 572 | sha256: ac0e3f4bf00ba2708c33fbabbbe766300e509f8c82dbd4ab6525039813f7e2fb 573 | url: "https://pub.dev" 574 | source: hosted 575 | version: "6.1.0" 576 | sdks: 577 | dart: ">=3.0.0-0 <4.0.0" 578 | flutter: ">=3.0.0" 579 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_drawing_board 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | # In Windows, build-name is used as the major, minor, and patch parts 19 | # of the product and file versions while build-number is used as the build suffix. 20 | version: 1.0.0+1 21 | 22 | environment: 23 | sdk: ">=2.18.1 <3.0.0" 24 | 25 | # Dependencies specify other packages that your package needs in order to work. 26 | # To automatically upgrade your package dependencies to the latest versions 27 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 28 | # dependencies can be manually updated by changing the version numbers below to 29 | # the latest version available on pub.dev. To see which dependencies have newer 30 | # versions available, run `flutter pub outdated`. 31 | dependencies: 32 | flutter: 33 | sdk: flutter 34 | cupertino_icons: ^1.0.2 35 | flutter_colorpicker: ^1.0.3 36 | flutter_hooks: ^0.18.5+1 37 | flutter_svg: ^1.1.1+1 38 | file_saver: ^0.1.1 39 | font_awesome_flutter: ^10.2.1 40 | url_launcher: ^6.1.6 41 | universal_html: ^2.0.8 42 | image_picker: ^0.8.6 43 | file_picker: ^5.2.2 44 | 45 | dev_dependencies: 46 | flutter_test: 47 | sdk: flutter 48 | 49 | # The "flutter_lints" package below contains a set of recommended lints to 50 | # encourage good coding practices. The lint set provided by the package is 51 | # activated in the `analysis_options.yaml` file located at the root of your 52 | # package. See that file for information about deactivating specific lint 53 | # rules and activating additional ones. 54 | flutter_lints: ^2.0.0 55 | 56 | # For information on the generic Dart part of this file, see the 57 | # following page: https://dart.dev/tools/pub/pubspec 58 | 59 | # The following section is specific to Flutter packages. 60 | flutter: 61 | # The following line ensures that the Material Icons font is 62 | # included with your application, so that you can use the icons in 63 | # the material Icons class. 64 | uses-material-design: true 65 | 66 | # To add assets to your application, add an assets section, like this: 67 | assets: 68 | - assets/svgs/ 69 | # - images/a_dot_ham.jpeg 70 | 71 | # An image asset can refer to one or more resolution-specific "variants", see 72 | # https://flutter.dev/assets-and-images/#resolution-aware 73 | 74 | # For details regarding adding assets from package dependencies, see 75 | # https://flutter.dev/assets-and-images/#from-packages 76 | 77 | # To add custom fonts to your application, add a fonts section here, 78 | # in this "flutter" section. Each entry in this list should have a 79 | # "family" key with the font family name, and a "fonts" key with a 80 | # list giving the asset and other descriptors for the font. For 81 | # example: 82 | # fonts: 83 | # - family: Schyler 84 | # fonts: 85 | # - asset: fonts/Schyler-Regular.ttf 86 | # - asset: fonts/Schyler-Italic.ttf 87 | # style: italic 88 | # - family: Trajan Pro 89 | # fonts: 90 | # - asset: fonts/TrajanPro.ttf 91 | # - asset: fonts/TrajanPro_Bold.ttf 92 | # weight: 700 93 | # 94 | # For details regarding fonts from package dependencies, 95 | # see https://flutter.dev/custom-fonts/#from-packages 96 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_drawing_board/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abusayed10809/drawing-board-flutter/c175950e9882ad26ee68f410c98e098805ba8a63/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | flutter_drawing_board 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 57 | 58 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Let's Draw", 3 | "short_name": "Lets Draw", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A simple drawing app made with Flutter", 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 | --------------------------------------------------------------------------------