├── .gitignore
├── .metadata
├── LICENSE
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── draw_it_app
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── settings_aar.gradle
├── assets
├── appLogo.png
├── loadingGIF.gif
└── myImage.jpg
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ ├── 1024.png
│ │ ├── 114.png
│ │ ├── 120.png
│ │ ├── 180.png
│ │ ├── 29.png
│ │ ├── 40.png
│ │ ├── 57.png
│ │ ├── 58.png
│ │ ├── 60.png
│ │ ├── 80.png
│ │ ├── 87.png
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── DetailScreen.dart
├── ImagesGridview.dart
├── LogInSignUpSwitcher.dart
├── LoginPage.dart
├── SignUpPage.dart
├── aboutTheApp.dart
├── aboutTheDeveloper.dart
├── colorPalette.dart
├── initialScreen.dart
├── main.dart
├── myHomePage.dart
└── webBrowserOpen.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── pubspec.lock
├── pubspec.yaml
└── web
├── favicon.png
├── icons
├── Icon-192.png
└── Icon-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 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Exceptions to above rules.
44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
45 |
46 | # Google JSON
47 | android/app/google-services.json
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: fd80503fd33ae2552763a85328a5dba8e8e9e0c5
8 | channel: master
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Harsh Kumar Khatri
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Draw It App
2 |
3 |
4 |
5 |
6 |
7 |
8 | [](https://forthebadge.com)
9 | [](https://forthebadge.com)
10 | [](https://forthebadge.com)
11 | [](https://forthebadge.com)
12 | [](https://forthebadge.com)
13 |
14 |
15 | ## Introduction 📌
16 |
17 | Students often tend to find something like a pen or paper to write important thing down which they remember all of a sudden. They may type it down it on some note editor or in some chat but they often miss-out the feel which they get.
18 |
19 | With this app, i tend to provide students/people a place where they can write down their notes or bits which they remember all of a sudden but they don't have a pen or a paper available to write it down. Also it would provide children with a canvas to draw things out and show their creativity.
20 |
21 | ## Technology Stack 🏁
22 |
23 | - [Flutter](https://flutter.dev/)
24 | - [Firebase](https://firebase.google.com/)
25 |
26 | ## Why this Project? 🏃♂️
27 |
28 | My main goal behind creating this project was to provide people(maily students) with a canvas where they can pen their idea when they get one all of a sudden and save it down to either cloud or local storage and have a look at the same later on. The feel which the app has while penning things down is somethings which makes you remember that you have drawn something which you can go and have a look at later.
29 |
30 | The interface of the app is simple yet elegant which makes it begineer friendly as well.
31 |
32 | For this project, i have worked on various domains like:
33 |
34 | - UI/UX Development with Flutter
35 | - Data Storage with Firebase Firestore
36 | - User authentication with Firebase
37 | - Image storage with Firebase storage & with Local Storage
38 |
39 | ## 👀 Build Instructions
40 |
41 | - Clone the Repository: `git clone https://github.com/harshkumarkhatri/Draw-It-App-Flutter.git`
42 | - `cd` into the Repository: `cd draw_it_app`
43 | - Enable beta channel and enable web support:
44 | ```
45 | $ flutter channel beta
46 | $ flutter upgrade
47 | $ flutter config --enable-web
48 | ```
49 | - Check for the Devices configured for Flutter Web: `flutter devices`
50 | - Run the App in Release Mode: `flutter run`
51 | - Generate a Build: `flutter build apk --split-per-abi`
52 |
53 | ## License 📜
54 | [MIT](https://github.com/harshkumarkhatri/Draw-It-App-Flutter/blob/master/LICENSE)
55 |
56 | ## Contributors ✨
57 |
58 | - [Harsh Kumar Khatri](https://github.com/harshkumarkhatri)
59 |
60 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 plugin: 'com.google.gms.google-services'
27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28 |
29 | android {
30 | compileSdkVersion 28
31 |
32 | sourceSets {
33 | main.java.srcDirs += 'src/main/kotlin'
34 | }
35 |
36 | lintOptions {
37 | disable 'InvalidPackage'
38 | }
39 |
40 | defaultConfig {
41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
42 | applicationId "com.example.draw_it_app"
43 | minSdkVersion 16
44 | targetSdkVersion 28
45 | multiDexEnabled true
46 | versionCode flutterVersionCode.toInteger()
47 | versionName flutterVersionName
48 | }
49 |
50 | buildTypes {
51 | release {
52 | // TODO: Add your own signing config for the release build.
53 | // Signing with the debug keys for now, so `flutter run --release` works.
54 | signingConfig signingConfigs.debug
55 | }
56 | }
57 | }
58 |
59 | flutter {
60 | source '../..'
61 | }
62 |
63 | dependencies {
64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
65 | implementation 'com.google.firebase:firebase-analytics:17.5.0'
66 | implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
67 | }
68 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
17 |
24 |
28 |
32 |
37 |
41 |
42 |
43 |
44 |
45 |
46 |
48 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/draw_it_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.draw_it_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/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/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath 'com.google.gms:google-services:4.3.3'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | rootProject.buildDir = '../build'
23 | subprojects {
24 | project.buildDir = "${rootProject.buildDir}/${project.name}"
25 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/settings_aar.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/assets/appLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/assets/appLogo.png
--------------------------------------------------------------------------------
/assets/loadingGIF.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/assets/loadingGIF.gif
--------------------------------------------------------------------------------
/assets/myImage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/assets/myImage.jpg
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 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 = 1020;
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 = 8.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 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.drawItApp;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.drawItApp;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.drawItApp;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/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 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/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/1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"}]}
--------------------------------------------------------------------------------
/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 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | draw_it_app
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/DetailScreen.dart:
--------------------------------------------------------------------------------
1 | // This file has the widget/Screen which will be displayed when we click on any of the image from the gridview.
2 | // It shows us an enlarged image of the one we have tapped on.
3 |
4 | import 'dart:io';
5 | import 'dart:typed_data';
6 | import 'package:cached_network_image/cached_network_image.dart';
7 | import 'package:path/path.dart' as Path;
8 | import 'package:firebase_auth/firebase_auth.dart';
9 | import 'package:firebase_storage/firebase_storage.dart';
10 | import 'package:flutter/foundation.dart';
11 | import 'package:flutter/material.dart';
12 | import 'package:shared_preferences/shared_preferences.dart';
13 | import 'package:cloud_firestore/cloud_firestore.dart';
14 | import 'package:esys_flutter_share/esys_flutter_share.dart';
15 |
16 | import 'ImagesGridview.dart';
17 |
18 | // Testing:- Zooming an image onTap
19 | class DetailScreen extends StatefulWidget {
20 | DetailScreen(this.item);
21 | final String item;
22 |
23 | @override
24 | _DetailScreenState createState() => _DetailScreenState();
25 | }
26 |
27 | class _DetailScreenState extends State {
28 | bool switcher = true;
29 | CollectionReference users =
30 | FirebaseFirestore.instance.collection("ImageLinks");
31 |
32 | List li;
33 | final firestoreInstance = Firestore.instance;
34 | final FirebaseAuth auth = FirebaseAuth.instance;
35 | SharedPreferences prefs;
36 | var uid;
37 | String filePath;
38 |
39 | @override
40 | void initState() {
41 | super.initState();
42 | init();
43 | }
44 |
45 | // Setting values to variables.
46 | void init() async {
47 | prefs = await SharedPreferences.getInstance();
48 | uid = prefs.getString('uid');
49 | var firebaseUser = auth.currentUser;
50 | firestoreInstance
51 | .collection("ImageLinks")
52 | .document(firebaseUser.uid)
53 | .get()
54 | .then((value) {
55 | print("Run time type is ${value.data()['links'].runtimeType}");
56 | filePath = widget.item
57 | .replaceAll(
58 | new RegExp(
59 | r'https://firebasestorage.googleapis.com/v0/b/dial-in-21c50.appspot.com/o/default_images%2F'),
60 | '')
61 | .split('?')[0];
62 |
63 | print("File path is ${filePath}");
64 |
65 | setState(() {
66 | li = value.data()['links'];
67 | });
68 | });
69 | }
70 |
71 | // Deleting the image from Firebase Storage.
72 | Future deleteImage(String imageFileUrl) async {
73 | var fileUrl = Uri.decodeFull(Path.basename(imageFileUrl))
74 | .replaceAll(new RegExp(r'(\?alt).*'), '');
75 |
76 | final StorageReference firebaseStorageRef =
77 | FirebaseStorage.instance.ref().child(fileUrl);
78 | await firebaseStorageRef.delete();
79 | }
80 |
81 | @override
82 | Widget build(BuildContext context) {
83 | return Scaffold(
84 | body: Stack(
85 | children: [
86 | Column(
87 | children: [
88 | Expanded(
89 | child: GestureDetector(
90 | onVerticalDragStart: (DragStartDetails dd) {
91 | print("Dragging");
92 |
93 | setState(() {
94 | switcher == true ? switcher = false : switcher = true;
95 | });
96 | print(switcher);
97 | },
98 | child: Center(
99 | child: Hero(
100 | tag: 'imageHero',
101 | child: CachedNetworkImage(
102 | imageUrl: widget.item,
103 | placeholder: (context, url) =>
104 | CircularProgressIndicator(),
105 | errorWidget: (context, url, error) =>
106 | Icon(Icons.error),
107 | )),
108 | ),
109 | onTap: () {
110 | Navigator.pop(context);
111 | },
112 | ),
113 | ),
114 |
115 | // Bottom buttons for delete and share
116 | switcher == true
117 | ? Container()
118 | : Container(
119 | color: Colors.white,
120 | height: 40,
121 | child: Padding(
122 | padding: EdgeInsets.only(
123 | left: MediaQuery.of(context).size.width / 6,
124 | right: MediaQuery.of(context).size.width / 6),
125 | child: Row(
126 | children: [
127 | // Delete
128 | GestureDetector(
129 | onTap: () {
130 | print("Gesture detected");
131 | li.remove(widget.item);
132 | print("removed ${li}");
133 | setState(() {
134 | users.document(uid).updateData(
135 | {"links": li},
136 | );
137 | });
138 | deleteImage(widget.item);
139 | Navigator.pop(context);
140 | Navigator.pop(context);
141 | Navigator.push(
142 | context,
143 | MaterialPageRoute(
144 | builder: (_) => ImagesGridView()));
145 | },
146 | child: Container(
147 | width: MediaQuery.of(context).size.width / 3,
148 | child: Column(
149 | children: [
150 | Icon(
151 | Icons.delete_outline_outlined,
152 | ),
153 | Text("Delete")
154 | ],
155 | ),
156 | ),
157 | ),
158 |
159 | // Share
160 | GestureDetector(
161 | onTap: () {
162 | shareFile(widget.item);
163 | },
164 | child: Container(
165 | width: MediaQuery.of(context).size.width / 3,
166 | child: Column(
167 | children: [
168 | Icon(
169 | Icons.share_outlined,
170 | ),
171 | Text("Share")
172 | ],
173 | )),
174 | ),
175 | ],
176 | ),
177 | ),
178 | ),
179 | ],
180 | ),
181 |
182 | // Widgets on top left
183 | Positioned(
184 | top: 15,
185 | right: 15,
186 | child: Row(
187 | children: [
188 | // More widget
189 | GestureDetector(
190 | onTap: () {
191 | setState(() {
192 | switcher == true ? switcher = false : switcher = true;
193 | });
194 | print(switcher);
195 | },
196 | child: SafeArea(
197 | child: Container(
198 | height: 30,
199 | decoration: BoxDecoration(
200 | color: Colors.lightBlue[200],
201 | borderRadius: BorderRadius.circular(
202 | 3,
203 | ),
204 | ),
205 | child: Container(
206 | child: Center(
207 | child: Padding(
208 | padding: const EdgeInsets.only(left: 3, right: 3),
209 | child: Text("More"),
210 | )),
211 | ),
212 | ),
213 | ),
214 | ),
215 |
216 | SizedBox(width: 8),
217 |
218 | // Cross widget
219 | GestureDetector(
220 | onTap: () {
221 | Navigator.pop(context);
222 | },
223 | child: SafeArea(
224 | child: Container(
225 | height: 30,
226 | width: 30,
227 | decoration: BoxDecoration(
228 | color: Colors.lightBlue[200], shape: BoxShape.circle),
229 | child: Icon(
230 | Icons.close,
231 | ),
232 | ),
233 | ),
234 | )
235 | ],
236 | ),
237 | )
238 | ],
239 | ),
240 | );
241 | }
242 |
243 | // For Sharing the Image.
244 | void shareFile(imageLink) async {
245 | var request = await HttpClient().getUrl(Uri.parse(imageLink));
246 | var response = await request.close();
247 | Uint8List bytes = await consolidateHttpClientResponseBytes(response);
248 | await Share.file('Share This Image', 'amlog.jpg', bytes, 'image/jpg',
249 | // Message which will be there when we share an image.
250 | text:
251 | "Hey, I have made this image using Draw It app. You can also make yours.");
252 | }
253 | }
254 |
--------------------------------------------------------------------------------
/lib/ImagesGridview.dart:
--------------------------------------------------------------------------------
1 | // This file displays the images which are stored in the Firebase Storage and have their links stored in Firestore.
2 | // The images are displayd in form of GridView.
3 |
4 | import 'package:cached_network_image/cached_network_image.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:firebase_core/firebase_core.dart';
7 | import 'package:firebase_database/firebase_database.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:shared_preferences/shared_preferences.dart';
10 | import 'package:cloud_firestore/cloud_firestore.dart';
11 | import 'package:ext_storage/ext_storage.dart';
12 | import 'DetailScreen.dart';
13 |
14 | class ImagesGridView extends StatefulWidget {
15 | @override
16 | _ImagesGridViewState createState() => _ImagesGridViewState();
17 | }
18 |
19 | class _ImagesGridViewState extends State {
20 | final DBref = FirebaseDatabase.instance.reference();
21 | List countStor = [];
22 | int count = 0;
23 | SharedPreferences prefs;
24 | var random;
25 | final FirebaseAuth auth = FirebaseAuth.instance;
26 | final fb = FirebaseDatabase.instance;
27 | FirebaseFirestore firestore = FirebaseFirestore.instance;
28 | bool itemsSwitcher = false;
29 |
30 | // Dynamic list o store the links
31 | List li = [];
32 |
33 | var uid;
34 | void initState() {
35 | super.initState();
36 | Firebase.initializeApp();
37 | init();
38 | }
39 |
40 | final firestoreInstance = Firestore.instance;
41 |
42 | void init() async {
43 | prefs = await SharedPreferences.getInstance();
44 | uid = prefs.getString('uid');
45 | var firebaseUser = auth.currentUser;
46 | firestoreInstance
47 | .collection("ImageLinks")
48 | .document(firebaseUser.uid)
49 | .get()
50 | .then((value) {
51 | setState(() {
52 | li = value.data()['links'];
53 | if (li[0] == null) {
54 | li.removeAt(0);
55 | }
56 | if (li.length < 1) {
57 | itemsSwitcher = true;
58 | }
59 | });
60 | });
61 | }
62 |
63 | @override
64 | Widget build(BuildContext context) {
65 | return Scaffold(
66 | appBar: AppBar(
67 | title: Text("Saved Images"),
68 | ),
69 | body: SafeArea(
70 | child: Column(
71 | mainAxisAlignment: MainAxisAlignment.center,
72 | children: [
73 | Padding(
74 | padding: const EdgeInsets.all(8.0),
75 | child: Container(
76 | child: Center(
77 | child: Text(
78 | "Images Saved to Local Storage can be found in Gallery",
79 | ),
80 | ),
81 | ),
82 | ),
83 | itemsSwitcher == true
84 | ? Center(
85 | child: Container(
86 | child: Padding(
87 | padding: const EdgeInsets.all(8.0),
88 | child: Text(
89 | "You don't have any images saved to cloud. Start saving and we will display them here"),
90 | )))
91 | : Expanded(
92 | child: GridView.count(
93 | childAspectRatio: MediaQuery.of(context).size.width /
94 | MediaQuery.of(context).size.height,
95 | crossAxisCount: 2,
96 | padding: EdgeInsets.all(
97 | 5,
98 | ),
99 | crossAxisSpacing: 10,
100 | mainAxisSpacing: 10,
101 | children: li
102 | .map((item) => GestureDetector(
103 | onTap: () {
104 | Navigator.push(context,
105 | MaterialPageRoute(builder: (_) {
106 | return DetailScreen(item);
107 | }));
108 | },
109 | child: Card(
110 | color: Colors.white,
111 | elevation: 2,
112 | child: Center(
113 | child: Container(
114 | decoration: BoxDecoration(
115 | borderRadius:
116 | BorderRadius.circular(20),
117 | ),
118 | child: CachedNetworkImage(
119 | fit: BoxFit.cover,
120 | imageUrl: item,
121 | placeholder: (context, url) =>
122 | CircularProgressIndicator(),
123 | errorWidget: (context, url, error) =>
124 | Icon(Icons.error),
125 | ),
126 | ),
127 | ),
128 | ),
129 | ))
130 | .toList()))
131 | ],
132 | ),
133 | ),
134 | );
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/lib/LogInSignUpSwitcher.dart:
--------------------------------------------------------------------------------
1 | // This page has the code related to the login signup switcher screen
2 |
3 | import 'package:draw_it_app/LoginPage.dart';
4 | import 'package:draw_it_app/SignUpPage.dart';
5 | import 'package:flutter/material.dart';
6 |
7 | class LogInSignUpSwitcher extends StatefulWidget {
8 | @override
9 | _LogInSignUpSwitcherState createState() => _LogInSignUpSwitcherState();
10 | }
11 |
12 | class _LogInSignUpSwitcherState extends State
13 | with SingleTickerProviderStateMixin {
14 | TabController controller;
15 | @override
16 | void initState() {
17 | controller = TabController(length: 2, vsync: this);
18 | super.initState();
19 | }
20 |
21 | @override
22 | void dispose() {
23 | controller.dispose();
24 | super.dispose();
25 | }
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | appBar: PreferredSize(
31 | preferredSize: Size.fromHeight(125),
32 | child: AppBar(
33 | backgroundColor: Colors.white,
34 | title: Padding(
35 | padding: const EdgeInsets.all(8.0),
36 | child: Row(
37 | mainAxisAlignment: MainAxisAlignment.center,
38 | children: [
39 | Container(
40 | height: 80,
41 | width: 80,
42 | child: Padding(
43 | padding: const EdgeInsets.all(8.0),
44 | child: Image(
45 | height: 82,
46 | fit: BoxFit.cover,
47 | image: AssetImage("assets/appLogo.png"),
48 | ),
49 | ),
50 | ),
51 | ],
52 | ),
53 | ),
54 | bottom: TabBar(
55 | controller: controller,
56 | indicatorWeight: 4,
57 | indicatorColor: Colors.blue,
58 | tabs: [
59 | Tab(
60 | child: Text(
61 | "Login",
62 | style: TextStyle(
63 | color: Colors.black,
64 | fontWeight: FontWeight.bold,
65 | fontSize: 16),
66 | ),
67 | ),
68 | Tab(
69 | child: Text("Sign Up",
70 | style: TextStyle(
71 | color: Colors.black,
72 | fontWeight: FontWeight.bold,
73 | fontSize: 16)),
74 | )
75 | ]),
76 | ),
77 | ),
78 | body: TabBarView(
79 | children: [LoginPage(), SignUp()],
80 | controller: controller,
81 | ));
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/lib/LoginPage.dart:
--------------------------------------------------------------------------------
1 | // This file has the code related to Login page.
2 |
3 | import 'package:draw_it_app/initialScreen.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:fluttertoast/fluttertoast.dart';
7 | import 'package:shared_preferences/shared_preferences.dart';
8 |
9 | class LoginPage extends StatefulWidget {
10 | @override
11 | _LoginPageState createState() => _LoginPageState();
12 | }
13 |
14 | class _LoginPageState extends State {
15 | String _email, _password;
16 | bool loading = false;
17 | final GlobalKey _formKey = GlobalKey();
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | body: SingleChildScrollView(
22 | child: Form(
23 | key: _formKey,
24 | child: Column(
25 | children: [
26 | // Email text field
27 | Padding(
28 | padding: const EdgeInsets.only(left: 15, right: 15, top: 30),
29 | child: TextFormField(
30 | controller: nameHolder,
31 | validator: (input) {
32 | if (input.isEmpty) {
33 | return "Please type a mail";
34 | }
35 | },
36 | onSaved: (input) {
37 | _email = input;
38 | },
39 | decoration: InputDecoration(labelText: "Email"),
40 | ),
41 | ),
42 |
43 | // Password text field
44 | Padding(
45 | padding: const EdgeInsets.only(left: 15, right: 15),
46 | child: TextFormField(
47 | controller: nameHolder2,
48 | obscureText: true,
49 | validator: (input) {
50 | if (input.length < 2) {
51 | return "Password is small";
52 | }
53 | },
54 | onSaved: (input) {
55 | _password = input;
56 | },
57 | decoration: InputDecoration(labelText: "Password"),
58 | ),
59 | ),
60 |
61 | // Submit button
62 | Padding(
63 | padding: const EdgeInsets.only(top: 20.0, left: 15, right: 15),
64 | child: RaisedButton(
65 | onPressed: () {
66 | setState(() {
67 | loading = true;
68 | });
69 | signin();
70 | },
71 | shape: RoundedRectangleBorder(
72 | borderRadius: BorderRadius.circular(18.0),
73 | side: BorderSide(color: Colors.black)),
74 | textColor: Colors.white,
75 | padding: const EdgeInsets.all(0.0),
76 | child: Container(
77 | alignment: Alignment.center,
78 | decoration: BoxDecoration(
79 | borderRadius: BorderRadius.circular(18),
80 | gradient: LinearGradient(
81 | colors: [
82 | Color(0xFF0D47A1),
83 | Color(0xFF1976D2),
84 | Color(0xFF42A5F5),
85 | ],
86 | ),
87 | ),
88 | padding: EdgeInsets.all(10),
89 | child: Row(
90 | mainAxisAlignment: MainAxisAlignment.center,
91 | children: [
92 | Padding(
93 | padding: const EdgeInsets.all(8.0),
94 | child: Text("Sign In"),
95 | ),
96 | ],
97 | ),
98 | ),
99 | ),
100 | ),
101 |
102 | // Circular progress bar to show the time taken while login
103 | SizedBox(height: 15),
104 | loading == true && _email != null && _password.length > 2
105 | ? CircularProgressIndicator()
106 | : Container(),
107 | SizedBox(height: 15),
108 |
109 | // Skip for now button
110 | Padding(
111 | padding: const EdgeInsets.only(left: 15, right: 15),
112 | child: RaisedButton(
113 | onPressed: () async {
114 | Navigator.pushReplacement(context,
115 | MaterialPageRoute(builder: (_) => SplashScreen()));
116 | },
117 | shape: RoundedRectangleBorder(
118 | borderRadius: BorderRadius.circular(18.0),
119 | side: BorderSide(color: Colors.black)),
120 | textColor: Colors.white,
121 | padding: const EdgeInsets.all(0.0),
122 | child: Container(
123 | alignment: Alignment.center,
124 | decoration: BoxDecoration(
125 | borderRadius: BorderRadius.circular(18),
126 | gradient: LinearGradient(
127 | colors: [
128 | Color(0xFF0D47A1),
129 | Color(0xFF1976D2),
130 | Color(0xFF42A5F5),
131 | ],
132 | ),
133 | ),
134 | padding: EdgeInsets.all(10),
135 | child: Row(
136 | mainAxisAlignment: MainAxisAlignment.center,
137 | children: [
138 | Padding(
139 | padding: const EdgeInsets.all(8.0),
140 | child: Text("Skip for Now"),
141 | ),
142 | ],
143 | ),
144 | ),
145 | ),
146 | )
147 | ],
148 | ),
149 | ),
150 | ));
151 | }
152 |
153 | final nameHolder = TextEditingController();
154 | final nameHolder2 = TextEditingController();
155 |
156 | // Clearing the textfields after successful/un-successful signin
157 | clearTextInput() {
158 | nameHolder.clear();
159 | nameHolder2.clear();
160 | }
161 |
162 | // SignIning in with email and password
163 | Future signin() async {
164 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
165 | final formState = _formKey.currentState;
166 |
167 | // When we have a valid form state
168 | if (formState.validate()) {
169 | formState.save();
170 |
171 | // Trying to sign user in
172 | try {
173 | UserCredential result = (await _firebaseAuth.signInWithEmailAndPassword(
174 | email: _email, password: _password));
175 | SharedPreferences prefs = await SharedPreferences.getInstance();
176 | prefs.setString('email', result.user.email);
177 | prefs.setString('uid', result.user.uid);
178 | Navigator.pushReplacement(
179 | context, MaterialPageRoute(builder: (_) => SplashScreen()));
180 | }
181 |
182 | // Catching exception/error and displaying a message in the snackbar
183 | catch (e) {
184 | Fluttertoast.showToast(
185 | msg:
186 | "No account exist with these credentials.\nPlease check your credentials and try logging in again.");
187 | setState(() {
188 | loading = false;
189 | });
190 | clearTextInput();
191 | }
192 | }
193 | }
194 | }
195 |
--------------------------------------------------------------------------------
/lib/SignUpPage.dart:
--------------------------------------------------------------------------------
1 | // This file has the code related to the signup page of the app.
2 |
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:firebase_database/firebase_database.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:fluttertoast/fluttertoast.dart';
8 | import 'package:shared_preferences/shared_preferences.dart';
9 |
10 | import 'initialScreen.dart';
11 |
12 | class SignUp extends StatefulWidget {
13 | @override
14 | _SignUpState createState() => _SignUpState();
15 | }
16 |
17 | class _SignUpState extends State {
18 | final FirebaseAuth auth = FirebaseAuth.instance;
19 | String errorMessage = "";
20 | String successMessage = "";
21 | final GlobalKey _formstate = GlobalKey();
22 | String _email, _password;
23 | final _passwordController = TextEditingController(text: '');
24 | bool loading = false;
25 | final DBref = FirebaseDatabase.instance.reference();
26 | SharedPreferences prefs;
27 | String pass;
28 |
29 | // Initializing the firebase instance for firestore
30 | FirebaseFirestore firestore = FirebaseFirestore.instance;
31 | CollectionReference users =
32 | FirebaseFirestore.instance.collection("ImageLinks");
33 |
34 | var uid, email;
35 | void initState() {
36 | super.initState();
37 | init();
38 | }
39 |
40 | void init() async {
41 | prefs = await SharedPreferences.getInstance();
42 | uid = prefs.getString('uid');
43 | email = prefs.getString('email');
44 | }
45 |
46 | @override
47 | Widget build(BuildContext context) {
48 | return Scaffold(
49 | body: Form(
50 | key: _formstate,
51 | child: SingleChildScrollView(
52 | child: Column(
53 | children: [
54 | // Email
55 | Padding(
56 | padding: const EdgeInsets.only(left: 15, right: 15, top: 30),
57 | child: TextFormField(
58 | controller: nameHolder,
59 | validator: (input) {
60 | if (input.isEmpty) {
61 | return "Please type a mail";
62 | }
63 | },
64 | onSaved: (input) {
65 | _email = input;
66 | },
67 | decoration: InputDecoration(labelText: "Email"),
68 | ),
69 | ),
70 |
71 | // Password
72 | Padding(
73 | padding: const EdgeInsets.only(left: 15, right: 15),
74 | child: TextFormField(
75 | controller: nameHolder2,
76 | obscureText: true,
77 | validator: (input) {
78 | setState(() {
79 | pass = input;
80 | });
81 | if (input.length < 5) {
82 | return "password lenght should be 6 or more";
83 | } else if (pass != input) {
84 | return "Passwords do not match";
85 | }
86 | },
87 | onSaved: (input) => _password = input,
88 | decoration: InputDecoration(labelText: "Password"),
89 | ),
90 | ),
91 |
92 | // Confirm password
93 | Padding(
94 | padding: const EdgeInsets.only(left: 15, right: 15),
95 | child: TextFormField(
96 | controller: nameHolder3,
97 | obscureText: true,
98 | validator: (input) {
99 | if (input.length < 5) {
100 | return "password lenght should be 6 or more";
101 | } else if (pass != input) {
102 | return "Passwords do not match";
103 | }
104 | },
105 | onSaved: (input) => _password = input,
106 | decoration: InputDecoration(labelText: "Confirm Password"),
107 | ),
108 | ),
109 |
110 | // Circular progress bar indicator to give a feel for time taken to sign up.
111 | SizedBox(height: 15),
112 | loading == true && _email != null && _password.length > 2
113 | ? CircularProgressIndicator()
114 | : Container(),
115 |
116 | // Sign Up button.
117 | Padding(
118 | padding: const EdgeInsets.only(left: 15, right: 15, top: 30),
119 | child: RaisedButton(
120 | onPressed: () async {
121 | setState(() {
122 | loading = true;
123 | });
124 | signIn();
125 | },
126 | shape: RoundedRectangleBorder(
127 | borderRadius: BorderRadius.circular(18.0),
128 | side: BorderSide(color: Colors.black)),
129 | textColor: Colors.white,
130 | padding: const EdgeInsets.all(0.0),
131 | child: Container(
132 | alignment: Alignment.center,
133 | decoration: BoxDecoration(
134 | borderRadius: BorderRadius.circular(18),
135 | gradient: LinearGradient(
136 | colors: [
137 | Color(0xFF0D47A1),
138 | Color(0xFF1976D2),
139 | Color(0xFF42A5F5),
140 | ],
141 | ),
142 | ),
143 | padding: EdgeInsets.all(10),
144 | child: Row(
145 | mainAxisAlignment: MainAxisAlignment.center,
146 | children: [
147 | Padding(
148 | padding: const EdgeInsets.all(8.0),
149 | child: Text("Sign Up"),
150 | ),
151 | ],
152 | ),
153 | ),
154 | ),
155 | ),
156 | (successMessage != ''
157 | ? Text(
158 | successMessage,
159 | textAlign: TextAlign.center,
160 | style: TextStyle(
161 | fontSize: 24,
162 | color: Colors.blue,
163 | ),
164 | )
165 | : Container())
166 | ],
167 | ),
168 | ),
169 | ),
170 | );
171 | }
172 |
173 | // Clearing the text fields after successful/unsuccessful sign up.
174 | final nameHolder = TextEditingController();
175 | final nameHolder2 = TextEditingController();
176 | final nameHolder3 = TextEditingController();
177 | clearTextInput() {
178 | nameHolder.clear();
179 | nameHolder2.clear();
180 | nameHolder3.clear();
181 | }
182 |
183 | // Sign up
184 | Future signIn() async {
185 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
186 | final formState = _formstate.currentState;
187 | if (formState.validate()) {
188 | formState.save();
189 | try {
190 | UserCredential result =
191 | (await _firebaseAuth.createUserWithEmailAndPassword(
192 | email: _email, password: _password));
193 | print(result);
194 | User user = result.user;
195 | print("User details");
196 | print(result.user.uid);
197 | assert(result != null);
198 | assert(await result.user.getIdToken != null);
199 | print(user);
200 | prefs.setString('email', result.user.email);
201 | prefs.setString('uid', result.user.uid);
202 | uid = result.user.uid;
203 |
204 | // Initializing firestore with enail and empty link array.
205 | users.document(uid).setData(
206 | {
207 | "mailId": _email,
208 | "links": FieldValue.arrayUnion([null]),
209 | },
210 | );
211 | Navigator.pushReplacement(
212 | context, MaterialPageRoute(builder: (_) => SplashScreen()));
213 | } catch (e) {
214 | print("catch $e");
215 | Fluttertoast.showToast(
216 | msg:
217 | "We cannot sign you up with these credentials.\nPlease try again with new email id.");
218 | setState(() {
219 | loading = false;
220 | });
221 | }
222 | }
223 | }
224 | }
225 |
--------------------------------------------------------------------------------
/lib/aboutTheApp.dart:
--------------------------------------------------------------------------------
1 | // This file has the code related to about the developer screen.
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class AboutTheApp extends StatefulWidget {
6 | @override
7 | _AboutTheAppState createState() => _AboutTheAppState();
8 | }
9 |
10 | class _AboutTheAppState extends State {
11 | double _animatedHeight = 100.0;
12 | bool initial1 = false;
13 | bool initial2 = false;
14 | bool initial3 = false;
15 | bool initial4 = false;
16 | bool initial5 = false;
17 | bool initial6 = false;
18 | bool initial7 = false;
19 | @override
20 | Widget build(BuildContext context) {
21 | return Scaffold(
22 | appBar: AppBar(
23 | title: Text("About the App"),
24 | ),
25 | body: SingleChildScrollView(
26 | child: Padding(
27 | padding: EdgeInsets.only(left: 28, right: 28),
28 | child: Column(
29 | children: [
30 | SizedBox(height: 40),
31 | Center(
32 | child: Container(
33 | height: 140,
34 | width: 140,
35 | decoration: BoxDecoration(
36 | shape: BoxShape.circle,
37 | color: Colors.black,
38 | image: DecorationImage(
39 | image: AssetImage(
40 | "assets/appLogo.png",
41 | ),
42 | ),
43 | ),
44 | ),
45 | ),
46 | Padding(
47 | padding:
48 | const EdgeInsets.only(top: 15.0, left: 15, right: 15),
49 | child: Text(
50 | "This is an app which i have build as my technovation project for 5th semester. With this app use can think and lay their imagination out on our canvas and can save to their gallery or to out cloud.",
51 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.w200),
52 | textAlign: TextAlign.center,
53 | ),
54 | ),
55 | Card(
56 | child: new Column(
57 | mainAxisAlignment: MainAxisAlignment.center,
58 | crossAxisAlignment: CrossAxisAlignment.center,
59 | children: [
60 | new GestureDetector(
61 | onTap: () => setState(() {
62 | _animatedHeight == 0.0
63 | ? _animatedHeight = 100.0
64 | : _animatedHeight = 00.0;
65 | initial1 == false
66 | ? initial1 = true
67 | : initial1 = false;
68 | }),
69 | child: new Container(
70 | alignment: Alignment.centerLeft,
71 | child: Padding(
72 | padding: const EdgeInsets.all(8.0),
73 | child: new Row(
74 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
75 | children: [
76 | Text("What is Draw It?",
77 | style: TextStyle(fontSize: 18)),
78 | Icon(Icons.arrow_circle_down)
79 | ],
80 | ),
81 | ),
82 | ),
83 | ),
84 | initial1 == true
85 | ? new AnimatedContainer(
86 | duration: const Duration(milliseconds: 120),
87 | child: Padding(
88 | padding: const EdgeInsets.all(8.0),
89 | child: new Text(
90 | "It is an app with the help of which you can pen down your thoughts on our canvas and can save them to wither your devie or to online storage and have a look at them later.",
91 | style: TextStyle(
92 | fontSize: 16,
93 | fontWeight: FontWeight.w300,
94 | letterSpacing: 0.6,
95 | height: 1.1)),
96 | ),
97 | color: Colors.tealAccent,
98 | )
99 | : Container(height: 0, width: 0)
100 | ],
101 | ),
102 | ),
103 | SizedBox(height: 10),
104 | Card(
105 | child: new Column(
106 | mainAxisAlignment: MainAxisAlignment.center,
107 | crossAxisAlignment: CrossAxisAlignment.center,
108 | children: [
109 | new GestureDetector(
110 | onTap: () => setState(() {
111 | _animatedHeight == 0.0
112 | ? _animatedHeight = 100.0
113 | : _animatedHeight = 00.0;
114 | initial2 == false
115 | ? initial2 = true
116 | : initial2 = false;
117 | }),
118 | child: new Container(
119 | alignment: Alignment.centerLeft,
120 | child: Padding(
121 | padding: const EdgeInsets.all(8.0),
122 | child: new Row(
123 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
124 | children: [
125 | Container(
126 | width: 250,
127 | child: Text(
128 | "Which language is used to make this app?",
129 | maxLines: 10,
130 | overflow: TextOverflow.ellipsis,
131 | style: TextStyle(fontSize: 18)),
132 | ),
133 | Icon(Icons.arrow_circle_down)
134 | ],
135 | ),
136 | ),
137 | ),
138 | ),
139 | initial2 == true
140 | ? new AnimatedContainer(
141 | duration: const Duration(milliseconds: 120),
142 | child: Padding(
143 | padding: const EdgeInsets.all(8.0),
144 | child: new Text(
145 | "This app has been made in Flutter and we are using Firebase storage to save images online.",
146 | style: TextStyle(
147 | fontSize: 16,
148 | fontWeight: FontWeight.w300,
149 | letterSpacing: 0.6,
150 | height: 1.1)),
151 | ),
152 | color: Colors.tealAccent,
153 | )
154 | : Container(height: 0, width: 0)
155 | ],
156 | ),
157 | ),
158 | SizedBox(height: 5),
159 | Card(
160 | child: new Column(
161 | mainAxisAlignment: MainAxisAlignment.center,
162 | crossAxisAlignment: CrossAxisAlignment.center,
163 | children: [
164 | new GestureDetector(
165 | onTap: () => setState(() {
166 | _animatedHeight == 0.0
167 | ? _animatedHeight = 100.0
168 | : _animatedHeight = 00.0;
169 | initial3 == false
170 | ? initial3 = true
171 | : initial3 = false;
172 | }),
173 | child: new Container(
174 | alignment: Alignment.centerLeft,
175 | child: Padding(
176 | padding: const EdgeInsets.all(8.0),
177 | child: new Row(
178 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
179 | children: [
180 | Container(
181 | width: 250,
182 | child: Text(
183 | "My screen is not clearing after i press the clear button. What should i do?",
184 | maxLines: 10,
185 | overflow: TextOverflow.ellipsis,
186 | style: TextStyle(fontSize: 18)),
187 | ),
188 | Icon(Icons.arrow_circle_down)
189 | ],
190 | ),
191 | ),
192 | ),
193 | ),
194 | initial3 == true
195 | ? new AnimatedContainer(
196 | duration: const Duration(milliseconds: 120),
197 | child: Padding(
198 | padding: const EdgeInsets.all(8.0),
199 | child: new Text(
200 | "You can start drawing as if the screen is blank and as soon as you will start drawing the screen will turn blank again.",
201 | style: TextStyle(
202 | fontSize: 16,
203 | fontWeight: FontWeight.w300,
204 | letterSpacing: 0.6,
205 | height: 1.1)),
206 | ),
207 | color: Colors.tealAccent,
208 | )
209 | : Container(height: 0, width: 0)
210 | ],
211 | ),
212 | ),
213 | SizedBox(height: 5),
214 | Card(
215 | child: new Column(
216 | mainAxisAlignment: MainAxisAlignment.center,
217 | crossAxisAlignment: CrossAxisAlignment.center,
218 | children: [
219 | new GestureDetector(
220 | onTap: () => setState(() {
221 | _animatedHeight == 0.0
222 | ? _animatedHeight = 100.0
223 | : _animatedHeight = 00.0;
224 | initial4 == false
225 | ? initial4 = true
226 | : initial4 = false;
227 | }),
228 | child: new Container(
229 | alignment: Alignment.centerLeft,
230 | child: Padding(
231 | padding: const EdgeInsets.all(8.0),
232 | child: new Row(
233 | mainAxisAlignment:
234 | MainAxisAlignment.spaceBetween,
235 | children: [
236 | Container(
237 | width: 250,
238 | child: Text(
239 | "After i click on save button when the save to storage is enabled, the screen doen not turns blank. What should i do?",
240 | maxLines: 10,
241 | overflow: TextOverflow.ellipsis,
242 | style: TextStyle(fontSize: 18)),
243 | ),
244 | Icon(Icons.arrow_circle_down)
245 | ],
246 | )),
247 | ),
248 | ),
249 | initial4 == true
250 | ? new AnimatedContainer(
251 | duration: const Duration(milliseconds: 120),
252 | child: Padding(
253 | padding: const EdgeInsets.all(8.0),
254 | child: new Text(
255 | "You should start working on your new art and as soon as you will start drawing the screen will clear as if there was nothing prior to this on the screen.",
256 | style: TextStyle(
257 | fontSize: 16,
258 | fontWeight: FontWeight.w300,
259 | letterSpacing: 0.6,
260 | height: 1.1)),
261 | ),
262 | color: Colors.tealAccent,
263 | )
264 | : Container(height: 0, width: 0)
265 | ],
266 | ),
267 | ),
268 | SizedBox(height: 5),
269 | Card(
270 | child: new Column(
271 | mainAxisAlignment: MainAxisAlignment.center,
272 | crossAxisAlignment: CrossAxisAlignment.center,
273 | children: [
274 | new GestureDetector(
275 | onTap: () => setState(() {
276 | _animatedHeight == 0.0
277 | ? _animatedHeight = 100.0
278 | : _animatedHeight = 00.0;
279 | initial5 == false
280 | ? initial5 = true
281 | : initial5 = false;
282 | }),
283 | child: new Container(
284 | alignment: Alignment.centerLeft,
285 | child: Padding(
286 | padding: const EdgeInsets.all(8.0),
287 | child: new Row(
288 | mainAxisAlignment:
289 | MainAxisAlignment.spaceBetween,
290 | children: [
291 | Container(
292 | width: 250,
293 | child: Text(
294 | "What all things can i do in this app?",
295 | maxLines: 10,
296 | overflow: TextOverflow.ellipsis,
297 | style: TextStyle(fontSize: 18)),
298 | ),
299 | Icon(Icons.arrow_circle_down)
300 | ],
301 | )),
302 | ),
303 | ),
304 | initial5 == true
305 | ? new AnimatedContainer(
306 | duration: const Duration(milliseconds: 120),
307 | child: Padding(
308 | padding: const EdgeInsets.all(8.0),
309 | child: new Text(
310 | "You can drow what ever comes to your mind, wou can make notes of particular things while you are studying and get the feel as if you are writing on paper, you can also create signatures with this and save them to an image and then use them on pages as your digital signature as if they are done by you.",
311 | style: TextStyle(
312 | fontSize: 16,
313 | fontWeight: FontWeight.w300,
314 | letterSpacing: 0.6,
315 | height: 1.1)),
316 | ),
317 | color: Colors.tealAccent,
318 | )
319 | : Container(height: 0, width: 0)
320 | ],
321 | ),
322 | ),
323 | SizedBox(height: 5),
324 | Card(
325 | child: new Column(
326 | mainAxisAlignment: MainAxisAlignment.center,
327 | crossAxisAlignment: CrossAxisAlignment.center,
328 | children: [
329 | new GestureDetector(
330 | onTap: () => setState(() {
331 | _animatedHeight == 0.0
332 | ? _animatedHeight = 100.0
333 | : _animatedHeight = 00.0;
334 | initial6 == false
335 | ? initial6 = true
336 | : initial6 = false;
337 | }),
338 | child: new Container(
339 | alignment: Alignment.centerLeft,
340 | child: Padding(
341 | padding: const EdgeInsets.all(8.0),
342 | child: new Row(
343 | mainAxisAlignment:
344 | MainAxisAlignment.spaceBetween,
345 | children: [
346 | Container(
347 | width: 250,
348 | child: Text(
349 | "Where are images saved when \"Saved on Cloud\" is enabled?",
350 | maxLines: 10,
351 | overflow: TextOverflow.ellipsis,
352 | style: TextStyle(fontSize: 18)),
353 | ),
354 | Icon(Icons.arrow_circle_down)
355 | ],
356 | )),
357 | ),
358 | ),
359 | initial6 == true
360 | ? new AnimatedContainer(
361 | duration: const Duration(milliseconds: 120),
362 | child: Padding(
363 | padding: const EdgeInsets.all(8.0),
364 | child: new Text(
365 | "The images are saved on Online storage which is allocated to you once you create your account.",
366 | style: TextStyle(
367 | fontSize: 16,
368 | fontWeight: FontWeight.w300,
369 | letterSpacing: 0.6,
370 | height: 1.1)),
371 | ),
372 | color: Colors.tealAccent,
373 | )
374 | : Container(height: 0, width: 0)
375 | ],
376 | ),
377 | ),
378 | SizedBox(height: 5),
379 | Card(
380 | child: new Column(
381 | mainAxisAlignment: MainAxisAlignment.center,
382 | crossAxisAlignment: CrossAxisAlignment.center,
383 | children: [
384 | new GestureDetector(
385 | onTap: () => setState(() {
386 | _animatedHeight == 0.0
387 | ? _animatedHeight = 100.0
388 | : _animatedHeight = 00.0;
389 | initial7 == false
390 | ? initial7 = true
391 | : initial7 = false;
392 | }),
393 | child: new Container(
394 | alignment: Alignment.centerLeft,
395 | child: Padding(
396 | padding: const EdgeInsets.all(8.0),
397 | child: new Row(
398 | mainAxisAlignment:
399 | MainAxisAlignment.spaceBetween,
400 | children: [
401 | Container(
402 | width: 250,
403 | child: Text(
404 | "Where are images saved when \"Save in storage\" is selected?",
405 | maxLines: 10,
406 | overflow: TextOverflow.ellipsis,
407 | style: TextStyle(fontSize: 18)),
408 | ),
409 | Icon(Icons.arrow_circle_down)
410 | ],
411 | )),
412 | ),
413 | ),
414 | initial7 == true
415 | ? new AnimatedContainer(
416 | duration: const Duration(milliseconds: 120),
417 | child: Padding(
418 | padding: const EdgeInsets.all(8.0),
419 | child: new Text(
420 | "The images are saved on your local storage under the folder name \"Draw It\". You can find the folder inside your gallery or inside the file manager.",
421 | style: TextStyle(
422 | fontSize: 16,
423 | fontWeight: FontWeight.w300,
424 | letterSpacing: 0.6,
425 | height: 1.1)),
426 | ),
427 | color: Colors.tealAccent,
428 | )
429 | : Container(height: 0, width: 0)
430 | ],
431 | ),
432 | ),
433 | SizedBox(height: 30),
434 | Center(child: Text("Version:1.0.3")),
435 | SizedBox(height: 20),
436 | ],
437 | ),
438 | ),
439 | ));
440 | }
441 | }
442 |
--------------------------------------------------------------------------------
/lib/aboutTheDeveloper.dart:
--------------------------------------------------------------------------------
1 | // This file has the code related to about the developer page
2 |
3 | import 'package:draw_it_app/aboutTheApp.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
6 | import 'package:shared_preferences/shared_preferences.dart';
7 | import 'webBrowserOpen.dart';
8 |
9 | class AboutTheDev extends StatefulWidget {
10 | @override
11 | _AboutTheDevState createState() => _AboutTheDevState();
12 | }
13 |
14 | class _AboutTheDevState extends State {
15 | bool isSwitched = false;
16 | bool _saveTo;
17 | SharedPreferences prefs;
18 | @override
19 | void initState() {
20 | super.initState();
21 | init();
22 | }
23 |
24 | void init() async {
25 | prefs = await SharedPreferences.getInstance();
26 | _saveTo = prefs.getBool('_saveTo') ?? false;
27 | setState(() {
28 | _saveTo;
29 | });
30 | print(prefs.getBool('_saveTo'));
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | appBar: AppBar(
37 | title: Text("About the Developer"),
38 | ),
39 | body: SingleChildScrollView(
40 | child: Padding(
41 | padding: const EdgeInsets.only(left: 20.0, right: 20),
42 | child: Column(
43 | mainAxisAlignment: MainAxisAlignment.start,
44 | children: [
45 | SizedBox(height: 40),
46 | Center(
47 | child: Container(
48 | height: 140,
49 | width: 140,
50 | decoration: BoxDecoration(
51 | shape: BoxShape.circle,
52 | color: Colors.greenAccent,
53 | image: DecorationImage(
54 | image: AssetImage(
55 | "assets/myImage.jpg",
56 | ),
57 | ),
58 | ),
59 | ),
60 | ),
61 | SizedBox(height: 10),
62 | Text(
63 | "Harsh Kumar Khatri",
64 | style: TextStyle(
65 | fontSize: 24,
66 | fontStyle: FontStyle.italic,
67 | fontWeight: FontWeight.w300,
68 | ),
69 | ),
70 | Padding(
71 | padding:
72 | const EdgeInsets.only(top: 15.0, left: 30, right: 30),
73 | child: Text(
74 | "I am a CSE Undergraduate from Career Point University. I love to learn about technology and explore various different dynamics of it. This app is for my technovation project for 5th semester.",
75 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.w200),
76 | textAlign: TextAlign.center,
77 | ),
78 | ),
79 | SizedBox(height: 15),
80 | GestureDetector(
81 | onTap: () {
82 | Navigator.push(
83 | context,
84 | MaterialPageRoute(
85 | builder: (_) => AboutTheApp(),
86 | ),
87 | );
88 | },
89 | child: Container(
90 | alignment: Alignment.center,
91 | height: 50,
92 | child: Text(
93 | "ABOUT THE APP",
94 | style: TextStyle(
95 | color: Colors.white,
96 | fontSize: 24,
97 | fontWeight: FontWeight.w400,
98 | letterSpacing: 1.5),
99 | ),
100 | decoration: BoxDecoration(
101 | borderRadius: BorderRadius.circular(24),
102 | gradient: LinearGradient(
103 | colors: [
104 | Colors.blue[200],
105 | Colors.blue[700],
106 | ],
107 | ),
108 | ),
109 | ),
110 | ),
111 | SizedBox(height: 15),
112 | Text("Follow me:"),
113 | SizedBox(height: 10),
114 | Row(
115 | mainAxisAlignment: MainAxisAlignment.spaceAround,
116 | children: [
117 | GestureDetector(
118 | onTap: () {
119 | openWebBroser("https://twitter.com/harshkhatri24");
120 | },
121 | child: FaIcon(
122 | FontAwesomeIcons.twitter,
123 | size: 30,
124 | color: Color.fromRGBO(40, 168, 237, 1),
125 | ),
126 | ),
127 | GestureDetector(
128 | onTap: () {
129 | openWebBroser("https://github.com/harshkumarkhatri");
130 | },
131 | child: FaIcon(FontAwesomeIcons.github, size: 30)),
132 | GestureDetector(
133 | onTap: () {
134 | openWebBroser(
135 | "https://www.youtube.com/channel/UCKNtMU9M559bmXxKoT6YeJw");
136 | },
137 | child: FaIcon(
138 | FontAwesomeIcons.youtube,
139 | size: 30,
140 | color: Color.fromRGBO(255, 0, 0, 1),
141 | ),
142 | ),
143 | GestureDetector(
144 | onTap: () {
145 | openWebBroser(
146 | "https://www.linkedin.com/in/harshkumarkhatri/");
147 | },
148 | child: FaIcon(
149 | FontAwesomeIcons.linkedinIn,
150 | size: 30,
151 | color: Color.fromRGBO(14, 118, 168, 1),
152 | ),
153 | )
154 | ],
155 | ),
156 | ],
157 | ),
158 | ),
159 | ));
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/lib/colorPalette.dart:
--------------------------------------------------------------------------------
1 | // This file has the code for the color pallette which is helpful in choosing multiple colors for drawing.
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class ColorDialog extends StatefulWidget {
6 | @override
7 | State createState() => ColorDialogState();
8 | }
9 |
10 | class ColorDialogState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return SimpleDialog(
14 | title: Text('Brush color'),
15 | contentPadding: const EdgeInsets.all(12.0),
16 | children: [
17 | Row(
18 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
19 | children: [
20 | FloatingActionButton(
21 | mini: true,
22 | backgroundColor: Colors.pink,
23 | elevation: 1.0,
24 | onPressed: () {
25 | Navigator.pop(context, Colors.pink[500]);
26 | }),
27 | FloatingActionButton(
28 | mini: true,
29 | backgroundColor: Colors.red,
30 | elevation: 1.0,
31 | onPressed: () {
32 | Navigator.pop(context, Colors.red[500]);
33 | }),
34 | FloatingActionButton(
35 | mini: true,
36 | backgroundColor: Colors.deepOrange,
37 | elevation: 1.0,
38 | onPressed: () {
39 | Navigator.pop(context, Colors.deepOrange[500]);
40 | }),
41 | FloatingActionButton(
42 | mini: true,
43 | backgroundColor: Colors.orange,
44 | elevation: 1.0,
45 | onPressed: () {
46 | Navigator.pop(context, Colors.orange[500]);
47 | }),
48 | ]),
49 | Row(
50 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
51 | children: [
52 | FloatingActionButton(
53 | mini: true,
54 | backgroundColor: Colors.amber,
55 | elevation: 1.0,
56 | onPressed: () {
57 | Navigator.pop(context, Colors.amber[500]);
58 | }),
59 | FloatingActionButton(
60 | mini: true,
61 | backgroundColor: Colors.yellow,
62 | elevation: 1.0,
63 | onPressed: () {
64 | Navigator.pop(context, Colors.yellow[500]);
65 | }),
66 | FloatingActionButton(
67 | mini: true,
68 | backgroundColor: Colors.lightGreen,
69 | elevation: 1.0,
70 | onPressed: () {
71 | Navigator.pop(context, Colors.lightGreen[500]);
72 | }),
73 | FloatingActionButton(
74 | mini: true,
75 | backgroundColor: Colors.green,
76 | elevation: 1.0,
77 | onPressed: () {
78 | Navigator.pop(context, Colors.green[500]);
79 | }),
80 | ]),
81 | Row(
82 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
83 | children: [
84 | FloatingActionButton(
85 | mini: true,
86 | backgroundColor: Colors.teal,
87 | elevation: 1.0,
88 | onPressed: () {
89 | Navigator.pop(context, Colors.teal[500]);
90 | }),
91 | FloatingActionButton(
92 | mini: true,
93 | backgroundColor: Colors.cyan,
94 | elevation: 1.0,
95 | onPressed: () {
96 | Navigator.pop(context, Colors.cyan[500]);
97 | }),
98 | FloatingActionButton(
99 | mini: true,
100 | backgroundColor: Colors.lightBlue,
101 | elevation: 1.0,
102 | onPressed: () {
103 | Navigator.pop(context, Colors.lightBlue[500]);
104 | }),
105 | FloatingActionButton(
106 | mini: true,
107 | backgroundColor: Colors.blue,
108 | elevation: 1.0,
109 | onPressed: () {
110 | Navigator.pop(context, Colors.blue[500]);
111 | }),
112 | ]),
113 | Row(
114 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
115 | children: [
116 | FloatingActionButton(
117 | mini: true,
118 | backgroundColor: Colors.indigo,
119 | elevation: 1.0,
120 | onPressed: () {
121 | Navigator.pop(context, Colors.indigo[500]);
122 | }),
123 | FloatingActionButton(
124 | mini: true,
125 | backgroundColor: Colors.purple,
126 | elevation: 1.0,
127 | onPressed: () {
128 | Navigator.pop(context, Colors.purple[500]);
129 | }),
130 | FloatingActionButton(
131 | mini: true,
132 | backgroundColor: Colors.deepPurple,
133 | elevation: 1.0,
134 | onPressed: () {
135 | Navigator.pop(context, Colors.deepPurple[500]);
136 | }),
137 | FloatingActionButton(
138 | mini: true,
139 | backgroundColor: Colors.blueGrey,
140 | elevation: 1.0,
141 | onPressed: () {
142 | Navigator.pop(context, Colors.blueGrey[500]);
143 | }),
144 | ]),
145 | Row(
146 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
147 | children: [
148 | FloatingActionButton(
149 | mini: true,
150 | backgroundColor: Colors.brown,
151 | elevation: 1.0,
152 | onPressed: () {
153 | Navigator.pop(context, Colors.brown[500]);
154 | }),
155 | FloatingActionButton(
156 | mini: true,
157 | backgroundColor: Colors.grey,
158 | elevation: 1.0,
159 | onPressed: () {
160 | Navigator.pop(context, Colors.grey[500]);
161 | }),
162 | FloatingActionButton(
163 | mini: true,
164 | backgroundColor: Colors.black,
165 | elevation: 1.0,
166 | onPressed: () {
167 | Navigator.pop(context, Colors.black);
168 | }),
169 | FloatingActionButton(
170 | mini: true,
171 | backgroundColor: Colors.white,
172 | elevation: 1.0,
173 | onPressed: () {
174 | Navigator.pop(context, Colors.white);
175 | }),
176 | ]),
177 | ]);
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/lib/initialScreen.dart:
--------------------------------------------------------------------------------
1 | // This file has the code related to Initial Screen which displays the GIF
2 |
3 | import 'dart:async';
4 |
5 | import 'package:draw_it_app/myHomePage.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | class SplashScreen extends StatefulWidget {
9 | @override
10 | _SplashScreenState createState() => _SplashScreenState();
11 | }
12 |
13 | class _SplashScreenState extends State {
14 | @override
15 | void initState() {
16 | super.initState();
17 | Timer(
18 | Duration(seconds: 5),
19 | () => Navigator.of(context).pushReplacement(
20 | MaterialPageRoute(builder: (_) => ScreenShotCapture())));
21 | }
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | backgroundColor: Colors.white,
27 | body: Stack(
28 | children: [
29 | Container(
30 | alignment: Alignment.center,
31 | decoration: BoxDecoration(color: Colors.white),
32 | child: Image.asset("assets/loadingGIF.gif"),
33 | ),
34 | Column(
35 | crossAxisAlignment: CrossAxisAlignment.center,
36 | children: [
37 | SizedBox(height: 50),
38 | Center(
39 | child: Text("Draw It",
40 | style: TextStyle(
41 | fontSize: 60.0,
42 | fontWeight: FontWeight.bold,
43 | foreground: Paint()..shader = linearGradient)),
44 | ),
45 | ],
46 | ),
47 | ],
48 | ));
49 | }
50 |
51 | final Shader linearGradient = LinearGradient(
52 | colors: [Colors.white, Colors.blue[300]],
53 | ).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0));
54 | }
55 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | // Main file for the app
2 |
3 | import 'package:draw_it_app/LogInSignUpSwitcher.dart';
4 | import 'package:draw_it_app/LoginPage.dart';
5 | import 'package:draw_it_app/SignUpPage.dart';
6 | import 'package:draw_it_app/initialScreen.dart';
7 | import 'package:firebase_core/firebase_core.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter/services.dart';
10 | import 'package:shared_preferences/shared_preferences.dart';
11 |
12 | Future main() async {
13 | WidgetsFlutterBinding.ensureInitialized();
14 | SharedPreferences prefs = await SharedPreferences.getInstance();
15 | var email = prefs.getString('email');
16 | WidgetsFlutterBinding.ensureInitialized();
17 | await Firebase.initializeApp();
18 | // Forcing the layout to be portrait
19 | await SystemChrome.setPreferredOrientations(
20 | [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
21 | runApp(MaterialApp(debugShowCheckedModeBanner: false,
22 | title: "Draw It",
23 | home: email == null ? LogInSignUpSwitcher() : SplashScreen()));
24 | }
25 |
--------------------------------------------------------------------------------
/lib/myHomePage.dart:
--------------------------------------------------------------------------------
1 | // This file has the code related to the main home screen for the app which consists of the drawing screen
2 |
3 | import 'dart:convert';
4 | import 'dart:typed_data';
5 | import 'dart:ui' as ui;
6 | import 'package:cloud_firestore/cloud_firestore.dart';
7 | import 'package:draw_it_app/LogInSignUpSwitcher.dart';
8 | import 'package:draw_it_app/aboutTheDeveloper.dart';
9 | import 'package:draw_it_app/ImagesGridview.dart';
10 | import 'package:firebase_auth/firebase_auth.dart';
11 | import 'package:firebase_database/firebase_database.dart';
12 | import 'package:firebase_storage/firebase_storage.dart';
13 | import 'package:flutter/material.dart';
14 | import 'package:flutter/rendering.dart';
15 | import 'package:flutter/services.dart';
16 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
17 | import 'package:screenshot/screenshot.dart';
18 | import 'colorPalette.dart';
19 | import 'package:save_in_gallery/save_in_gallery.dart';
20 | import 'package:shared_preferences/shared_preferences.dart';
21 |
22 | void main() => runApp(ScreenShotCapture());
23 |
24 | class ScreenShotCapture extends StatelessWidget {
25 | @override
26 | Widget build(BuildContext context) {
27 | return MaterialApp(
28 | title: 'Flutter Demo',
29 | theme: ThemeData(
30 | primarySwatch: Colors.blue,
31 | ),
32 | home: MyHomePage(title: 'Screenshot Demo Home Page'),
33 | );
34 | }
35 | }
36 |
37 | class MyHomePage extends StatefulWidget {
38 | MyHomePage({Key key, this.title}) : super(key: key);
39 |
40 | final String title;
41 |
42 | @override
43 | _MyHomePageState createState() => _MyHomePageState();
44 | }
45 |
46 | class _MyHomePageState extends State with TickerProviderStateMixin {
47 | ScreenshotController screenshotController = ScreenshotController();
48 |
49 | AnimationController controller;
50 | List points = [];
51 | Color color = Colors.black;
52 | StrokeCap strokeCap = StrokeCap.round;
53 | double strokeWidth = 5.0;
54 | List painterList = [];
55 | final GlobalKey _scaffoldKey = new GlobalKey();
56 | SharedPreferences prefs;
57 | bool _saveTo = false;
58 | var email, uid, imageUrl;
59 | Color temp;
60 |
61 | // Auth for firebase authentications
62 | final FirebaseAuth auth = FirebaseAuth.instance;
63 | // var firebaseUser=auth.currentUser;
64 |
65 | // List which will store the list in the database
66 | List li;
67 | dynamic imageURLS;
68 |
69 | @override
70 | void initState() {
71 | super.initState();
72 | controller = new AnimationController(
73 | vsync: this,
74 | duration: const Duration(milliseconds: 500),
75 | );
76 |
77 | init();
78 | }
79 |
80 | // Getting the initial value of the _saveTo, prefs, email, uid variable and setting other variables accordingly
81 | void init() async {
82 | prefs = await SharedPreferences.getInstance();
83 | email = prefs.getString('email');
84 | uid = prefs.getString('uid');
85 | _saveTo = prefs.getBool('_saveTo') ?? false;
86 | setState(() {
87 | if (email == null) {
88 | _saveTo = true;
89 | }
90 | _saveTo;
91 | if (uid != null) {
92 | folderName = uid;
93 | }
94 | });
95 | var firebaseUser = auth.currentUser;
96 | firestoreInstance
97 | .collection("ImageLinks")
98 | .document(firebaseUser.uid)
99 | .get()
100 | .then((value) {});
101 | }
102 |
103 | // Initializing a firestore instance.
104 | final firestoreInstance = Firestore.instance;
105 |
106 | // Showing snackbar
107 | void showInSnackBar(text) {
108 | print(text);
109 | _scaffoldKey.currentState.showSnackBar(
110 | SnackBar(
111 | content: Text(text),
112 | ),
113 | );
114 | }
115 |
116 | final _imageSave = ImageSaver();
117 | GlobalKey _repaintKey = GlobalKey();
118 | StorageReference storageReference = FirebaseStorage().ref();
119 | bool isSwitched = false;
120 | bool loading = false;
121 | var forClear = "save";
122 | var loc;
123 |
124 | String folderName;
125 | static FirebaseDatabase fb = FirebaseDatabase.instance;
126 | DatabaseReference ref = fb.reference();
127 | FirebaseFirestore firestore = FirebaseFirestore.instance;
128 | CollectionReference users =
129 | FirebaseFirestore.instance.collection("ImageLinks");
130 |
131 | // Converting the screen to image and saving on cloud or storage
132 | void convertWidgetToImage() async {
133 | RenderRepaintBoundary renderRepaintBoundary =
134 | _repaintKey.currentContext.findRenderObject();
135 | ui.Image boxImage = await renderRepaintBoundary.toImage(pixelRatio: 1);
136 | ByteData bytedata =
137 | await boxImage.toByteData(format: ui.ImageByteFormat.png);
138 | Uint8List iInt8List = bytedata.buffer.asUint8List();
139 | this.setState(() {
140 | loading = true;
141 | loc = "$folderName/IMG_${DateTime.now()}.png";
142 | });
143 |
144 | // Saving the screen
145 | if (forClear == "save") {
146 | // Saving the screen to Storage
147 | if (_saveTo) {
148 | final res = await _imageSave.saveImage(
149 | imageBytes: iInt8List, directoryName: "Draw It");
150 | // print("res is ${res}");
151 | print("saving to gallery");
152 | showInSnackBar(
153 | "Image Saved to Gallery. Start drawing to auto clear screen.");
154 | }
155 |
156 | // Saving the screen to Cloud.
157 | else {
158 | StorageUploadTask storageUploadTask =
159 | storageReference.child(loc).putData(iInt8List);
160 | await storageUploadTask.onComplete;
161 | storageReference.child(loc).getDownloadURL().then(
162 | (url) {
163 | setState(
164 | () {
165 | print("url is $url");
166 | imageUrl = url;
167 | print("Image url is ${imageURLS.toString()}");
168 | print("Email is $email");
169 |
170 | // This will be updating and adding the link of new saved image to the firestore database which was initialized after successful signup.
171 | users.document(uid).updateData(
172 | {
173 | "links": FieldValue.arrayUnion([url])
174 | },
175 | );
176 | },
177 | );
178 | },
179 | );
180 | print("Saving to cloud");
181 | print("imge url is ${imageUrl}");
182 |
183 | // Showing a message when image saved to cloud.
184 | showInSnackBar("Image saved to Cloud.");
185 | }
186 | }
187 |
188 | // Circular progress indicator will be displayed until the image is saved.
189 | CircularProgressIndicator();
190 |
191 | // For clearing the Screen and displaying a message with snackbar.
192 | if (forClear != "save") {
193 | WidgetsBinding.instance.addPostFrameCallback((_) => showInSnackBar(
194 | "Cleared in backend. Start drawing to hve an empty screen."));
195 | }
196 | painterList.clear();
197 | points.clear();
198 | this.setState(() {
199 | forClear = "save";
200 | loading = false;
201 | });
202 | }
203 |
204 | @override
205 | Widget build(BuildContext context) {
206 | // Displaying a pop-up screen on clicking back to exit the app.
207 | return WillPopScope(
208 | onWillPop: () async {
209 | final value = await showDialog(
210 | context: context,
211 | builder: (context) {
212 | // Displaying an alert message on basis of coloured pixels on screen.
213 | return AlertDialog(
214 | content: painterList.isEmpty && points.isEmpty
215 | ? Text('Are you sure you want to exit?')
216 | : Text(
217 | "Are you sure you want to exit? All progress will be lost"),
218 |
219 | // Actions displayed when we click back to exit the app.
220 | actions: [
221 | FlatButton(
222 | child: Text('No'),
223 | onPressed: () {
224 | Navigator.of(context).pop(false);
225 | },
226 | ),
227 | FlatButton(
228 | child: Text('Yes, exit'),
229 | onPressed: () {
230 | Navigator.of(context).pop(true);
231 | },
232 | ),
233 | ],
234 | );
235 | },
236 | );
237 |
238 | return value == true;
239 | },
240 | child: Scaffold(
241 | key: _scaffoldKey,
242 |
243 | // Switching between circular progress bar indicator and stack
244 | body: !loading
245 | ? Stack(
246 | children: [
247 | // Screen on which drawings are made.
248 | RepaintBoundary(
249 | key: _repaintKey,
250 | child: Container(
251 | color: Colors.white,
252 | child: new GestureDetector(
253 | onPanUpdate: (DragUpdateDetails details) {
254 | setState(() {
255 | RenderBox object = context.findRenderObject();
256 | Offset localPosition =
257 | object.globalToLocal(details.globalPosition);
258 | points = new List.from(points);
259 | points.add(localPosition);
260 | });
261 | },
262 | onPanEnd: (DragEndDetails details) => points.add(null),
263 | child: CustomPaint(
264 | painter: Painter(
265 | points: points,
266 | color: color,
267 | strokeCap: strokeCap,
268 | strokeWidth: strokeWidth,
269 | painters: painterList),
270 | size: Size.infinite,
271 | ),
272 | ),
273 | ),
274 | ),
275 |
276 | // Top 3 dots
277 | Positioned(
278 | top: 45,
279 | right: 0,
280 | child: FlatButton(
281 | onPressed: () {
282 | print("pressing");
283 | },
284 | child: PopupMenuButton(
285 | onSelected: handleClick,
286 | itemBuilder: (BuildContext context) {
287 | return {
288 | 'About The Developer',
289 | email != null
290 | ? (_saveTo
291 | ? "Save to Cloud"
292 | : "Save to Storage")
293 | : "Save to Storage",
294 | 'Images Saved to Cloud',
295 | 'Quick Exit',
296 | email == null ? "Log In" : "Log Out",
297 | }.map((String choice) {
298 | return PopupMenuItem(
299 | value: choice,
300 | child: Text(choice),
301 | );
302 | }).toList();
303 | },
304 | ),
305 | ),
306 | ),
307 | ],
308 | )
309 | :
310 | //Displayed when image is being saved.
311 | Center(child: CircularProgressIndicator()),
312 | floatingActionButton: Column(
313 | mainAxisSize: MainAxisSize.min,
314 | children: [
315 | // Clear Floating action button
316 | Container(
317 | height: 70.0,
318 | width: 56.0,
319 | alignment: FractionalOffset.topCenter,
320 | child: ScaleTransition(
321 | scale: CurvedAnimation(
322 | parent: controller,
323 | curve:
324 | Interval(0.0, 1.0 - 0 / 3 / 2.0, curve: Curves.easeOut),
325 | ),
326 | child: FloatingActionButton(
327 | heroTag: null,
328 | tooltip: "Clear",
329 | mini: true,
330 | child: Icon(Icons.clear),
331 | onPressed: () {
332 | forClear = "!save";
333 | convertWidgetToImage();
334 | points.clear();
335 | painterList.clear();
336 | },
337 | ),
338 | ),
339 | ),
340 |
341 | // Erase Floating action button
342 | Container(
343 | height: 70.0,
344 | width: 56.0,
345 | alignment: FractionalOffset.topCenter,
346 | child: ScaleTransition(
347 | scale: CurvedAnimation(
348 | parent: controller,
349 | curve:
350 | Interval(0.0, 1.0 - 1 / 3 / 2.0, curve: Curves.easeOut),
351 | ),
352 | child: FloatingActionButton(
353 | heroTag: null,
354 | tooltip: "Erase",
355 | mini: true,
356 | child: FaIcon(FontAwesomeIcons.eraser),
357 | onPressed: () {
358 | Color temp;
359 | temp = Colors.white;
360 | if (temp != null) {
361 | setState(() {
362 | painterList.add(Painter(
363 | points: points.toList(),
364 | color: color,
365 | strokeCap: strokeCap,
366 | strokeWidth: strokeWidth));
367 | points.clear();
368 | strokeCap = StrokeCap.round;
369 | strokeWidth = 5.0;
370 | color = temp;
371 | });
372 | }
373 | _pickStroke();
374 | },
375 | ),
376 | ),
377 | ),
378 |
379 | // Draw Floating action button
380 | Container(
381 | height: 70.0,
382 | width: 56.0,
383 | alignment: FractionalOffset.topCenter,
384 | child: ScaleTransition(
385 | scale: CurvedAnimation(
386 | parent: controller,
387 | curve:
388 | Interval(0.0, 1.0 - 1 / 3 / 2.0, curve: Curves.easeOut),
389 | ),
390 | child: FloatingActionButton(
391 | heroTag: null,
392 | tooltip: "Draw",
393 | mini: true,
394 | child: Icon(Icons.brush),
395 | onPressed: () {
396 | if (temp != null) {
397 | setState(
398 | () {
399 | painterList.add(Painter(
400 | points: points.toList(),
401 | color: color,
402 | strokeCap: strokeCap,
403 | strokeWidth: strokeWidth));
404 | points.clear();
405 | strokeCap = StrokeCap.round;
406 | strokeWidth = strokeWidth;
407 | color = temp;
408 | },
409 | );
410 | _pickStroke();
411 | print("Stroke width is $strokeWidth");
412 | }
413 | },
414 | ),
415 | ),
416 | ),
417 |
418 | // Change Colors Floating Action Button
419 | Container(
420 | height: 70.0,
421 | width: 56.0,
422 | alignment: FractionalOffset.topCenter,
423 | child: ScaleTransition(
424 | scale: CurvedAnimation(
425 | parent: controller,
426 | curve:
427 | Interval(0.0, 1.0 - 2 / 3 / 2.0, curve: Curves.easeOut),
428 | ),
429 | child: FloatingActionButton(
430 | heroTag: null,
431 | tooltip: "Change Color",
432 | mini: true,
433 | child: Icon(
434 | Icons.color_lens,
435 | ),
436 | onPressed: () async {
437 | temp = await showDialog(
438 | context: context, builder: (context) => ColorDialog());
439 | setState(() {
440 | temp;
441 | });
442 | if (temp != null) {
443 | setState(
444 | () {
445 | painterList.add(Painter(
446 | points: points.toList(),
447 | color: color,
448 | strokeCap: strokeCap,
449 | strokeWidth: strokeWidth));
450 | points.clear();
451 | strokeCap = StrokeCap.round;
452 | strokeWidth = strokeWidth;
453 | color = temp;
454 | },
455 | );
456 | }
457 | },
458 | ),
459 | ),
460 | ),
461 |
462 | // Save Floating Action Button
463 | Container(
464 | height: 70.0,
465 | width: 56.0,
466 | alignment: FractionalOffset.topCenter,
467 | child: ScaleTransition(
468 | scale: CurvedAnimation(
469 | parent: controller,
470 | curve:
471 | Interval(0.0, 1.0 - 2 / 3 / 2.0, curve: Curves.easeOut),
472 | ),
473 | child: FloatingActionButton(
474 | heroTag: null,
475 | tooltip: "Save",
476 | mini: true,
477 | child: Icon(
478 | Icons.save_alt,
479 | ),
480 | onPressed: () async {
481 | convertWidgetToImage();
482 | },
483 | ),
484 | ),
485 | ),
486 |
487 | // Main Floating Action Button
488 | FloatingActionButton(
489 | heroTag: null,
490 | tooltip: "Open Drawer",
491 | child: AnimatedBuilder(
492 | animation: controller,
493 | builder: (BuildContext context, Widget child) {
494 | return Transform(
495 | transform:
496 | Matrix4.rotationZ(controller.value * 0.5 * 3.1415),
497 | alignment: FractionalOffset.center,
498 | child: Icon(Icons.brush),
499 | );
500 | },
501 | ),
502 | onPressed: () {
503 | if (controller.isDismissed) {
504 | controller.forward();
505 | } else {
506 | controller.reverse();
507 | }
508 | },
509 | ),
510 | ],
511 | ),
512 | ),
513 | );
514 | }
515 |
516 | // This will help in changing the width of the stroke of the brush
517 | Future _pickStroke() async {
518 | //Shows AlertDialog
519 | return showDialog(
520 | context: context,
521 |
522 | //Dismiss alert dialog when set true
523 | barrierDismissible: true, // user must tap button!
524 | builder: (BuildContext context) {
525 | return Container(
526 | height: 50,
527 | width: 190,
528 | color: Colors.red,
529 | child: Row(
530 | children: [
531 | //Resetting to default stroke value
532 | FlatButton(
533 | child: Icon(Icons.brush, size: 20),
534 | onPressed: () {
535 | temp = temp;
536 | strokeWidth = 3.0;
537 | Navigator.of(context).pop();
538 | },
539 | ),
540 | FlatButton(
541 | child: Icon(
542 | Icons.brush,
543 | size: 35,
544 | ),
545 | onPressed: () {
546 | temp = temp;
547 | strokeWidth = 5.0;
548 | Navigator.of(context).pop();
549 | },
550 | ),
551 | FlatButton(
552 | child: Icon(
553 | Icons.brush,
554 | size: 45,
555 | ),
556 | onPressed: () {
557 | strokeWidth = 25.0;
558 | temp = temp;
559 | Navigator.of(context).pop();
560 | },
561 | ),
562 | FlatButton(
563 | child: Icon(
564 | Icons.brush,
565 | size: 60,
566 | ),
567 | onPressed: () {
568 | strokeWidth = 50.0;
569 | temp = temp;
570 | Navigator.of(context).pop();
571 | },
572 | ),
573 | ],
574 | ),
575 | );
576 | },
577 | );
578 | }
579 |
580 | // Open the page respective to the choice from top 3 dots
581 | void handleClick(String value) {
582 | switch (value) {
583 | // Opens the About the Developer page
584 | case 'About The Developer':
585 | Navigator.push(
586 | context, MaterialPageRoute(builder: (_) => AboutTheDev()));
587 | break;
588 |
589 | // Opens the Images saved to cloud page where images are displayed in form of GridView.
590 | case 'Images Saved to Cloud':
591 | email != null
592 | ? Navigator.push(
593 | context, MaterialPageRoute(builder: (_) => ImagesGridView()))
594 | : showInSnackBar(
595 | "You need to login and Save images to Cloud to access this. Images Saved to Local Storage Can be found in Gallery.");
596 | break;
597 |
598 | // Switches the _saveTo variable so that screens are saved in cloud.
599 | case 'Save to Cloud':
600 | print("Printinh inside save to cloud ${_saveTo}");
601 | setState(() {
602 | _saveTo = !_saveTo;
603 | });
604 | prefs.setBool('_saveTo', _saveTo);
605 | showInSnackBar("Your drawings will be saved to Cloud");
606 | break;
607 |
608 | // Switches the _saveTo variable so that screens are saved in storage.
609 | case 'Save to Storage':
610 | print("Printinh inside save to storage ${_saveTo}");
611 | setState(() {
612 | email == null ? _saveTo = true : _saveTo = !_saveTo;
613 | });
614 | prefs.setBool('_saveTo', _saveTo);
615 | showInSnackBar("Your drawings will be saved to Internal Storage");
616 | break;
617 |
618 | // Exits the app directly.
619 | case 'Quick Exit':
620 | SystemChannels.platform.invokeMethod('SystemNavigator.pop');
621 | break;
622 |
623 | // Pops out the drawing pad screen and pops in the login signup switcher screen
624 | case 'Log In':
625 | {
626 | Navigator.pop(context);
627 | Navigator.push(context,
628 | MaterialPageRoute(builder: (_) => LogInSignUpSwitcher()));
629 | }
630 |
631 | break;
632 |
633 | // Setting the Shared prefrence values to null with popping an screen and pushing the login signup switcher screen
634 | case 'Log Out':
635 | {
636 | prefs.setString('email', null);
637 | prefs.setString('uid', null);
638 | Navigator.pop(context);
639 | Navigator.push(context,
640 | MaterialPageRoute(builder: (_) => LogInSignUpSwitcher()));
641 | }
642 |
643 | break;
644 | }
645 | }
646 | }
647 |
648 | // For painting on the screen
649 | class Painter extends CustomPainter {
650 | List points;
651 | Color color;
652 | StrokeCap strokeCap;
653 | double strokeWidth;
654 | List painters;
655 |
656 | Painter({
657 | this.points,
658 | this.color,
659 | this.strokeCap,
660 | this.strokeWidth,
661 | this.painters = const [],
662 | });
663 |
664 | @override
665 | void paint(Canvas canvas, Size size) {
666 | for (Painter painter in painters) {
667 | painter.paint(canvas, size);
668 | }
669 |
670 | Paint paint = new Paint()
671 | ..color = color
672 | ..strokeCap = strokeCap
673 | ..strokeWidth = strokeWidth;
674 | for (int i = 0; i < points.length - 1; i++) {
675 | if (points[i] != null && points[i + 1] != null) {
676 | canvas.drawLine(points[i], points[i + 1], paint);
677 | }
678 | }
679 | }
680 |
681 | @override
682 | bool shouldRepaint(Painter oldDelegate) => oldDelegate.points != points;
683 | }
684 |
--------------------------------------------------------------------------------
/lib/webBrowserOpen.dart:
--------------------------------------------------------------------------------
1 | // This file has the code related to the social media links which will be opening in app in the browser itself.
2 |
3 | import 'package:flutter_web_browser/flutter_web_browser.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | openWebBroser(url) {
7 | FlutterWebBrowser.openWebPage(
8 | url: url,
9 | androidToolbarColor: Colors.blue,
10 | safariVCOptions: SafariViewControllerOptions(
11 | barCollapsingEnabled: true,
12 | dismissButtonStyle: SafariViewControllerDismissButtonStyle.close,
13 | modalPresentationCapturesStatusBarAppearance: true,
14 | ),
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/linux/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 | project(runner LANGUAGES CXX)
3 |
4 | set(BINARY_NAME "draw_it_app")
5 |
6 | cmake_policy(SET CMP0063 NEW)
7 |
8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
9 |
10 | # Configure build options.
11 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
12 | set(CMAKE_BUILD_TYPE "Debug" CACHE
13 | STRING "Flutter build mode" FORCE)
14 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
15 | "Debug" "Profile" "Release")
16 | endif()
17 |
18 | # Compilation settings that should be applied to most targets.
19 | function(APPLY_STANDARD_SETTINGS TARGET)
20 | target_compile_features(${TARGET} PUBLIC cxx_std_14)
21 | target_compile_options(${TARGET} PRIVATE -Wall -Werror)
22 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>")
23 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>")
24 | endfunction()
25 |
26 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
27 |
28 | # Flutter library and tool build rules.
29 | add_subdirectory(${FLUTTER_MANAGED_DIR})
30 |
31 | # System-level dependencies.
32 | find_package(PkgConfig REQUIRED)
33 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
34 |
35 | # Application build
36 | add_executable(${BINARY_NAME}
37 | "main.cc"
38 | "my_application.cc"
39 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
40 | )
41 | apply_standard_settings(${BINARY_NAME})
42 | target_link_libraries(${BINARY_NAME} PRIVATE flutter)
43 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
44 | add_dependencies(${BINARY_NAME} flutter_assemble)
45 |
46 | # Generated plugin build rules, which manage building the plugins and adding
47 | # them to the application.
48 | include(flutter/generated_plugins.cmake)
49 |
50 |
51 | # === Installation ===
52 | # By default, "installing" just makes a relocatable bundle in the build
53 | # directory.
54 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
55 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
56 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
57 | endif()
58 |
59 | # Start with a clean build bundle directory every time.
60 | install(CODE "
61 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
62 | " COMPONENT Runtime)
63 |
64 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
65 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
66 |
67 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
68 | COMPONENT Runtime)
69 |
70 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
71 | COMPONENT Runtime)
72 |
73 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
74 | COMPONENT Runtime)
75 |
76 | if(PLUGIN_BUNDLED_LIBRARIES)
77 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
78 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
79 | COMPONENT Runtime)
80 | endif()
81 |
82 | # Fully re-copy the assets directory on each build to avoid having stale files
83 | # from a previous install.
84 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
85 | install(CODE "
86 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
87 | " COMPONENT Runtime)
88 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
89 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
90 |
91 | # Install the AOT library on non-Debug builds only.
92 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
94 | COMPONENT Runtime)
95 | endif()
96 |
--------------------------------------------------------------------------------
/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
4 |
5 | # Configuration provided via flutter tool.
6 | include(${EPHEMERAL_DIR}/generated_config.cmake)
7 |
8 | # TODO: Move the rest of this into files in ephemeral. See
9 | # https://github.com/flutter/flutter/issues/57146.
10 |
11 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
12 | # which isn't available in 3.10.
13 | function(list_prepend LIST_NAME PREFIX)
14 | set(NEW_LIST "")
15 | foreach(element ${${LIST_NAME}})
16 | list(APPEND NEW_LIST "${PREFIX}${element}")
17 | endforeach(element)
18 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
19 | endfunction()
20 |
21 | # === Flutter Library ===
22 | # System-level dependencies.
23 | find_package(PkgConfig REQUIRED)
24 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
25 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
26 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
27 |
28 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
29 |
30 | # Published to parent scope for install step.
31 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
32 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
33 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
34 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
35 |
36 | list(APPEND FLUTTER_LIBRARY_HEADERS
37 | "fl_basic_message_channel.h"
38 | "fl_binary_codec.h"
39 | "fl_binary_messenger.h"
40 | "fl_dart_project.h"
41 | "fl_engine.h"
42 | "fl_json_message_codec.h"
43 | "fl_json_method_codec.h"
44 | "fl_message_codec.h"
45 | "fl_method_call.h"
46 | "fl_method_channel.h"
47 | "fl_method_codec.h"
48 | "fl_method_response.h"
49 | "fl_plugin_registrar.h"
50 | "fl_plugin_registry.h"
51 | "fl_standard_message_codec.h"
52 | "fl_standard_method_codec.h"
53 | "fl_string_codec.h"
54 | "fl_value.h"
55 | "fl_view.h"
56 | "flutter_linux.h"
57 | )
58 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
59 | add_library(flutter INTERFACE)
60 | target_include_directories(flutter INTERFACE
61 | "${EPHEMERAL_DIR}"
62 | )
63 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
64 | target_link_libraries(flutter INTERFACE
65 | PkgConfig::GTK
66 | PkgConfig::GLIB
67 | PkgConfig::GIO
68 | )
69 | add_dependencies(flutter flutter_assemble)
70 |
71 | # === Flutter tool backend ===
72 | # _phony_ is a non-existent file to force this command to run every time,
73 | # since currently there's no way to get a full input/output list from the
74 | # flutter tool.
75 | add_custom_command(
76 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
77 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
78 | COMMAND ${CMAKE_COMMAND} -E env
79 | ${FLUTTER_TOOL_ENVIRONMENT}
80 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
81 | linux-x64 ${CMAKE_BUILD_TYPE}
82 | )
83 | add_custom_target(flutter_assemble DEPENDS
84 | "${FLUTTER_LIBRARY}"
85 | ${FLUTTER_LIBRARY_HEADERS}
86 | )
87 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #include "generated_plugin_registrant.h"
6 |
7 | #include
8 |
9 | void fl_register_plugins(FlPluginRegistry* registry) {
10 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
11 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
12 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
13 | }
14 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #ifndef GENERATED_PLUGIN_REGISTRANT_
6 | #define GENERATED_PLUGIN_REGISTRANT_
7 |
8 | #include
9 |
10 | // Registers Flutter plugins.
11 | void fl_register_plugins(FlPluginRegistry* registry);
12 |
13 | #endif // GENERATED_PLUGIN_REGISTRANT_
14 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | url_launcher_linux
7 | )
8 |
9 | set(PLUGIN_BUNDLED_LIBRARIES)
10 |
11 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
12 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
13 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
15 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
16 | endforeach(plugin)
17 |
--------------------------------------------------------------------------------
/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | // Only X11 is currently supported.
5 | // Wayland support is being developed: https://github.com/flutter/flutter/issues/57932.
6 | gdk_set_allowed_backends("x11");
7 |
8 | g_autoptr(MyApplication) app = my_application_new();
9 | return g_application_run(G_APPLICATION(app), argc, argv);
10 | }
11 |
--------------------------------------------------------------------------------
/linux/my_application.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | struct _MyApplication {
8 | GtkApplication parent_instance;
9 | };
10 |
11 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
12 |
13 | // Implements GApplication::activate.
14 | static void my_application_activate(GApplication* application) {
15 | GtkWindow* window =
16 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
17 | GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
18 | gtk_widget_show(GTK_WIDGET(header_bar));
19 | gtk_header_bar_set_title(header_bar, "draw_it_app");
20 | gtk_header_bar_set_show_close_button(header_bar, TRUE);
21 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
22 | gtk_window_set_default_size(window, 1280, 720);
23 | gtk_widget_show(GTK_WIDGET(window));
24 |
25 | g_autoptr(FlDartProject) project = fl_dart_project_new();
26 |
27 | FlView* view = fl_view_new(project);
28 | gtk_widget_show(GTK_WIDGET(view));
29 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
30 |
31 | fl_register_plugins(FL_PLUGIN_REGISTRY(view));
32 |
33 | gtk_widget_grab_focus(GTK_WIDGET(view));
34 | }
35 |
36 | static void my_application_class_init(MyApplicationClass* klass) {
37 | G_APPLICATION_CLASS(klass)->activate = my_application_activate;
38 | }
39 |
40 | static void my_application_init(MyApplication* self) {}
41 |
42 | MyApplication* my_application_new() {
43 | return MY_APPLICATION(g_object_new(my_application_get_type(), nullptr));
44 | }
45 |
--------------------------------------------------------------------------------
/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.5.0-nullsafety"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0-nullsafety"
18 | cached_network_image:
19 | dependency: "direct main"
20 | description:
21 | name: cached_network_image
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.3.2+1"
25 | characters:
26 | dependency: transitive
27 | description:
28 | name: characters
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.1.0-nullsafety.2"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.2.0-nullsafety"
39 | clock:
40 | dependency: transitive
41 | description:
42 | name: clock
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.1.0-nullsafety"
46 | cloud_firestore:
47 | dependency: "direct main"
48 | description:
49 | name: cloud_firestore
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "0.14.0+2"
53 | cloud_firestore_platform_interface:
54 | dependency: transitive
55 | description:
56 | name: cloud_firestore_platform_interface
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "2.0.1"
60 | cloud_firestore_web:
61 | dependency: transitive
62 | description:
63 | name: cloud_firestore_web
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "0.2.0+1"
67 | collection:
68 | dependency: transitive
69 | description:
70 | name: collection
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.15.0-nullsafety.2"
74 | convert:
75 | dependency: transitive
76 | description:
77 | name: convert
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "2.1.1"
81 | crypto:
82 | dependency: transitive
83 | description:
84 | name: crypto
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "2.1.5"
88 | cupertino_icons:
89 | dependency: "direct main"
90 | description:
91 | name: cupertino_icons
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "0.1.3"
95 | esys_flutter_share:
96 | dependency: "direct main"
97 | description:
98 | name: esys_flutter_share
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "1.0.2"
102 | ext_storage:
103 | dependency: "direct main"
104 | description:
105 | name: ext_storage
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.0.3"
109 | fake_async:
110 | dependency: transitive
111 | description:
112 | name: fake_async
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "1.1.0-nullsafety"
116 | file:
117 | dependency: transitive
118 | description:
119 | name: file
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "5.2.1"
123 | firebase:
124 | dependency: transitive
125 | description:
126 | name: firebase
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "7.3.0"
130 | firebase_auth:
131 | dependency: "direct main"
132 | description:
133 | name: firebase_auth
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "0.18.0+1"
137 | firebase_auth_platform_interface:
138 | dependency: transitive
139 | description:
140 | name: firebase_auth_platform_interface
141 | url: "https://pub.dartlang.org"
142 | source: hosted
143 | version: "2.0.1"
144 | firebase_auth_web:
145 | dependency: transitive
146 | description:
147 | name: firebase_auth_web
148 | url: "https://pub.dartlang.org"
149 | source: hosted
150 | version: "0.3.0+1"
151 | firebase_core:
152 | dependency: "direct main"
153 | description:
154 | name: firebase_core
155 | url: "https://pub.dartlang.org"
156 | source: hosted
157 | version: "0.5.0"
158 | firebase_core_platform_interface:
159 | dependency: transitive
160 | description:
161 | name: firebase_core_platform_interface
162 | url: "https://pub.dartlang.org"
163 | source: hosted
164 | version: "2.0.0"
165 | firebase_core_web:
166 | dependency: transitive
167 | description:
168 | name: firebase_core_web
169 | url: "https://pub.dartlang.org"
170 | source: hosted
171 | version: "0.2.0"
172 | firebase_database:
173 | dependency: "direct main"
174 | description:
175 | name: firebase_database
176 | url: "https://pub.dartlang.org"
177 | source: hosted
178 | version: "4.0.0"
179 | firebase_storage:
180 | dependency: "direct main"
181 | description:
182 | name: firebase_storage
183 | url: "https://pub.dartlang.org"
184 | source: hosted
185 | version: "4.0.0"
186 | flutter:
187 | dependency: "direct main"
188 | description: flutter
189 | source: sdk
190 | version: "0.0.0"
191 | flutter_blurhash:
192 | dependency: transitive
193 | description:
194 | name: flutter_blurhash
195 | url: "https://pub.dartlang.org"
196 | source: hosted
197 | version: "0.5.0"
198 | flutter_cache_manager:
199 | dependency: transitive
200 | description:
201 | name: flutter_cache_manager
202 | url: "https://pub.dartlang.org"
203 | source: hosted
204 | version: "1.4.2"
205 | flutter_signature_pad:
206 | dependency: "direct main"
207 | description:
208 | name: flutter_signature_pad
209 | url: "https://pub.dartlang.org"
210 | source: hosted
211 | version: "2.0.2"
212 | flutter_test:
213 | dependency: "direct dev"
214 | description: flutter
215 | source: sdk
216 | version: "0.0.0"
217 | flutter_web_browser:
218 | dependency: "direct main"
219 | description:
220 | name: flutter_web_browser
221 | url: "https://pub.dartlang.org"
222 | source: hosted
223 | version: "0.12.0"
224 | flutter_web_plugins:
225 | dependency: transitive
226 | description: flutter
227 | source: sdk
228 | version: "0.0.0"
229 | fluttertoast:
230 | dependency: "direct main"
231 | description:
232 | name: fluttertoast
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "7.1.1"
236 | font_awesome_flutter:
237 | dependency: "direct main"
238 | description:
239 | name: font_awesome_flutter
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "8.8.1"
243 | http:
244 | dependency: transitive
245 | description:
246 | name: http
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "0.12.2"
250 | http_parser:
251 | dependency: transitive
252 | description:
253 | name: http_parser
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "3.1.4"
257 | intl:
258 | dependency: transitive
259 | description:
260 | name: intl
261 | url: "https://pub.dartlang.org"
262 | source: hosted
263 | version: "0.16.1"
264 | js:
265 | dependency: transitive
266 | description:
267 | name: js
268 | url: "https://pub.dartlang.org"
269 | source: hosted
270 | version: "0.6.2"
271 | matcher:
272 | dependency: transitive
273 | description:
274 | name: matcher
275 | url: "https://pub.dartlang.org"
276 | source: hosted
277 | version: "0.12.10-nullsafety"
278 | meta:
279 | dependency: transitive
280 | description:
281 | name: meta
282 | url: "https://pub.dartlang.org"
283 | source: hosted
284 | version: "1.3.0-nullsafety.2"
285 | octo_image:
286 | dependency: transitive
287 | description:
288 | name: octo_image
289 | url: "https://pub.dartlang.org"
290 | source: hosted
291 | version: "0.3.0"
292 | path:
293 | dependency: transitive
294 | description:
295 | name: path
296 | url: "https://pub.dartlang.org"
297 | source: hosted
298 | version: "1.8.0-nullsafety"
299 | path_provider:
300 | dependency: transitive
301 | description:
302 | name: path_provider
303 | url: "https://pub.dartlang.org"
304 | source: hosted
305 | version: "1.6.14"
306 | path_provider_linux:
307 | dependency: transitive
308 | description:
309 | name: path_provider_linux
310 | url: "https://pub.dartlang.org"
311 | source: hosted
312 | version: "0.0.1+2"
313 | path_provider_macos:
314 | dependency: transitive
315 | description:
316 | name: path_provider_macos
317 | url: "https://pub.dartlang.org"
318 | source: hosted
319 | version: "0.0.4+3"
320 | path_provider_platform_interface:
321 | dependency: transitive
322 | description:
323 | name: path_provider_platform_interface
324 | url: "https://pub.dartlang.org"
325 | source: hosted
326 | version: "1.0.3"
327 | pedantic:
328 | dependency: transitive
329 | description:
330 | name: pedantic
331 | url: "https://pub.dartlang.org"
332 | source: hosted
333 | version: "1.9.2"
334 | permission_handler:
335 | dependency: "direct main"
336 | description:
337 | name: permission_handler
338 | url: "https://pub.dartlang.org"
339 | source: hosted
340 | version: "5.0.1+1"
341 | permission_handler_platform_interface:
342 | dependency: transitive
343 | description:
344 | name: permission_handler_platform_interface
345 | url: "https://pub.dartlang.org"
346 | source: hosted
347 | version: "2.0.1"
348 | platform:
349 | dependency: transitive
350 | description:
351 | name: platform
352 | url: "https://pub.dartlang.org"
353 | source: hosted
354 | version: "2.2.1"
355 | platform_detect:
356 | dependency: transitive
357 | description:
358 | name: platform_detect
359 | url: "https://pub.dartlang.org"
360 | source: hosted
361 | version: "1.4.0"
362 | plugin_platform_interface:
363 | dependency: transitive
364 | description:
365 | name: plugin_platform_interface
366 | url: "https://pub.dartlang.org"
367 | source: hosted
368 | version: "1.0.2"
369 | process:
370 | dependency: transitive
371 | description:
372 | name: process
373 | url: "https://pub.dartlang.org"
374 | source: hosted
375 | version: "3.0.13"
376 | pub_semver:
377 | dependency: transitive
378 | description:
379 | name: pub_semver
380 | url: "https://pub.dartlang.org"
381 | source: hosted
382 | version: "1.4.4"
383 | quiver:
384 | dependency: transitive
385 | description:
386 | name: quiver
387 | url: "https://pub.dartlang.org"
388 | source: hosted
389 | version: "2.1.3"
390 | rxdart:
391 | dependency: transitive
392 | description:
393 | name: rxdart
394 | url: "https://pub.dartlang.org"
395 | source: hosted
396 | version: "0.24.1"
397 | save_in_gallery:
398 | dependency: "direct main"
399 | description:
400 | name: save_in_gallery
401 | url: "https://pub.dartlang.org"
402 | source: hosted
403 | version: "0.1.3"
404 | screenshot:
405 | dependency: "direct main"
406 | description:
407 | name: screenshot
408 | url: "https://pub.dartlang.org"
409 | source: hosted
410 | version: "0.2.0"
411 | shared_preferences:
412 | dependency: "direct main"
413 | description:
414 | name: shared_preferences
415 | url: "https://pub.dartlang.org"
416 | source: hosted
417 | version: "0.5.10"
418 | shared_preferences_linux:
419 | dependency: transitive
420 | description:
421 | name: shared_preferences_linux
422 | url: "https://pub.dartlang.org"
423 | source: hosted
424 | version: "0.0.2+2"
425 | shared_preferences_macos:
426 | dependency: transitive
427 | description:
428 | name: shared_preferences_macos
429 | url: "https://pub.dartlang.org"
430 | source: hosted
431 | version: "0.0.1+10"
432 | shared_preferences_platform_interface:
433 | dependency: transitive
434 | description:
435 | name: shared_preferences_platform_interface
436 | url: "https://pub.dartlang.org"
437 | source: hosted
438 | version: "1.0.4"
439 | shared_preferences_web:
440 | dependency: transitive
441 | description:
442 | name: shared_preferences_web
443 | url: "https://pub.dartlang.org"
444 | source: hosted
445 | version: "0.1.2+7"
446 | sky_engine:
447 | dependency: transitive
448 | description: flutter
449 | source: sdk
450 | version: "0.0.99"
451 | source_span:
452 | dependency: transitive
453 | description:
454 | name: source_span
455 | url: "https://pub.dartlang.org"
456 | source: hosted
457 | version: "1.8.0-nullsafety"
458 | sqflite:
459 | dependency: transitive
460 | description:
461 | name: sqflite
462 | url: "https://pub.dartlang.org"
463 | source: hosted
464 | version: "1.3.1+1"
465 | sqflite_common:
466 | dependency: transitive
467 | description:
468 | name: sqflite_common
469 | url: "https://pub.dartlang.org"
470 | source: hosted
471 | version: "1.0.2+1"
472 | stack_trace:
473 | dependency: transitive
474 | description:
475 | name: stack_trace
476 | url: "https://pub.dartlang.org"
477 | source: hosted
478 | version: "1.10.0-nullsafety"
479 | stream_channel:
480 | dependency: transitive
481 | description:
482 | name: stream_channel
483 | url: "https://pub.dartlang.org"
484 | source: hosted
485 | version: "2.1.0-nullsafety"
486 | string_scanner:
487 | dependency: transitive
488 | description:
489 | name: string_scanner
490 | url: "https://pub.dartlang.org"
491 | source: hosted
492 | version: "1.1.0-nullsafety"
493 | synchronized:
494 | dependency: transitive
495 | description:
496 | name: synchronized
497 | url: "https://pub.dartlang.org"
498 | source: hosted
499 | version: "2.2.0+2"
500 | term_glyph:
501 | dependency: transitive
502 | description:
503 | name: term_glyph
504 | url: "https://pub.dartlang.org"
505 | source: hosted
506 | version: "1.2.0-nullsafety"
507 | test_api:
508 | dependency: transitive
509 | description:
510 | name: test_api
511 | url: "https://pub.dartlang.org"
512 | source: hosted
513 | version: "0.2.19-nullsafety"
514 | typed_data:
515 | dependency: transitive
516 | description:
517 | name: typed_data
518 | url: "https://pub.dartlang.org"
519 | source: hosted
520 | version: "1.3.0-nullsafety.2"
521 | url_launcher:
522 | dependency: "direct main"
523 | description:
524 | name: url_launcher
525 | url: "https://pub.dartlang.org"
526 | source: hosted
527 | version: "5.5.3"
528 | url_launcher_linux:
529 | dependency: transitive
530 | description:
531 | name: url_launcher_linux
532 | url: "https://pub.dartlang.org"
533 | source: hosted
534 | version: "0.0.1+1"
535 | url_launcher_macos:
536 | dependency: transitive
537 | description:
538 | name: url_launcher_macos
539 | url: "https://pub.dartlang.org"
540 | source: hosted
541 | version: "0.0.1+7"
542 | url_launcher_platform_interface:
543 | dependency: transitive
544 | description:
545 | name: url_launcher_platform_interface
546 | url: "https://pub.dartlang.org"
547 | source: hosted
548 | version: "1.0.8"
549 | url_launcher_web:
550 | dependency: transitive
551 | description:
552 | name: url_launcher_web
553 | url: "https://pub.dartlang.org"
554 | source: hosted
555 | version: "0.1.3+2"
556 | uuid:
557 | dependency: transitive
558 | description:
559 | name: uuid
560 | url: "https://pub.dartlang.org"
561 | source: hosted
562 | version: "2.2.2"
563 | vector_math:
564 | dependency: transitive
565 | description:
566 | name: vector_math
567 | url: "https://pub.dartlang.org"
568 | source: hosted
569 | version: "2.1.0-nullsafety.2"
570 | xdg_directories:
571 | dependency: transitive
572 | description:
573 | name: xdg_directories
574 | url: "https://pub.dartlang.org"
575 | source: hosted
576 | version: "0.1.2"
577 | sdks:
578 | dart: ">=2.10.0-0.0.dev <2.10.0"
579 | flutter: ">=1.20.0 <2.0.0"
580 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: draw_it_app
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `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 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 | version: 1.0.0+2
19 |
20 | environment:
21 | sdk: ">=2.7.0 <3.0.0"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 |
27 | # The following adds the Cupertino Icons font to your application.
28 | # Use with the CupertinoIcons class for iOS style icons.
29 | cupertino_icons: ^0.1.3
30 | flutter_signature_pad: ^2.0.2
31 | screenshot: ^0.2.0
32 | firebase_storage: ^4.0.0
33 | font_awesome_flutter: ^8.8.1
34 | save_in_gallery: ^0.1.3
35 | shared_preferences: ^0.5.10
36 | flutter_web_browser: "^0.12.0"
37 | url_launcher: ^5.5.3
38 | firebase_auth: ^0.18.0+1
39 | firebase_core: ^0.5.0
40 | fluttertoast: ^7.1.1
41 | firebase_database: ^4.0.0
42 | cloud_firestore:
43 | esys_flutter_share: ^1.0.2
44 | ext_storage: ^1.0.3
45 | permission_handler: ^5.0.1+1
46 | cached_network_image:
47 | # google_sign_in: ^4.5.3
48 | # image_gallery_saver: ^1.5.0
49 | # simple_permissions: ^0.1.9
50 |
51 | dev_dependencies:
52 | flutter_test:
53 | sdk: flutter
54 |
55 | # For information on the generic Dart part of this file, see the
56 | # following page: https://dart.dev/tools/pub/pubspec
57 |
58 | # The following section is specific to Flutter.
59 | flutter:
60 | # The following line ensures that the Material Icons font is
61 | # included with your application, so that you can use the icons in
62 | # the material Icons class.
63 | uses-material-design: true
64 | # To add assets to your application, add an assets section, like this:
65 | assets:
66 | - assets/
67 | # - images/a_dot_ham.jpeg
68 | # An image asset can refer to one or more resolution-specific "variants", see
69 | # https://flutter.dev/assets-and-images/#resolution-aware.
70 | # For details regarding adding assets from package dependencies, see
71 | # https://flutter.dev/assets-and-images/#from-packages
72 | # To add custom fonts to your application, add a fonts section here,
73 | # in this "flutter" section. Each entry in this list should have a
74 | # "family" key with the font family name, and a "fonts" key with a
75 | # list giving the asset and other descriptors for the font. For
76 | # example:
77 | # fonts:
78 | # - family: Schyler
79 | # fonts:
80 | # - asset: fonts/Schyler-Regular.ttf
81 | # - asset: fonts/Schyler-Italic.ttf
82 | # style: italic
83 | # - family: Trajan Pro
84 | # fonts:
85 | # - asset: fonts/TrajanPro.ttf
86 | # - asset: fonts/TrajanPro_Bold.ttf
87 | # weight: 700
88 | #
89 | # For details regarding fonts from package dependencies,
90 | # see https://flutter.dev/custom-fonts/#from-packages
91 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harshkumarkhatri/Draw-It-App-Flutter/1a6db14096e3d64c10afb7bad8d502b09ea8e735/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | draw_it_app
18 |
19 |
20 |
21 |
24 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "draw_it_app",
3 | "short_name": "draw_it_app",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------