├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutter_todo │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ └── splash.png │ │ │ ├── drawable-mdpi │ │ │ └── splash.png │ │ │ ├── drawable-night-v21 │ │ │ ├── background.png │ │ │ └── launch_background.xml │ │ │ ├── drawable-night │ │ │ ├── background.png │ │ │ └── launch_background.xml │ │ │ ├── drawable-v21 │ │ │ ├── background.png │ │ │ └── launch_background.xml │ │ │ ├── drawable-xhdpi │ │ │ └── splash.png │ │ │ ├── drawable-xxhdpi │ │ │ └── splash.png │ │ │ ├── drawable-xxxhdpi │ │ │ └── splash.png │ │ │ ├── drawable │ │ │ ├── background.png │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night-v31 │ │ │ └── styles.xml │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ ├── values-v31 │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── Avatar.jpg └── Todo.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ ├── BrandingImage.imageset │ │ └── Contents.json │ ├── LaunchBackground.imageset │ │ ├── Contents.json │ │ ├── background.png │ │ └── darkbackground.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── Animation │ ├── fadeAnimation.dart │ └── linearprogress.dart ├── data │ ├── advice.dart │ ├── shared │ │ └── Task_saved.dart │ ├── tasks.dart │ ├── thems.dart │ └── time_say.dart ├── db │ ├── boxes.dart │ ├── noted.dart │ └── noted.g.dart ├── main.dart └── pages │ ├── Avatar_progerss.dart │ ├── Drawerhiden │ ├── Drawer_items.dart │ ├── Drawer_widget.dart │ └── hidendrawer.dart │ ├── button_change_them.dart │ ├── card_tasks.dart │ ├── chart.dart │ ├── homepage.dart │ ├── note_form.dart │ └── note_task.dart ├── pubspec.lock ├── pubspec.yaml ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html ├── manifest.json └── splash │ ├── img │ ├── dark-1x.png │ ├── dark-2x.png │ ├── dark-3x.png │ ├── dark-4x.png │ ├── light-1x.png │ ├── light-2x.png │ ├── light-3x.png │ └── light-4x.png │ ├── splash.js │ └── style.css └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /README.md: -------------------------------------------------------------------------------- 1 | ![TODO](https://is2-ssl.mzstatic.com/image/thumb/Purple115/v4/27/c6/9f/27c69ffe-aedf-dc60-f696-b1228c372f60/TodoAppIcon-0-1x_U007emarketing-7-0-85-220.png/1200x630wa.png) 2 | [![GitHub stars](https://img.shields.io/github/stars/iampawan/FlutterExampleApps.svg?style=social&label=Star)](https://github.com/amirziyacode) 3 | [![GitHub forks](https://img.shields.io/github/forks/iampawan/FlutterExampleApps.svg?style=social&label=Fork)](https://github.com/amirziyacode?tab=repositories) 4 | 5 | # Todo_App 6 | 7 | App Design ✏ : [TODO](https://dribbble.com/shots/14100356-ToDo-App-UI) 8 | 9 | Todo : 10 | - Sqlite Database 11 | - Animation 12 | - DarkMode 🌙 13 | - Shared Preferences 14 | - Making a task for everyday ♥ 15 | - And a lot thing ... 16 | - ....... . ... .. . . . . . .. . .. . . . . . .. . 17 | 18 | I hope you can use it in your daily work 😅 19 | 20 | Rate me ⭐ 21 | 22 | Thank you ☺ 23 | 24 | ## Platform 25 | 26 | Android ✔️ 27 | 28 | Ios ✔️ 29 | 30 | 31 | ### ✌ Preview 32 | 33 | | DarkMode | LightMode | 34 | | :----------------------------------: | :----------------------------------: | 35 | | ![d](https://s6.uupload.ir/files/dark_eeko.gif) | ![w](https://s6.uupload.ir/files/white_nl38.gif) | 36 | 37 | 38 | ## Development Setup 39 | Clone the repository and run the following commands: 40 | ``` 41 | flutter pub get 42 | flutter run 43 | ``` 44 | 45 | ## Getting Started 46 | 47 | This project is a starting point for a Flutter application. 48 | 49 | A few resources to get you started if this is your first Flutter project: 50 | 51 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 52 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 53 | 54 | For help getting started with Flutter, view our 55 | [online documentation](https://flutter.dev/docs), which offers tutorials, 56 | samples, guidance on mobile development, and a full API reference. 57 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.flutter_todo" 47 | minSdkVersion 16 48 | targetSdkVersion 30 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_todo/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_todo 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-night-v21/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-night/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-night/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-v21/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable-xxxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 17 | 20 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-v31/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 17 | 20 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #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-7.4-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 | -------------------------------------------------------------------------------- /assets/Avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/assets/Avatar.jpg -------------------------------------------------------------------------------- /assets/Todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/assets/Todo.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_native_splash (0.0.1): 4 | - Flutter 5 | - FMDB (2.7.5): 6 | - FMDB/standard (= 2.7.5) 7 | - FMDB/standard (2.7.5) 8 | - path_provider_ios (0.0.1): 9 | - Flutter 10 | - shared_preferences_ios (0.0.1): 11 | - Flutter 12 | - sqflite (0.0.2): 13 | - Flutter 14 | - FMDB (>= 2.7.5) 15 | 16 | DEPENDENCIES: 17 | - Flutter (from `Flutter`) 18 | - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) 19 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) 20 | - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) 21 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 22 | 23 | SPEC REPOS: 24 | trunk: 25 | - FMDB 26 | 27 | EXTERNAL SOURCES: 28 | Flutter: 29 | :path: Flutter 30 | flutter_native_splash: 31 | :path: ".symlinks/plugins/flutter_native_splash/ios" 32 | path_provider_ios: 33 | :path: ".symlinks/plugins/path_provider_ios/ios" 34 | shared_preferences_ios: 35 | :path: ".symlinks/plugins/shared_preferences_ios/ios" 36 | sqflite: 37 | :path: ".symlinks/plugins/sqflite/ios" 38 | 39 | SPEC CHECKSUMS: 40 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 41 | flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef 42 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 43 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 44 | shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad 45 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 46 | 47 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 48 | 49 | COCOAPODS: 1.11.2 50 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | EEA5E53D9B312B42E4A3FAE8 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D84C4C72CAB53AD0F4B932C /* Pods_Runner.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 2D84C4C72CAB53AD0F4B932C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 3185B2D7C58901ED155AD6D5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 4C6FB84E54C8C75E55B8B029 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 39 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 40 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 41 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 9ECF89BE1ACDE7A23BA70091 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | EEA5E53D9B312B42E4A3FAE8 /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 6722988C797B393D133F5FE9 /* Pods */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 3185B2D7C58901ED155AD6D5 /* Pods-Runner.debug.xcconfig */, 68 | 9ECF89BE1ACDE7A23BA70091 /* Pods-Runner.release.xcconfig */, 69 | 4C6FB84E54C8C75E55B8B029 /* Pods-Runner.profile.xcconfig */, 70 | ); 71 | name = Pods; 72 | path = Pods; 73 | sourceTree = ""; 74 | }; 75 | 9740EEB11CF90186004384FC /* Flutter */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 79 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 80 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 81 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 82 | ); 83 | name = Flutter; 84 | sourceTree = ""; 85 | }; 86 | 97C146E51CF9000F007C117D = { 87 | isa = PBXGroup; 88 | children = ( 89 | 9740EEB11CF90186004384FC /* Flutter */, 90 | 97C146F01CF9000F007C117D /* Runner */, 91 | 97C146EF1CF9000F007C117D /* Products */, 92 | 6722988C797B393D133F5FE9 /* Pods */, 93 | A717916D3AC7DEE223AFD7E4 /* Frameworks */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | 97C146EF1CF9000F007C117D /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 97C146EE1CF9000F007C117D /* Runner.app */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 97C146F01CF9000F007C117D /* Runner */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 109 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 110 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 111 | 97C147021CF9000F007C117D /* Info.plist */, 112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 114 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 115 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 116 | ); 117 | path = Runner; 118 | sourceTree = ""; 119 | }; 120 | A717916D3AC7DEE223AFD7E4 /* Frameworks */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 2D84C4C72CAB53AD0F4B932C /* Pods_Runner.framework */, 124 | ); 125 | name = Frameworks; 126 | sourceTree = ""; 127 | }; 128 | /* End PBXGroup section */ 129 | 130 | /* Begin PBXNativeTarget section */ 131 | 97C146ED1CF9000F007C117D /* Runner */ = { 132 | isa = PBXNativeTarget; 133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 134 | buildPhases = ( 135 | C21FC5EECAFBEA407723C8ED /* [CP] Check Pods Manifest.lock */, 136 | 9740EEB61CF901F6004384FC /* Run Script */, 137 | 97C146EA1CF9000F007C117D /* Sources */, 138 | 97C146EB1CF9000F007C117D /* Frameworks */, 139 | 97C146EC1CF9000F007C117D /* Resources */, 140 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 142 | 8FDF590F9D837911F6CCF72D /* [CP] Embed Pods Frameworks */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 1300; 160 | ORGANIZATIONNAME = ""; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | LastSwiftMigration = 1100; 165 | }; 166 | }; 167 | }; 168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 169 | compatibilityVersion = "Xcode 9.3"; 170 | developmentRegion = en; 171 | hasScannedForEncodings = 0; 172 | knownRegions = ( 173 | en, 174 | Base, 175 | ); 176 | mainGroup = 97C146E51CF9000F007C117D; 177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | 97C146ED1CF9000F007C117D /* Runner */, 182 | ); 183 | }; 184 | /* End PBXProject section */ 185 | 186 | /* Begin PBXResourcesBuildPhase section */ 187 | 97C146EC1CF9000F007C117D /* Resources */ = { 188 | isa = PBXResourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXResourcesBuildPhase section */ 199 | 200 | /* Begin PBXShellScriptBuildPhase section */ 201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | inputPaths = ( 207 | ); 208 | name = "Thin Binary"; 209 | outputPaths = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | shellPath = /bin/sh; 213 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 214 | }; 215 | 8FDF590F9D837911F6CCF72D /* [CP] Embed Pods Frameworks */ = { 216 | isa = PBXShellScriptBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | inputFileListPaths = ( 221 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 222 | ); 223 | name = "[CP] Embed Pods Frameworks"; 224 | outputFileListPaths = ( 225 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 230 | showEnvVarsInLog = 0; 231 | }; 232 | 9740EEB61CF901F6004384FC /* Run Script */ = { 233 | isa = PBXShellScriptBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | ); 237 | inputPaths = ( 238 | ); 239 | name = "Run Script"; 240 | outputPaths = ( 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | shellPath = /bin/sh; 244 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 245 | }; 246 | C21FC5EECAFBEA407723C8ED /* [CP] Check Pods Manifest.lock */ = { 247 | isa = PBXShellScriptBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | inputFileListPaths = ( 252 | ); 253 | inputPaths = ( 254 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 255 | "${PODS_ROOT}/Manifest.lock", 256 | ); 257 | name = "[CP] Check Pods Manifest.lock"; 258 | outputFileListPaths = ( 259 | ); 260 | outputPaths = ( 261 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | shellPath = /bin/sh; 265 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 266 | showEnvVarsInLog = 0; 267 | }; 268 | /* End PBXShellScriptBuildPhase section */ 269 | 270 | /* Begin PBXSourcesBuildPhase section */ 271 | 97C146EA1CF9000F007C117D /* Sources */ = { 272 | isa = PBXSourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 276 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | /* End PBXSourcesBuildPhase section */ 281 | 282 | /* Begin PBXVariantGroup section */ 283 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 284 | isa = PBXVariantGroup; 285 | children = ( 286 | 97C146FB1CF9000F007C117D /* Base */, 287 | ); 288 | name = Main.storyboard; 289 | sourceTree = ""; 290 | }; 291 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 292 | isa = PBXVariantGroup; 293 | children = ( 294 | 97C147001CF9000F007C117D /* Base */, 295 | ); 296 | name = LaunchScreen.storyboard; 297 | sourceTree = ""; 298 | }; 299 | /* End PBXVariantGroup section */ 300 | 301 | /* Begin XCBuildConfiguration section */ 302 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 333 | ENABLE_NS_ASSERTIONS = NO; 334 | ENABLE_STRICT_OBJC_MSGSEND = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_NO_COMMON_BLOCKS = YES; 337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 339 | GCC_WARN_UNDECLARED_SELECTOR = YES; 340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 341 | GCC_WARN_UNUSED_FUNCTION = YES; 342 | GCC_WARN_UNUSED_VARIABLE = YES; 343 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 344 | MTL_ENABLE_DEBUG_INFO = NO; 345 | SDKROOT = iphoneos; 346 | SUPPORTED_PLATFORMS = iphoneos; 347 | TARGETED_DEVICE_FAMILY = "1,2"; 348 | VALIDATE_PRODUCT = YES; 349 | }; 350 | name = Profile; 351 | }; 352 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 353 | isa = XCBuildConfiguration; 354 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 355 | buildSettings = { 356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 357 | CLANG_ENABLE_MODULES = YES; 358 | CODE_SIGN_IDENTITY = "iPhone Distribution"; 359 | CODE_SIGN_STYLE = Manual; 360 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 361 | DEVELOPMENT_TEAM = S9P5T9346J; 362 | ENABLE_BITCODE = NO; 363 | INFOPLIST_FILE = Runner/Info.plist; 364 | LD_RUNPATH_SEARCH_PATHS = ( 365 | "$(inherited)", 366 | "@executable_path/Frameworks", 367 | ); 368 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTodo; 369 | PRODUCT_NAME = "$(TARGET_NAME)"; 370 | PROVISIONING_PROFILE_SPECIFIER = "Export Profile"; 371 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 372 | SWIFT_VERSION = 5.0; 373 | VERSIONING_SYSTEM = "apple-generic"; 374 | }; 375 | name = Profile; 376 | }; 377 | 97C147031CF9000F007C117D /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_ANALYZER_NONNULL = YES; 382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 383 | CLANG_CXX_LIBRARY = "libc++"; 384 | CLANG_ENABLE_MODULES = YES; 385 | CLANG_ENABLE_OBJC_ARC = YES; 386 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_COMMA = YES; 389 | CLANG_WARN_CONSTANT_CONVERSION = YES; 390 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 392 | CLANG_WARN_EMPTY_BODY = YES; 393 | CLANG_WARN_ENUM_CONVERSION = YES; 394 | CLANG_WARN_INFINITE_RECURSION = YES; 395 | CLANG_WARN_INT_CONVERSION = YES; 396 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 397 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 398 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 399 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 400 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 401 | CLANG_WARN_STRICT_PROTOTYPES = YES; 402 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 403 | CLANG_WARN_UNREACHABLE_CODE = YES; 404 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 405 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 406 | COPY_PHASE_STRIP = NO; 407 | DEBUG_INFORMATION_FORMAT = dwarf; 408 | ENABLE_STRICT_OBJC_MSGSEND = YES; 409 | ENABLE_TESTABILITY = YES; 410 | GCC_C_LANGUAGE_STANDARD = gnu99; 411 | GCC_DYNAMIC_NO_PIC = NO; 412 | GCC_NO_COMMON_BLOCKS = YES; 413 | GCC_OPTIMIZATION_LEVEL = 0; 414 | GCC_PREPROCESSOR_DEFINITIONS = ( 415 | "DEBUG=1", 416 | "$(inherited)", 417 | ); 418 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 419 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 420 | GCC_WARN_UNDECLARED_SELECTOR = YES; 421 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 422 | GCC_WARN_UNUSED_FUNCTION = YES; 423 | GCC_WARN_UNUSED_VARIABLE = YES; 424 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 425 | MTL_ENABLE_DEBUG_INFO = YES; 426 | ONLY_ACTIVE_ARCH = YES; 427 | SDKROOT = iphoneos; 428 | TARGETED_DEVICE_FAMILY = "1,2"; 429 | }; 430 | name = Debug; 431 | }; 432 | 97C147041CF9000F007C117D /* Release */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | CLANG_ANALYZER_NONNULL = YES; 437 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 438 | CLANG_CXX_LIBRARY = "libc++"; 439 | CLANG_ENABLE_MODULES = YES; 440 | CLANG_ENABLE_OBJC_ARC = YES; 441 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 442 | CLANG_WARN_BOOL_CONVERSION = YES; 443 | CLANG_WARN_COMMA = YES; 444 | CLANG_WARN_CONSTANT_CONVERSION = YES; 445 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 446 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 447 | CLANG_WARN_EMPTY_BODY = YES; 448 | CLANG_WARN_ENUM_CONVERSION = YES; 449 | CLANG_WARN_INFINITE_RECURSION = YES; 450 | CLANG_WARN_INT_CONVERSION = YES; 451 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 452 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 453 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 454 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 455 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 456 | CLANG_WARN_STRICT_PROTOTYPES = YES; 457 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 458 | CLANG_WARN_UNREACHABLE_CODE = YES; 459 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 460 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 461 | COPY_PHASE_STRIP = NO; 462 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 463 | ENABLE_NS_ASSERTIONS = NO; 464 | ENABLE_STRICT_OBJC_MSGSEND = YES; 465 | GCC_C_LANGUAGE_STANDARD = gnu99; 466 | GCC_NO_COMMON_BLOCKS = YES; 467 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 468 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 469 | GCC_WARN_UNDECLARED_SELECTOR = YES; 470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 471 | GCC_WARN_UNUSED_FUNCTION = YES; 472 | GCC_WARN_UNUSED_VARIABLE = YES; 473 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 474 | MTL_ENABLE_DEBUG_INFO = NO; 475 | SDKROOT = iphoneos; 476 | SUPPORTED_PLATFORMS = iphoneos; 477 | SWIFT_COMPILATION_MODE = wholemodule; 478 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 479 | TARGETED_DEVICE_FAMILY = "1,2"; 480 | VALIDATE_PRODUCT = YES; 481 | }; 482 | name = Release; 483 | }; 484 | 97C147061CF9000F007C117D /* Debug */ = { 485 | isa = XCBuildConfiguration; 486 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 487 | buildSettings = { 488 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 489 | CLANG_ENABLE_MODULES = YES; 490 | CODE_SIGN_IDENTITY = "iPhone Distribution"; 491 | CODE_SIGN_STYLE = Manual; 492 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 493 | DEVELOPMENT_TEAM = S9P5T9346J; 494 | ENABLE_BITCODE = NO; 495 | INFOPLIST_FILE = Runner/Info.plist; 496 | LD_RUNPATH_SEARCH_PATHS = ( 497 | "$(inherited)", 498 | "@executable_path/Frameworks", 499 | ); 500 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTodo; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | PROVISIONING_PROFILE_SPECIFIER = "Export Profile"; 503 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 504 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 505 | SWIFT_VERSION = 5.0; 506 | VERSIONING_SYSTEM = "apple-generic"; 507 | }; 508 | name = Debug; 509 | }; 510 | 97C147071CF9000F007C117D /* Release */ = { 511 | isa = XCBuildConfiguration; 512 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 513 | buildSettings = { 514 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 515 | CLANG_ENABLE_MODULES = YES; 516 | CODE_SIGN_IDENTITY = "iPhone Distribution"; 517 | CODE_SIGN_STYLE = Manual; 518 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 519 | DEVELOPMENT_TEAM = S9P5T9346J; 520 | ENABLE_BITCODE = NO; 521 | INFOPLIST_FILE = Runner/Info.plist; 522 | LD_RUNPATH_SEARCH_PATHS = ( 523 | "$(inherited)", 524 | "@executable_path/Frameworks", 525 | ); 526 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterTodo; 527 | PRODUCT_NAME = "$(TARGET_NAME)"; 528 | PROVISIONING_PROFILE_SPECIFIER = "Export Profile"; 529 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 530 | SWIFT_VERSION = 5.0; 531 | VERSIONING_SYSTEM = "apple-generic"; 532 | }; 533 | name = Release; 534 | }; 535 | /* End XCBuildConfiguration section */ 536 | 537 | /* Begin XCConfigurationList section */ 538 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 539 | isa = XCConfigurationList; 540 | buildConfigurations = ( 541 | 97C147031CF9000F007C117D /* Debug */, 542 | 97C147041CF9000F007C117D /* Release */, 543 | 249021D3217E4FDB00AE95B9 /* Profile */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | defaultConfigurationName = Release; 547 | }; 548 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | 97C147061CF9000F007C117D /* Debug */, 552 | 97C147071CF9000F007C117D /* Release */, 553 | 249021D4217E4FDB00AE95B9 /* Profile */, 554 | ); 555 | defaultConfigurationIsVisible = 0; 556 | defaultConfigurationName = Release; 557 | }; 558 | /* End XCConfigurationList section */ 559 | }; 560 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 561 | } 562 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/BrandingImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "BrandingImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "BrandingImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "BrandingImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "filename" : "darkbackground.png", 16 | "idiom" : "universal", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "appearances" : [ 25 | { 26 | "appearance" : "luminosity", 27 | "value" : "dark" 28 | } 29 | ], 30 | "idiom" : "universal", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "universal", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "appearances" : [ 39 | { 40 | "appearance" : "luminosity", 41 | "value" : "dark" 42 | } 43 | ], 44 | "idiom" : "universal", 45 | "scale" : "3x" 46 | } 47 | ], 48 | "info" : { 49 | "author" : "xcode", 50 | "version" : 1 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Todo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_todo 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | UIStatusBarHidden 47 | 48 | 49 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/Animation/fadeAnimation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:simple_animations/simple_animations.dart'; 3 | import 'package:supercharged/supercharged.dart'; 4 | 5 | enum AniProps { opacity, translateY } 6 | 7 | class FadeAnimation extends StatelessWidget { 8 | final double delay; 9 | final Widget child; 10 | 11 | FadeAnimation({required this.delay, required this.child}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | final tween = MultiTween() 16 | ..add(AniProps.opacity, 0.0.tweenTo(1.0), 500.milliseconds) 17 | ..add(AniProps.translateY, (-30.0).tweenTo(0.0), 500.milliseconds, 18 | Curves.easeOut); 19 | 20 | 21 | return PlayAnimation>( 22 | delay: Duration(milliseconds: (500 * delay).round()), 23 | duration: tween.duration, 24 | tween: tween, 25 | child: child, 26 | builder: (context, child, value) => Opacity( 27 | opacity: value.get(AniProps.opacity), 28 | child: Transform.translate( 29 | offset: Offset(0, value.get(AniProps.translateY)), child: child), 30 | ), 31 | ); 32 | } 33 | } -------------------------------------------------------------------------------- /lib/Animation/linearprogress.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LineProgress extends StatefulWidget { 4 | LineProgress({Key? key, required this.Color,required this.value}) : super(key: key); 5 | final Color; 6 | double value; 7 | @override 8 | State createState() => _LineProgressState(); 9 | } 10 | 11 | class _LineProgressState extends State 12 | with SingleTickerProviderStateMixin { 13 | late Animation _animation; 14 | late AnimationController _controller; 15 | @override 16 | void initState() { 17 | // TODO: implemnt controller and animation .. 18 | _controller = AnimationController( 19 | vsync: this, duration: const Duration(milliseconds: 200)); 20 | _animation = Tween(begin: 0.0, end: 0.01).animate(_controller) 21 | ..addListener(() { 22 | setState(() {}); 23 | }); 24 | _controller.forward(); 25 | super.initState(); 26 | } 27 | 28 | @override 29 | void dispose() { 30 | // TODO: implement dispose 31 | _controller.dispose(); 32 | super.dispose(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return LinearProgressIndicator( 38 | value: _animation.value + widget.value.toDouble() /10, 39 | valueColor: 40 | AlwaysStoppedAnimation(widget.Color), 41 | backgroundColor: Colors.purple[100], 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/data/advice.dart: -------------------------------------------------------------------------------- 1 | class Advices { 2 | String name; 3 | String description; 4 | 5 | Advices({required this.name, required this.description}); 6 | } 7 | 8 | List advices = [ 9 | Advices( 10 | name: 'René Descartes', 11 | description: 12 | "It is only intelligence that is divided equally between people because everybody thinks he/she is enough wise"), 13 | Advices( 14 | name: "Dr. Ali Shariati", 15 | description: 16 | "My father chose my name ,\n and my last name was \n chosen by my ancestors \n That’s enough,\n I myself choose my way"), 17 | Advices( 18 | name: "Ali Shariati", 19 | description: 20 | "I am surprised by the people who they themselves live under the lash of injusticeand cry for “Husayn” who lived free"), 21 | Advices( 22 | name: "Great Orod", 23 | description: 24 | "The country which forgets its own legendstries to satisfy itself by other countries’ \nlegendsChildren of such a dynasty are open and vulnerable"), 25 | Advices( 26 | name: "Howard Baskerville", 27 | description: 28 | "The only difference between me and these people is my place of birth and this is not a big difference"), 29 | ]; 30 | -------------------------------------------------------------------------------- /lib/data/shared/Task_saved.dart: -------------------------------------------------------------------------------- 1 | import 'package:shared_preferences/shared_preferences.dart'; 2 | 3 | class TaskerPreference { 4 | static SharedPreferences? _preferences; 5 | 6 | static const _IsSelect = "all_selected_tasks"; 7 | 8 | static Future init() async => 9 | _preferences = await SharedPreferences.getInstance(); 10 | 11 | static Future setStringList(List allSelectedTasks) async => 12 | await _preferences?.setStringList(_IsSelect, allSelectedTasks); 13 | 14 | static List? getString() =>_preferences?.getStringList(_IsSelect); 15 | } 16 | -------------------------------------------------------------------------------- /lib/data/tasks.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Task { 4 | String tasknumber; 5 | String title; 6 | Color progresscolor; 7 | double value; 8 | 9 | Task( 10 | {required this.tasknumber, 11 | required this.title, 12 | required this.progresscolor, 13 | required this.value}); 14 | } 15 | 16 | List tasklist = [ 17 | Task( 18 | tasknumber: "40 tasks", 19 | title: "Business", 20 | progresscolor: const Color(0xFFAC05FF), 21 | value: 0.5), 22 | Task( 23 | tasknumber: "16 tasks", 24 | title: "Personal", 25 | progresscolor: Colors.blue, 26 | value: 0.1), 27 | Task( 28 | tasknumber: "10 tasks", 29 | title: "Programming", 30 | progresscolor: Colors.green, 31 | value: 0.1), 32 | Task( 33 | tasknumber: "2 tasks", 34 | title: "Sports", 35 | progresscolor: Colors.red, 36 | value: 0.1), 37 | Task( 38 | tasknumber: "30 tasks", 39 | title: "Family", 40 | progresscolor: Colors.orange, 41 | value: 0.8), 42 | ]; 43 | -------------------------------------------------------------------------------- /lib/data/thems.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ThemProvider extends ChangeNotifier { 4 | ThemeMode themeMode = ThemeMode.system; 5 | bool get isDarkMode => themeMode == ThemeMode.light; 6 | 7 | void toggleThem(bool isOne) { 8 | themeMode = isOne ? ThemeMode.dark : ThemeMode.light; 9 | notifyListeners(); 10 | } 11 | } 12 | 13 | class Mytheme { 14 | static final darkthem = ThemeData( 15 | scaffoldBackgroundColor: const Color(0xff3450A1), 16 | appBarTheme: const AppBarTheme(backgroundColor: Color(0xff3450A1)), 17 | primaryColor: Colors.white, 18 | cardColor: const Color(0xff0A155A), 19 | floatingActionButtonTheme: const FloatingActionButtonThemeData( 20 | backgroundColor: Color(0xFFFF00FF))); 21 | 22 | static final lightthem = ThemeData( 23 | scaffoldBackgroundColor: const Color(0xffF4F6FD), 24 | primaryColor: Colors.black, 25 | floatingActionButtonTheme: const FloatingActionButtonThemeData( 26 | backgroundColor: Color(0xFF002FFF)), 27 | appBarTheme: const AppBarTheme(backgroundColor: Color(0xffF4F6FD)), 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /lib/data/time_say.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | class Timecall extends StatelessWidget { 5 | String text = ""; 6 | int nowtime = DateTime.now().hour; 7 | String time_call() { 8 | if (nowtime <= 11) { 9 | text = "Good Morning ☀️"; 10 | } 11 | if (nowtime > 11) { 12 | text = "Good Afternoon 🌞"; 13 | } if (nowtime >= 16){ 14 | text = "Good Evening 🌆"; 15 | } if (nowtime >= 18) { 16 | text = "Good Night 🌙"; 17 | } 18 | 19 | return text; 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Container( 25 | child: Text( 26 | time_call(), 27 | style: GoogleFonts.lato( 28 | color: Theme.of(context).primaryColor, 29 | fontWeight: FontWeight.bold, 30 | fontSize: 27, 31 | ), 32 | )); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/db/boxes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_todo/db/noted.dart'; 2 | import 'package:hive_flutter/adapters.dart'; 3 | 4 | class Boxes { 5 | static Box getNote() => Hive.box('notes'); 6 | } 7 | -------------------------------------------------------------------------------- /lib/db/noted.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive/hive.dart'; 2 | part 'noted.g.dart'; 3 | 4 | @HiveType(typeId: 1) 5 | class Notes extends HiveObject { 6 | Notes({ 7 | required this.title, 8 | required this.description, 9 | }); 10 | 11 | @HiveField(0) 12 | String title; 13 | 14 | @HiveField(1) 15 | String description; 16 | } 17 | -------------------------------------------------------------------------------- /lib/db/noted.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'noted.dart'; 4 | 5 | // ************************************************************************** 6 | // TypeAdapterGenerator 7 | // ************************************************************************** 8 | 9 | class NotesAdapter extends TypeAdapter { 10 | @override 11 | final int typeId = 1; 12 | 13 | @override 14 | Notes read(BinaryReader reader) { 15 | final numOfFields = reader.readByte(); 16 | final fields = { 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), 18 | }; 19 | return Notes( 20 | title: fields[0] as String, 21 | description: fields[1] as String, 22 | ); 23 | } 24 | 25 | @override 26 | void write(BinaryWriter writer, Notes obj) { 27 | writer 28 | ..writeByte(2) 29 | ..writeByte(0) 30 | ..write(obj.title) 31 | ..writeByte(1) 32 | ..write(obj.description); 33 | } 34 | 35 | @override 36 | int get hashCode => typeId.hashCode; 37 | 38 | @override 39 | bool operator ==(Object other) => 40 | identical(this, other) || 41 | other is NotesAdapter && 42 | runtimeType == other.runtimeType && 43 | typeId == other.typeId; 44 | } 45 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_todo/pages/Drawerhiden/hidendrawer.dart'; 3 | import 'package:flutter_todo/db/noted.dart'; 4 | import 'package:hive_flutter/hive_flutter.dart'; 5 | import 'package:provider/provider.dart'; 6 | import 'data/shared/Task_saved.dart'; 7 | import 'data/thems.dart'; 8 | 9 | late Box box; 10 | 11 | Future main() async { 12 | WidgetsFlutterBinding.ensureInitialized(); 13 | await Hive.initFlutter(); 14 | Hive.registerAdapter(NotesAdapter()); 15 | box = await Hive.openBox("notes"); 16 | await TaskerPreference.init(); // for initial SharedPerfomance .. 17 | runApp(MyApp()); 18 | } 19 | 20 | class MyApp extends StatelessWidget { 21 | // This widget is the root of your application. 22 | @override 23 | Widget build(BuildContext context) => ChangeNotifierProvider( 24 | create: (context) => ThemProvider(), 25 | builder: (context, _) { 26 | final themProvider = Provider.of(context); 27 | return MaterialApp( 28 | title: 'Flutter Demo', 29 | debugShowCheckedModeBanner: false, 30 | themeMode: themProvider.themeMode, 31 | darkTheme: Mytheme.darkthem, 32 | theme: Mytheme.lightthem, 33 | home: HidenDrawer( 34 | animationtime: 0.8, 35 | ), 36 | ); 37 | }); 38 | } 39 | -------------------------------------------------------------------------------- /lib/pages/Avatar_progerss.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Progerss_Avater extends StatefulWidget { 4 | @override 5 | State createState() => _Progerss_AvaterState(); 6 | } 7 | 8 | class _Progerss_AvaterState extends State 9 | with SingleTickerProviderStateMixin { 10 | Animation? _animation; 11 | AnimationController? _controller; 12 | 13 | @override 14 | void initState() { 15 | // TODO: implement initState auto play animation 16 | _controller = 17 | AnimationController(vsync: this, duration: const Duration(seconds: 1)); 18 | _animation = Tween(begin: 0.0, end: 0.4).animate(_controller!) 19 | ..addListener(() { 20 | setState(() {}); 21 | }); 22 | 23 | _controller!.forward(); 24 | 25 | super.initState(); 26 | } 27 | 28 | @override 29 | void dispose() { 30 | // TODO: implement dispose 31 | _controller!.reverse(); 32 | super.dispose(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Container( 38 | margin: const EdgeInsets.only(right: 210), 39 | width: 110, 40 | height: 110, 41 | child: Stack( 42 | fit: StackFit.expand, 43 | children: [ 44 | CircularProgressIndicator( 45 | value: _animation!.value, 46 | strokeWidth: 4, 47 | valueColor: const AlwaysStoppedAnimation(Color(0xFFFF00FF)), 48 | backgroundColor: Colors.grey.withOpacity(0.2), 49 | ), 50 | const Center( 51 | child: CircleAvatar( 52 | radius: 45.0, 53 | backgroundImage: AssetImage("assets/Avatar.jpg"))), 54 | ], 55 | ), 56 | ); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /lib/pages/Drawerhiden/Drawer_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class DrawerItem { 5 | String title; 6 | IconData icon; 7 | 8 | DrawerItem({required this.title, required this.icon}); 9 | } 10 | 11 | class DrawerItems { 12 | static final categorise = 13 | DrawerItem(title: "Categorise", icon: Icons.grid_view_outlined); 14 | static final analytics = 15 | DrawerItem(title: "Analytics", icon: FontAwesomeIcons.chartPie); 16 | static final about = 17 | DrawerItem(title: "About", icon: Icons.person_outlined); 18 | 19 | static final List all = [categorise, analytics,about]; 20 | } 21 | -------------------------------------------------------------------------------- /lib/pages/Drawerhiden/Drawer_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | import '../Avatar_progerss.dart'; 4 | import '../chart.dart'; 5 | import 'drawer_items.dart'; 6 | 7 | class DrawerWidget extends StatefulWidget { 8 | VoidCallback closdDrawer; 9 | DrawerWidget({required this.closdDrawer}); 10 | 11 | @override 12 | State createState() => _DrawerWidgetState(); 13 | } 14 | 15 | class _DrawerWidgetState extends State 16 | with SingleTickerProviderStateMixin { 17 | final double runanim = 0.4; 18 | @override 19 | Widget build(BuildContext context) { 20 | var we = MediaQuery.of(context).size.width; 21 | var he = MediaQuery.of(context).size.height; 22 | 23 | return SingleChildScrollView( 24 | child: Column( 25 | children: [ 26 | _buildButton(context), 27 | Progerss_Avater(), 28 | SizedBox( 29 | height: he * 0.02, 30 | ), 31 | _buidText(context), 32 | SizedBox( 33 | height: he * 0.02, 34 | ), 35 | buildDrawerItem(context), 36 | SizedBox( 37 | height: he * 0.02, 38 | ), 39 | Chart() 40 | ], 41 | )); 42 | } 43 | 44 | Widget buildDrawerItem(BuildContext context) => Padding( 45 | padding: const EdgeInsets.all(20.0), 46 | child: Column( 47 | children: DrawerItems.all 48 | .map((item) => ListTile( 49 | contentPadding: 50 | const EdgeInsets.symmetric(horizontal: 20, vertical: 1), 51 | leading: Icon( 52 | item.icon, 53 | color: Colors.white.withOpacity(0.2), 54 | ), 55 | title: Text( 56 | item.title, 57 | style: const TextStyle(color: Colors.white), 58 | ), 59 | onTap: () {}, 60 | )) 61 | .toList(), 62 | ), 63 | ); 64 | Widget _buildButton(contex) { 65 | var we = MediaQuery.of(context).size.width; 66 | var he = MediaQuery.of(context).size.height; 67 | 68 | return Container( 69 | margin: EdgeInsets.only(top: he * 0.09, left: we * 0.15), 70 | width: 50, 71 | height: 50, 72 | alignment: Alignment.center, 73 | decoration: 74 | const BoxDecoration(color: Colors.grey, shape: BoxShape.circle), 75 | child: Container( 76 | width: 47, 77 | height: 47, 78 | alignment: Alignment.center, 79 | decoration: const BoxDecoration( 80 | shape: BoxShape.circle, 81 | color: Color(0xFF04123F), 82 | ), 83 | child: IconButton( 84 | onPressed: widget.closdDrawer, 85 | icon: const Icon( 86 | Icons.arrow_back_ios_outlined, 87 | color: Colors.white, 88 | size: 20, 89 | ))), 90 | ); 91 | } 92 | 93 | Widget _buidText(context) { 94 | var we = MediaQuery.of(context).size.width; 95 | var he = MediaQuery.of(context).size.height; 96 | 97 | return Container( 98 | margin: EdgeInsets.only(right: we * 0.4), 99 | child: Column( 100 | crossAxisAlignment: CrossAxisAlignment.start, 101 | children: [ 102 | Text( 103 | "Joy", 104 | style: GoogleFonts.lato( 105 | fontSize: 40, 106 | letterSpacing: 2, 107 | color: Colors.white, 108 | fontWeight: FontWeight.bold), 109 | ), 110 | Text( 111 | "Mitchell", 112 | style: GoogleFonts.lato( 113 | fontSize: 40, 114 | letterSpacing: 2, 115 | color: Colors.white, 116 | fontWeight: FontWeight.bold), 117 | ), 118 | ], 119 | ), 120 | ); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/pages/Drawerhiden/hidendrawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../homepage.dart'; 3 | import 'Drawer_widget.dart'; 4 | import 'package:flutter/services.dart'; 5 | 6 | class HidenDrawer extends StatefulWidget { 7 | double animationtime; 8 | HidenDrawer({Key? key, required this.animationtime}) : super(key: key); 9 | 10 | @override 11 | State createState() => _HidenDrawerState(); 12 | } 13 | class _HidenDrawerState extends State { 14 | late double xOffset; 15 | late double yOffset; 16 | late double scaleFactor; 17 | late bool isDrawingOpen; 18 | // int dely = 300; 19 | bool isDragging = false; 20 | 21 | void onpenDrawer() { 22 | setState(() { 23 | xOffset = 300; 24 | yOffset = 70; 25 | scaleFactor = 0.85; 26 | isDrawingOpen = true; 27 | }); 28 | } 29 | 30 | void closeDrawer() { 31 | setState(() { 32 | xOffset = 0; 33 | yOffset = 0; 34 | scaleFactor = 1; 35 | isDrawingOpen = false; 36 | }); 37 | } 38 | 39 | @override 40 | void initState() { 41 | // TODO: implement initState 42 | super.initState(); 43 | SystemChrome.setPreferredOrientations( 44 | [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); 45 | closeDrawer(); 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) => Scaffold( 50 | backgroundColor: const Color(0xFF04123F), 51 | body: Stack(children: [ 52 | DrawerWidget( 53 | closdDrawer: closeDrawer, 54 | ), 55 | buildpage() 56 | ])); 57 | 58 | Widget buildpage() { 59 | return GestureDetector( 60 | onHorizontalDragStart: (details) => isDragging = true, 61 | onHorizontalDragUpdate: (details) { 62 | if (!isDragging) return; 63 | const delta = 1; 64 | if (details.delta.dx > delta) { 65 | onpenDrawer(); 66 | } else if (details.delta.dx < -delta) { 67 | closeDrawer(); 68 | } 69 | }, 70 | onTap: closeDrawer, 71 | child: AnimatedContainer( 72 | duration: const Duration(milliseconds: 250), 73 | transform: Matrix4.translationValues(xOffset, yOffset, 0) 74 | ..scale(scaleFactor), 75 | child: ClipRRect( 76 | borderRadius: BorderRadius.circular(isDrawingOpen ? 30 : 0), 77 | child: MyHomePage( 78 | opendrawer: onpenDrawer, 79 | animationtime: widget.animationtime, 80 | ), 81 | )), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/pages/button_change_them.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_todo/data/thems.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | 7 | class ChangeThembutton extends StatefulWidget { 8 | ChangeThembutton({Key? key}) : super(key: key); 9 | 10 | @override 11 | State createState() => _ChangeThembuttonState(); 12 | } 13 | 14 | class _ChangeThembuttonState extends State { 15 | bool Ison = false; 16 | bool Isicons = false; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | // Todo this button for change them of app .. 21 | final themprovider = Provider.of(context); 22 | return IconButton( 23 | onPressed: () { 24 | final provider = Provider.of(context, listen: false); 25 | Isicons = !Isicons; 26 | Ison = themprovider.isDarkMode; 27 | 28 | provider.toggleThem(Ison); 29 | }, 30 | icon: Isicons 31 | ? const Icon( 32 | Icons.mode_night_outlined, 33 | color: Colors.grey, 34 | ) 35 | : const Icon( 36 | Icons.light_mode_outlined, 37 | color: Colors.grey, 38 | )); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/pages/card_tasks.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_todo/db/noted.dart'; 3 | 4 | class CardTasks extends StatelessWidget { 5 | Notes taskuser; 6 | bool isActive; 7 | 8 | int Index; 9 | final colorIcon = [ 10 | Colors.red, 11 | Colors.blue, 12 | Colors.green, 13 | Colors.purple, 14 | Colors.orange 15 | ]; 16 | ValueChanged onSelected; 17 | 18 | CardTasks( 19 | {Key? key, 20 | required this.taskuser, 21 | required this.isActive, 22 | required this.Index, 23 | required this.onSelected}) : super(key: key); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | Color color = Colors.red; 28 | if (taskuser.title == "Business") { 29 | color = const Color(0xFFAC05FF); 30 | } else if (taskuser.title == "Personal") { 31 | color = const Color(0xFF0011FF); 32 | } else if (taskuser.title == "Sports") { 33 | color = Colors.red; 34 | } else if (taskuser.title == "School") { 35 | color = Colors.green; 36 | } else if (taskuser.title == "Family") { 37 | color = Colors.orange; 38 | } 39 | var we = MediaQuery.of(context).size.width; 40 | var he = MediaQuery.of(context).size.height; 41 | 42 | return Card( 43 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), 44 | child: Container( 45 | width: we * 0.9, 46 | height: he * 0.09, 47 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(20)), 48 | child: Row( 49 | mainAxisAlignment: MainAxisAlignment.center, 50 | children: [ 51 | Padding( 52 | padding: const EdgeInsets.only(left: 20), 53 | child: InkWell( 54 | onTap: () => onSelected(taskuser), 55 | child: isActive 56 | ? const Icon(Icons.check_circle_outlined, 57 | color: Colors.grey) 58 | 59 | : Icon( 60 | Icons.circle_outlined, 61 | color: color, 62 | ), 63 | )), 64 | SizedBox( 65 | width: we * 0.025, 66 | ), 67 | Expanded( 68 | child: Text(taskuser.description, 69 | maxLines: 20, 70 | overflow: TextOverflow.clip, 71 | style: TextStyle( 72 | color: Theme.of(context).primaryColor, 73 | fontWeight: FontWeight.w500, 74 | // ignore: unrelated_type_equality_checks 75 | decoration: isActive 76 | ? TextDecoration.lineThrough 77 | : TextDecoration.none, 78 | ))) 79 | ], 80 | ), 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/pages/chart.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:animated_text_kit/animated_text_kit.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_todo/data/advice.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | 7 | class Chart extends StatefulWidget { 8 | @override 9 | State createState() => _ChartState(); 10 | } 11 | 12 | class _ChartState extends State { 13 | @override 14 | void initState() { 15 | // TODO: implement initState 16 | super.initState(); 17 | int random = Random().nextInt(advices.length); 18 | setState(() { 19 | index = random; 20 | }); 21 | } 22 | 23 | int index = 0; 24 | @override 25 | Widget build(BuildContext context) { 26 | var we = MediaQuery.of(context).size.width; 27 | return Container( 28 | margin: EdgeInsets.only(right: 100, top: we * 0.15), 29 | child: Column( 30 | crossAxisAlignment: CrossAxisAlignment.start, 31 | mainAxisAlignment: MainAxisAlignment.start, 32 | children: [ 33 | const SizedBox( 34 | height: 30, 35 | ), 36 | Padding( 37 | padding: const EdgeInsets.only(right: 50, left: 20), 38 | child: AnimatedTextKit(repeatForever: true, animatedTexts: [ 39 | TyperAnimatedText(advices[index].description, 40 | speed: const Duration(milliseconds: 90), 41 | textStyle: const TextStyle(color: Colors.white)), 42 | ]), 43 | ), 44 | const SizedBox( 45 | height: 12, 46 | ), 47 | Padding( 48 | padding: const EdgeInsets.only(left: 20), 49 | child: Text( 50 | advices[index].name, 51 | style: GoogleFonts.lato(color: Colors.grey), 52 | ), 53 | ), 54 | ], 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/pages/homepage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_slidable/flutter_slidable.dart'; 3 | import 'package:flutter_todo/Animation/fadeAnimation.dart'; 4 | import 'package:flutter_todo/main.dart'; 5 | import 'package:flutter_todo/pages/note_task.dart'; 6 | import 'package:flutter_todo/db/boxes.dart'; 7 | import 'package:flutter_todo/db/noted.dart'; 8 | import 'package:hive_flutter/hive_flutter.dart'; 9 | import 'package:lottie/lottie.dart'; 10 | import 'package:page_transition/page_transition.dart'; 11 | import '../data/shared/Task_saved.dart'; 12 | import '../data/tasks.dart'; 13 | import '../Animation/linearprogress.dart'; 14 | import '../data/time_say.dart'; 15 | import 'button_change_them.dart'; 16 | import 'card_tasks.dart'; 17 | 18 | // late Box box; 19 | 20 | class MyHomePage extends StatefulWidget { 21 | VoidCallback opendrawer; 22 | double animationtime; 23 | MyHomePage({required this.opendrawer, required this.animationtime}); 24 | 25 | @override 26 | State createState() => _MyHomePageState(); 27 | } 28 | 29 | class _MyHomePageState extends State { 30 | List all_selected_tasks = []; // your tasks 31 | 32 | int Business = 0; 33 | int Personal = 0; 34 | int Programming = 0; 35 | int Sports = 0; 36 | int Family = 0; 37 | 38 | bool isLoading = false; 39 | final noted = box.values.toList().cast(); 40 | 41 | void cheakTag() { 42 | noted.forEach((element) { 43 | if (element.title == "Business") { 44 | setState(() { 45 | Business++; 46 | }); 47 | } else if (element.title == "Personal") { 48 | setState(() { 49 | Personal++; 50 | }); 51 | } else if (element.title == "Programming") { 52 | setState(() { 53 | Programming++; 54 | }); 55 | } else if (element.title == "Sports") { 56 | setState(() { 57 | Sports++; 58 | }); 59 | } else if (element.title == "Family") { 60 | setState(() { 61 | Family++; 62 | }); 63 | } else { 64 | Business = 0; 65 | Personal = 0; 66 | Programming = 0; 67 | Sports = 0; 68 | Family = 0; 69 | } 70 | }); 71 | } 72 | 73 | void initState() { 74 | all_selected_tasks = TaskerPreference.getString() ?? []; 75 | cheakTag(); 76 | super.initState(); 77 | } 78 | 79 | @override 80 | void dispose() { 81 | // TODO: close Hive_Database of Note ... 82 | Hive.close(); 83 | super.dispose(); 84 | } 85 | 86 | @override 87 | Widget build(BuildContext context) { 88 | var we = MediaQuery.of(context).size.width; 89 | var he = MediaQuery.of(context).size.height; 90 | 91 | return Scaffold( 92 | body: ValueListenableBuilder>( 93 | valueListenable: Boxes.getNote().listenable(), 94 | builder: (context, box, _) { 95 | final noted = box.values.toList().cast(); 96 | return SafeArea( 97 | child: SizedBox( 98 | width: we, 99 | height: he, 100 | child: Column(children: [ 101 | Row( 102 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 103 | children: [ 104 | SizedBox( 105 | width: we * 0.02, 106 | ), 107 | IconButton( 108 | onPressed: widget.opendrawer, 109 | icon: const Icon( 110 | Icons.drag_handle_outlined, 111 | color: Colors.grey, 112 | size: 35, 113 | )), 114 | SizedBox( 115 | width: we * 0.7, 116 | ), 117 | SizedBox( 118 | width: we * 0.01, 119 | ), 120 | ChangeThembutton(), 121 | SizedBox( 122 | width: we * 0.02, 123 | ), 124 | ], 125 | ), 126 | FadeAnimation( 127 | delay: widget.animationtime, 128 | child: Container( 129 | margin: EdgeInsets.only(top: he * 0.02), 130 | width: we * 0.9, 131 | height: he * 0.15, 132 | child: Column( 133 | crossAxisAlignment: CrossAxisAlignment.start, 134 | children: [ 135 | Timecall(), 136 | SizedBox( 137 | height: he * 0.06, 138 | ), 139 | Text( 140 | "CATEGORIES", 141 | style: TextStyle( 142 | letterSpacing: 1, 143 | color: Colors.grey.withOpacity(0.8), 144 | fontSize: 13), 145 | ), 146 | ], 147 | ), 148 | ), 149 | ), 150 | FadeAnimation( 151 | delay: widget.animationtime, 152 | child: SizedBox( 153 | width: we * 2, 154 | height: he * 0.16, 155 | child: ListView( 156 | physics: const BouncingScrollPhysics(), 157 | children: [ 158 | _buildCategories(context, tasklist[0].title, 159 | tasklist[0].progresscolor, Business), 160 | _buildCategories(context, tasklist[1].title, 161 | tasklist[1].progresscolor, Personal), 162 | _buildCategories(context, tasklist[2].title, 163 | tasklist[2].progresscolor, Programming), 164 | _buildCategories(context, tasklist[3].title, 165 | tasklist[3].progresscolor, Sports), 166 | _buildCategories(context, tasklist[4].title, 167 | tasklist[4].progresscolor, Family), 168 | ], 169 | scrollDirection: Axis.horizontal, 170 | ), 171 | ), 172 | ), 173 | SizedBox( 174 | height: he * 0.04, 175 | ), 176 | Container( 177 | alignment: Alignment.topLeft, 178 | margin: const EdgeInsets.only(left: 15, bottom: 15), 179 | child: Text("TODAY'S TASKS", 180 | style: TextStyle( 181 | letterSpacing: 1, 182 | color: Colors.grey.withOpacity(0.8), 183 | fontSize: 13)), 184 | ), 185 | FadeAnimation( 186 | delay: widget.animationtime, 187 | child: SizedBox( 188 | width: we * 0.9, 189 | height: he * 0.4, 190 | child: isLoading 191 | ? const CircularProgressIndicator() 192 | : noted.isEmpty 193 | ? Center( 194 | child: Lottie.asset( 195 | "assets/78347-no-search-result.json", 196 | width: we * 0.6, 197 | ), 198 | ) 199 | : ListView.builder( 200 | itemCount: noted.length, 201 | itemBuilder: 202 | (BuildContext context, int index) { 203 | // ignore: non_constant_identifier_names 204 | final IsSelected = 205 | all_selected_tasks.contains( 206 | noted[index].description); 207 | return Slidable( 208 | endActionPane: ActionPane( 209 | motion: const StretchMotion(), 210 | children: [ 211 | SlidableAction( 212 | onPressed: (context) => 213 | deleteitem( 214 | noted[index]), 215 | backgroundColor: 216 | const Color(0xFFFE4A49), 217 | foregroundColor: 218 | Colors.white, 219 | icon: Icons.delete, 220 | label: "Delete", 221 | ), 222 | SlidableAction( 223 | onPressed: (context) async { 224 | await Navigator.of( 225 | context) 226 | .push( 227 | MaterialPageRoute( 228 | builder: 229 | (context) => 230 | Note_Task( 231 | note: 232 | noted[index], 233 | ))); 234 | }, 235 | backgroundColor: 236 | const Color(0xFF21B7CA), 237 | foregroundColor: 238 | Colors.white, 239 | label: "Edite", 240 | icon: Icons.edit, 241 | ), 242 | ], 243 | ), 244 | child: builditem( 245 | noted[index], 246 | IsSelected, 247 | )); 248 | }, 249 | physics: const BouncingScrollPhysics(), 250 | ))), 251 | ])), 252 | ); 253 | }), 254 | floatingActionButton: FadeAnimation( 255 | delay: widget.animationtime, 256 | child: FloatingActionButton( 257 | onPressed: () async { 258 | await Navigator.of(context).push(PageTransition( 259 | type: PageTransitionType.fade, 260 | child: Note_Task( 261 | note: Notes(description: "", title: "Business")))); 262 | }, 263 | backgroundColor: 264 | const FloatingActionButtonThemeData().backgroundColor, 265 | child: const Icon(Icons.add), 266 | ), 267 | ), 268 | ); 269 | } 270 | 271 | Widget _buildCategories( 272 | context, String title, Color lineProgress, int numbertask) { 273 | var we = MediaQuery.of(context).size.width; 274 | var he = MediaQuery.of(context).size.height; 275 | 276 | return Card( 277 | margin: const EdgeInsets.only(left: 23), 278 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)), 279 | clipBehavior: Clip.antiAlias, 280 | elevation: 2, 281 | shadowColor: Colors.black.withOpacity(0.2), 282 | child: Container( 283 | width: we * 0.5, 284 | height: he * 0.1, 285 | margin: const EdgeInsets.only( 286 | top: 25, 287 | left: 14, 288 | ), 289 | child: Column( 290 | crossAxisAlignment: CrossAxisAlignment.start, 291 | children: [ 292 | Text( 293 | "$numbertask task", 294 | style: TextStyle(color: Colors.grey.withOpacity(0.9)), 295 | ), 296 | SizedBox( 297 | height: he * 0.01, 298 | ), 299 | Text( 300 | title, 301 | style: TextStyle( 302 | fontSize: 23, 303 | color: Theme.of(context).primaryColor, 304 | fontWeight: FontWeight.bold, 305 | ), 306 | ), 307 | SizedBox(height: he * 0.03), 308 | Padding( 309 | padding: const EdgeInsets.only(right: 30), 310 | child: LineProgress( 311 | value: numbertask.toDouble(), 312 | Color: lineProgress, 313 | )), 314 | ], 315 | ), 316 | ), 317 | ); 318 | } 319 | 320 | void deleteitem(Notes note) { 321 | if (note.title == "Business") { 322 | setState(() { 323 | Business == 0 ? Business : Business--; 324 | }); 325 | } else if (note.title == "Personal") { 326 | setState(() { 327 | Personal == 0 ? Personal : Personal--; 328 | }); 329 | } else if (note.title == "Programming") { 330 | setState(() { 331 | Programming == 0 ? Programming : Programming--; 332 | }); 333 | } else if (note.title == "Sports") { 334 | setState(() { 335 | Sports == 0 ? Sports : Sports--; 336 | }); 337 | } else if (note.title == "Family") { 338 | setState(() { 339 | Family == 0 ? Family : Family--; 340 | }); 341 | } else { 342 | Business = 0; 343 | Personal = 0; 344 | Programming = 0; 345 | Sports = 0; 346 | Family = 0; 347 | } 348 | 349 | note.delete(); 350 | } 351 | 352 | // TODO : Tasks Items ... 353 | Widget builditem(Notes item, IsSelected) { 354 | return CardTasks( 355 | Index: 1, 356 | onSelected: (tasks) async { 357 | setState(() { 358 | IsSelected 359 | ? all_selected_tasks.remove(item.description) 360 | : all_selected_tasks.add(item.description); 361 | }); 362 | TaskerPreference.setStringList(all_selected_tasks); 363 | }, 364 | isActive: IsSelected, 365 | taskuser: item, 366 | ); 367 | } 368 | } 369 | -------------------------------------------------------------------------------- /lib/pages/note_form.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | class NoteFormWidget extends StatelessWidget { 5 | final String? description; 6 | final ValueChanged onChangedDescription; 7 | 8 | const NoteFormWidget( 9 | {Key? key, this.description = "", required this.onChangedDescription}) 10 | : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | var we = MediaQuery.of(context).size.width; 15 | var he = MediaQuery.of(context).size.height; 16 | 17 | return Container( 18 | width: we * 8, 19 | height: he * 0.12, 20 | margin: EdgeInsets.only(top: he * 0.3, left: we * 0.1), 21 | child: TextFormField( 22 | // initialValue: widget.note?.description, 23 | initialValue: description, 24 | onChanged: onChangedDescription, 25 | decoration: InputDecoration( 26 | enabledBorder: InputBorder.none, 27 | border: InputBorder.none, 28 | hintText: 'Enter new task', 29 | hintStyle: GoogleFonts.lato( 30 | color: Colors.black.withOpacity(0.3), fontSize: 27), 31 | ), 32 | style: GoogleFonts.lato( 33 | color: Colors.black, fontWeight: FontWeight.bold, fontSize: 27), 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/pages/note_task.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_todo/Animation/fadeAnimation.dart'; 3 | import 'package:flutter_todo/db/noted.dart'; 4 | import 'package:flutter_todo/pages/Drawerhiden/hidendrawer.dart'; 5 | import 'package:flutter_todo/pages/note_form.dart'; 6 | import 'package:google_fonts/google_fonts.dart'; 7 | import 'package:page_transition/page_transition.dart'; 8 | import '../main.dart'; 9 | 10 | enum SelectedColor { Business, School, Personal, Sports, Family } 11 | 12 | class Note_Task extends StatefulWidget { 13 | final Notes note; 14 | 15 | const Note_Task({Key? key, required this.note}) : super(key: key); 16 | 17 | @override 18 | _Note_TaskState createState() => _Note_TaskState(); 19 | } 20 | 21 | class _Note_TaskState extends State { 22 | late String description; 23 | 24 | bool Ison = false; 25 | final _controller = TextEditingController(); 26 | 27 | bool isactive = true; 28 | 29 | SelectedColor selected = SelectedColor.Business; 30 | // SelectedColor? title; 31 | 32 | String text = 'New Task'; 33 | 34 | Color colorbutton = const Color(0xFF002FFF); 35 | 36 | @override 37 | void initState() { 38 | super.initState(); 39 | description = widget.note.description; 40 | if (widget.note.title == "Business") { 41 | selected = SelectedColor.Business; 42 | } else if (widget.note.title == "Personal") { 43 | selected = SelectedColor.Personal; 44 | } else if (widget.note.title == "Sports") { 45 | selected = SelectedColor.Sports; 46 | } else if (widget.note.title == "School") { 47 | selected = SelectedColor.School; 48 | } else if (widget.note.title == "Family") { 49 | selected = SelectedColor.Family; 50 | } 51 | } 52 | 53 | @override 54 | void dispose() { 55 | super.dispose(); 56 | _controller.dispose(); 57 | } 58 | 59 | @override 60 | Widget build(BuildContext context) { 61 | var we = MediaQuery.of(context).size.width; 62 | var he = MediaQuery.of(context).size.height; 63 | return Scaffold( 64 | backgroundColor: const Color(0xffF4F6FD), 65 | body: SingleChildScrollView( 66 | physics: const BouncingScrollPhysics(), 67 | child: SizedBox( 68 | child: Column( 69 | children: [ 70 | FadeAnimation( 71 | delay: 0.2, 72 | child: Container( 73 | margin: EdgeInsets.only(top: he * 0.05, left: we * 0.73), 74 | width: 50, 75 | height: 50, 76 | alignment: Alignment.center, 77 | decoration: BoxDecoration( 78 | color: Colors.grey[300], shape: BoxShape.circle), 79 | child: Container( 80 | width: 47, 81 | height: 47, 82 | alignment: Alignment.center, 83 | decoration: const BoxDecoration( 84 | shape: BoxShape.circle, 85 | color: Color(0xffF4F6FD), 86 | ), 87 | child: IconButton( 88 | onPressed: () { 89 | Navigator.of(context).pop(); 90 | }, 91 | icon: const Icon( 92 | Icons.close, 93 | color: Colors.black, 94 | size: 20, 95 | ))), 96 | ), 97 | ), 98 | FadeAnimation( 99 | delay: 0.3, 100 | child: NoteFormWidget( 101 | description: description, 102 | onChangedDescription: (description) { 103 | setState(() => this.description = description); 104 | })), 105 | FadeAnimation(delay: 0.4, child: _buidTage()), 106 | SizedBox(height: he * 0.28), 107 | FadeAnimation( 108 | delay: 0.4, 109 | child: widget.note.description == "" 110 | ? _buildButtonCreate(context) 111 | : _buildButtonSave(context)) 112 | ], 113 | ), 114 | ), 115 | ), 116 | ); 117 | } 118 | 119 | // TODO Update button ... 120 | Widget _buildButtonCreate(BuildContext contex) { 121 | var we = MediaQuery.of(context).size.width; 122 | var he = MediaQuery.of(context).size.height; 123 | return Container( 124 | width: we * 0.4, 125 | height: 50, 126 | margin: EdgeInsets.only(left: we * 0.45), 127 | child: ElevatedButton( 128 | style: ElevatedButton.styleFrom( 129 | primary: colorbutton, 130 | shape: RoundedRectangleBorder( 131 | borderRadius: BorderRadius.circular(40))), 132 | onPressed: () { 133 | if (description.isNotEmpty & selected.toString().isNotEmpty) { 134 | List selects = selected.toString().split("."); 135 | addNote(); 136 | } else { 137 | setState(() { 138 | text = 'Filed'; 139 | colorbutton = Colors.red; 140 | }); 141 | } 142 | }, 143 | child: Row( 144 | mainAxisAlignment: MainAxisAlignment.center, 145 | children: [ 146 | Text( 147 | text, 148 | style: GoogleFonts.lato(color: Colors.white), 149 | ), 150 | SizedBox( 151 | width: we * 0.03, 152 | ), 153 | const Icon( 154 | Icons.expand_less_outlined, 155 | color: Colors.white, 156 | ) 157 | ], 158 | ))); 159 | } 160 | 161 | // TODO Save button .. 162 | Widget _buildButtonSave(BuildContext contex) { 163 | var we = MediaQuery.of(context).size.width; 164 | var he = MediaQuery.of(context).size.height; 165 | return Container( 166 | width: we * 0.4, 167 | height: 50, 168 | margin: EdgeInsets.only(left: we * 0.45), 169 | child: ElevatedButton( 170 | onPressed: () => updateNote(widget.note, description), 171 | style: ElevatedButton.styleFrom( 172 | primary: const Color(0xFF002FFF), 173 | shape: RoundedRectangleBorder( 174 | borderRadius: BorderRadius.circular(40))), 175 | child: Row( 176 | mainAxisAlignment: MainAxisAlignment.center, 177 | children: [ 178 | Text( 179 | "Save", 180 | style: GoogleFonts.lato(color: Colors.white), 181 | ), 182 | SizedBox( 183 | width: we * 0.03, 184 | ), 185 | const Icon( 186 | Icons.edit, 187 | color: Colors.white, 188 | ) 189 | ], 190 | )), 191 | ); 192 | } 193 | 194 | Widget _buidTage() { 195 | return Column( 196 | mainAxisAlignment: MainAxisAlignment.center, 197 | children: [ 198 | Row( 199 | mainAxisAlignment: MainAxisAlignment.center, 200 | children: [ 201 | GestureDetector( 202 | onTap: () { 203 | setState(() { 204 | selected = SelectedColor.Business; 205 | }); 206 | }, 207 | child: Container( 208 | alignment: Alignment.center, 209 | width: 90, 210 | height: 40, 211 | decoration: BoxDecoration( 212 | borderRadius: BorderRadius.circular(20), 213 | border: Border.all( 214 | color: selected == SelectedColor.Business 215 | ? Colors.blue 216 | : Colors.white, 217 | width: selected == SelectedColor.Business ? 3 : 0), 218 | color: selected == SelectedColor.Business 219 | ? const Color(0xFFAC05FF).withOpacity(0.6) 220 | : Colors.grey.withOpacity(0.5)), 221 | child: const Text( 222 | 'Business', 223 | style: TextStyle(color: Colors.white), 224 | ), 225 | ), 226 | ), 227 | GestureDetector( 228 | onTap: () { 229 | setState(() { 230 | selected = SelectedColor.Personal; 231 | }); 232 | }, 233 | child: Container( 234 | margin: const EdgeInsets.only(left: 14), 235 | alignment: Alignment.center, 236 | width: 90, 237 | height: 40, 238 | decoration: BoxDecoration( 239 | borderRadius: BorderRadius.circular(20), 240 | border: Border.all( 241 | color: selected == SelectedColor.Personal 242 | ? Colors.blue 243 | : Colors.white, 244 | width: selected == SelectedColor.Personal ? 3 : 0), 245 | color: selected == SelectedColor.Personal 246 | ? const Color(0xFF0011FF).withOpacity(0.6) 247 | : Colors.grey.withOpacity(0.5)), 248 | child: const Text( 249 | 'Personal', 250 | style: TextStyle(color: Colors.white), 251 | ), 252 | ), 253 | ), 254 | GestureDetector( 255 | onTap: () { 256 | setState(() { 257 | selected = SelectedColor.Sports; 258 | }); 259 | }, 260 | child: Container( 261 | margin: const EdgeInsets.only(left: 14), 262 | alignment: Alignment.center, 263 | width: 90, 264 | height: 40, 265 | decoration: BoxDecoration( 266 | borderRadius: BorderRadius.circular(20), 267 | border: Border.all( 268 | color: selected == SelectedColor.Sports 269 | ? Colors.blue 270 | : Colors.white, 271 | width: selected == SelectedColor.Sports ? 3 : 0), 272 | color: selected == SelectedColor.Sports 273 | ? Colors.red.withOpacity(0.6) 274 | : Colors.grey.withOpacity(0.5)), 275 | child: const Text( 276 | 'Sports', 277 | style: TextStyle(color: Colors.white), 278 | ), 279 | ), 280 | ), 281 | ], 282 | ), 283 | const SizedBox(height: 10), 284 | Row( 285 | mainAxisAlignment: MainAxisAlignment.center, 286 | children: [ 287 | GestureDetector( 288 | onTap: () { 289 | setState(() { 290 | selected = SelectedColor.School; 291 | }); 292 | }, 293 | child: Container( 294 | alignment: Alignment.center, 295 | width: 90, 296 | height: 40, 297 | decoration: BoxDecoration( 298 | borderRadius: BorderRadius.circular(20), 299 | border: Border.all( 300 | color: selected == SelectedColor.School 301 | ? Colors.blue 302 | : Colors.white, 303 | width: selected == SelectedColor.School ? 3 : 0), 304 | color: selected == SelectedColor.School 305 | ? Colors.green.withOpacity(0.6) 306 | : Colors.grey.withOpacity(0.5)), 307 | child: const Text( 308 | 'School', 309 | style: TextStyle(color: Colors.white), 310 | ), 311 | ), 312 | ), 313 | GestureDetector( 314 | onTap: () { 315 | setState(() { 316 | selected = SelectedColor.Family; 317 | }); 318 | }, 319 | child: Container( 320 | margin: const EdgeInsets.only(left: 14), 321 | alignment: Alignment.center, 322 | width: 90, 323 | height: 40, 324 | decoration: BoxDecoration( 325 | borderRadius: BorderRadius.circular(20), 326 | border: Border.all( 327 | color: selected == SelectedColor.Family 328 | ? Colors.blue 329 | : Colors.white, 330 | width: selected == SelectedColor.Family ? 3 : 0), 331 | color: selected == SelectedColor.Family 332 | ? Colors.orange.withOpacity(0.6) 333 | : Colors.grey.withOpacity(0.5)), 334 | child: const Text( 335 | 'Family', 336 | style: TextStyle(color: Colors.white), 337 | ), 338 | ), 339 | ), 340 | ], 341 | ) 342 | ], 343 | ); 344 | } 345 | 346 | // Todo add note in db 347 | Future addNote() async { 348 | List selects = selected.toString().split("."); 349 | final note = Notes( 350 | description: description, 351 | title: selects[1], 352 | ); 353 | 354 | box.add(note); 355 | Navigator.of(context).push(PageTransition( 356 | child: HidenDrawer( 357 | animationtime: 0, 358 | ), 359 | type: PageTransitionType.fade)); 360 | } 361 | 362 | // Todo update note in db 363 | Future updateNote(Notes note, String description) async { 364 | List selects = selected.toString().split("."); 365 | note.description = description; 366 | note.title = selects[1]; 367 | note.save(); 368 | Navigator.of(context).push(PageTransition( 369 | child: HidenDrawer( 370 | animationtime: 0, 371 | ), 372 | type: PageTransitionType.fade)); 373 | } 374 | } 375 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | animate_do: 5 | dependency: "direct main" 6 | description: 7 | name: animate_do 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.1.0" 11 | archive: 12 | dependency: transitive 13 | description: 14 | name: archive 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "3.2.1" 18 | args: 19 | dependency: transitive 20 | description: 21 | name: args 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.3.0" 25 | async: 26 | dependency: transitive 27 | description: 28 | name: async 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.8.2" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.1.0" 39 | characters: 40 | dependency: transitive 41 | description: 42 | name: characters 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.2.0" 46 | charcode: 47 | dependency: transitive 48 | description: 49 | name: charcode 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.3.1" 53 | clock: 54 | dependency: transitive 55 | description: 56 | name: clock 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.0" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.15.0" 67 | crypto: 68 | dependency: transitive 69 | description: 70 | name: crypto 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "3.0.1" 74 | cupertino_icons: 75 | dependency: "direct main" 76 | description: 77 | name: cupertino_icons 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.0.4" 81 | equatable: 82 | dependency: transitive 83 | description: 84 | name: equatable 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "2.0.3" 88 | fake_async: 89 | dependency: transitive 90 | description: 91 | name: fake_async 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.2.0" 95 | ffi: 96 | dependency: transitive 97 | description: 98 | name: ffi 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.1.2" 102 | file: 103 | dependency: transitive 104 | description: 105 | name: file 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "6.1.2" 109 | fl_chart: 110 | dependency: "direct main" 111 | description: 112 | name: fl_chart 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "0.45.1" 116 | flutter: 117 | dependency: "direct main" 118 | description: flutter 119 | source: sdk 120 | version: "0.0.0" 121 | flutter_launcher_icons: 122 | dependency: "direct main" 123 | description: 124 | name: flutter_launcher_icons 125 | url: "https://pub.dartlang.org" 126 | source: hosted 127 | version: "0.9.2" 128 | flutter_lints: 129 | dependency: "direct dev" 130 | description: 131 | name: flutter_lints 132 | url: "https://pub.dartlang.org" 133 | source: hosted 134 | version: "1.0.4" 135 | flutter_native_splash: 136 | dependency: "direct dev" 137 | description: 138 | name: flutter_native_splash 139 | url: "https://pub.dartlang.org" 140 | source: hosted 141 | version: "2.1.0" 142 | flutter_slidable: 143 | dependency: "direct main" 144 | description: 145 | name: flutter_slidable 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "1.2.0" 149 | flutter_test: 150 | dependency: "direct dev" 151 | description: flutter 152 | source: sdk 153 | version: "0.0.0" 154 | flutter_web_plugins: 155 | dependency: transitive 156 | description: flutter 157 | source: sdk 158 | version: "0.0.0" 159 | font_awesome_flutter: 160 | dependency: "direct main" 161 | description: 162 | name: font_awesome_flutter 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "9.2.0" 166 | google_fonts: 167 | dependency: "direct main" 168 | description: 169 | name: google_fonts 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "2.3.1" 173 | http: 174 | dependency: transitive 175 | description: 176 | name: http 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "0.13.4" 180 | http_parser: 181 | dependency: transitive 182 | description: 183 | name: http_parser 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "4.0.0" 187 | image: 188 | dependency: transitive 189 | description: 190 | name: image 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "3.1.3" 194 | js: 195 | dependency: transitive 196 | description: 197 | name: js 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "0.6.3" 201 | lints: 202 | dependency: transitive 203 | description: 204 | name: lints 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "1.0.1" 208 | matcher: 209 | dependency: transitive 210 | description: 211 | name: matcher 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.12.11" 215 | material_color_utilities: 216 | dependency: transitive 217 | description: 218 | name: material_color_utilities 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "0.1.3" 222 | meta: 223 | dependency: transitive 224 | description: 225 | name: meta 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.7.0" 229 | nested: 230 | dependency: transitive 231 | description: 232 | name: nested 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "1.0.0" 236 | page_transition: 237 | dependency: "direct main" 238 | description: 239 | name: page_transition 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "2.0.5" 243 | path: 244 | dependency: transitive 245 | description: 246 | name: path 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "1.8.0" 250 | path_provider: 251 | dependency: "direct main" 252 | description: 253 | name: path_provider 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "2.0.9" 257 | path_provider_android: 258 | dependency: transitive 259 | description: 260 | name: path_provider_android 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "2.0.12" 264 | path_provider_ios: 265 | dependency: transitive 266 | description: 267 | name: path_provider_ios 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "2.0.8" 271 | path_provider_linux: 272 | dependency: transitive 273 | description: 274 | name: path_provider_linux 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "2.1.5" 278 | path_provider_macos: 279 | dependency: transitive 280 | description: 281 | name: path_provider_macos 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "2.0.5" 285 | path_provider_platform_interface: 286 | dependency: transitive 287 | description: 288 | name: path_provider_platform_interface 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "2.0.3" 292 | path_provider_windows: 293 | dependency: transitive 294 | description: 295 | name: path_provider_windows 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "2.0.5" 299 | petitparser: 300 | dependency: transitive 301 | description: 302 | name: petitparser 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "4.4.0" 306 | platform: 307 | dependency: transitive 308 | description: 309 | name: platform 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "3.1.0" 313 | plugin_platform_interface: 314 | dependency: transitive 315 | description: 316 | name: plugin_platform_interface 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "2.1.2" 320 | process: 321 | dependency: transitive 322 | description: 323 | name: process 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "4.2.4" 327 | provider: 328 | dependency: "direct main" 329 | description: 330 | name: provider 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "6.0.2" 334 | shared_preferences: 335 | dependency: "direct main" 336 | description: 337 | name: shared_preferences 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "2.0.13" 341 | shared_preferences_android: 342 | dependency: transitive 343 | description: 344 | name: shared_preferences_android 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "2.0.11" 348 | shared_preferences_ios: 349 | dependency: transitive 350 | description: 351 | name: shared_preferences_ios 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "2.1.0" 355 | shared_preferences_linux: 356 | dependency: transitive 357 | description: 358 | name: shared_preferences_linux 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "2.1.0" 362 | shared_preferences_macos: 363 | dependency: transitive 364 | description: 365 | name: shared_preferences_macos 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "2.0.3" 369 | shared_preferences_platform_interface: 370 | dependency: transitive 371 | description: 372 | name: shared_preferences_platform_interface 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "2.0.0" 376 | shared_preferences_web: 377 | dependency: transitive 378 | description: 379 | name: shared_preferences_web 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "2.0.3" 383 | shared_preferences_windows: 384 | dependency: transitive 385 | description: 386 | name: shared_preferences_windows 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "2.1.0" 390 | simple_animations: 391 | dependency: "direct main" 392 | description: 393 | name: simple_animations 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "4.0.1" 397 | sky_engine: 398 | dependency: transitive 399 | description: flutter 400 | source: sdk 401 | version: "0.0.99" 402 | source_span: 403 | dependency: transitive 404 | description: 405 | name: source_span 406 | url: "https://pub.dartlang.org" 407 | source: hosted 408 | version: "1.8.1" 409 | sqflite: 410 | dependency: "direct main" 411 | description: 412 | name: sqflite 413 | url: "https://pub.dartlang.org" 414 | source: hosted 415 | version: "2.0.2" 416 | sqflite_common: 417 | dependency: transitive 418 | description: 419 | name: sqflite_common 420 | url: "https://pub.dartlang.org" 421 | source: hosted 422 | version: "2.2.0" 423 | stack_trace: 424 | dependency: transitive 425 | description: 426 | name: stack_trace 427 | url: "https://pub.dartlang.org" 428 | source: hosted 429 | version: "1.10.0" 430 | stream_channel: 431 | dependency: transitive 432 | description: 433 | name: stream_channel 434 | url: "https://pub.dartlang.org" 435 | source: hosted 436 | version: "2.1.0" 437 | string_scanner: 438 | dependency: transitive 439 | description: 440 | name: string_scanner 441 | url: "https://pub.dartlang.org" 442 | source: hosted 443 | version: "1.1.0" 444 | supercharged: 445 | dependency: "direct main" 446 | description: 447 | name: supercharged 448 | url: "https://pub.dartlang.org" 449 | source: hosted 450 | version: "2.1.1" 451 | supercharged_dart: 452 | dependency: transitive 453 | description: 454 | name: supercharged_dart 455 | url: "https://pub.dartlang.org" 456 | source: hosted 457 | version: "2.1.1" 458 | synchronized: 459 | dependency: transitive 460 | description: 461 | name: synchronized 462 | url: "https://pub.dartlang.org" 463 | source: hosted 464 | version: "3.0.0" 465 | term_glyph: 466 | dependency: transitive 467 | description: 468 | name: term_glyph 469 | url: "https://pub.dartlang.org" 470 | source: hosted 471 | version: "1.2.0" 472 | test_api: 473 | dependency: transitive 474 | description: 475 | name: test_api 476 | url: "https://pub.dartlang.org" 477 | source: hosted 478 | version: "0.4.8" 479 | typed_data: 480 | dependency: transitive 481 | description: 482 | name: typed_data 483 | url: "https://pub.dartlang.org" 484 | source: hosted 485 | version: "1.3.0" 486 | universal_io: 487 | dependency: transitive 488 | description: 489 | name: universal_io 490 | url: "https://pub.dartlang.org" 491 | source: hosted 492 | version: "2.0.4" 493 | vector_math: 494 | dependency: transitive 495 | description: 496 | name: vector_math 497 | url: "https://pub.dartlang.org" 498 | source: hosted 499 | version: "2.1.1" 500 | win32: 501 | dependency: transitive 502 | description: 503 | name: win32 504 | url: "https://pub.dartlang.org" 505 | source: hosted 506 | version: "2.4.1" 507 | xdg_directories: 508 | dependency: transitive 509 | description: 510 | name: xdg_directories 511 | url: "https://pub.dartlang.org" 512 | source: hosted 513 | version: "0.2.0+1" 514 | xml: 515 | dependency: transitive 516 | description: 517 | name: xml 518 | url: "https://pub.dartlang.org" 519 | source: hosted 520 | version: "5.3.1" 521 | yaml: 522 | dependency: transitive 523 | description: 524 | name: yaml 525 | url: "https://pub.dartlang.org" 526 | source: hosted 527 | version: "3.1.0" 528 | sdks: 529 | dart: ">=2.16.1 <3.0.0" 530 | flutter: ">=2.10.0-0" 531 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_todo 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number 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+1 19 | 20 | environment: 21 | sdk: ">=2.16.1 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | 38 | provider: ^6.0.2 39 | 40 | flutter_slidable: ^1.2.0 41 | 42 | # for Fonts .. 43 | google_fonts: ^2.3.1 44 | 45 | # for Animations 3 46 | simple_animations: ^4.0.1 47 | 48 | path_provider: ^2.0.9 49 | 50 | # for Animations 2 51 | supercharged: ^2.1.1 52 | 53 | # for Animations 1 54 | animate_do: ^2.1.0 55 | 56 | 57 | shared_preferences: ^2.0.13 58 | 59 | lottie: ^1.4.1 60 | 61 | # Icons 62 | font_awesome_flutter: ^9.2.0 63 | 64 | # for icon app .. 65 | flutter_launcher_icons: ^0.9.2 66 | 67 | # Animation Navaigtion page ... 68 | page_transition: ^2.0.5 69 | 70 | # Database 71 | hive: ^2.2.3 72 | 73 | hive_flutter: ^1.1.0 74 | 75 | animated_text_kit: ^4.2.2 76 | 77 | flutter_icons: 78 | android: true 79 | ios: true 80 | image_path: "assets/Todo.png" 81 | 82 | dev_dependencies: 83 | flutter_test: 84 | sdk: flutter 85 | 86 | # The "flutter_lints" package below contains a set of recommended lints to 87 | # encourage good coding practices. The lint set provided by the package is 88 | # activated in the `analysis_options.yaml` file located at the root of your 89 | # package. See that file for information about deactivating specific lint 90 | # rules and activating additional ones. 91 | flutter_lints: ^1.0.0 92 | flutter_native_splash: ^2.0.5 93 | hive_generator: ^1.1.3 94 | build_runner: ^2.2.0 95 | 96 | flutter_native_splash: 97 | color: "#ffffff" 98 | color_dark: "#3450A1" 99 | image: "assets/Todo.png" 100 | android: true 101 | ios: true 102 | 103 | # For information on the generic Dart part of this file, see the 104 | # following page: https://dart.dev/tools/pub/pubspec 105 | 106 | # The following section is specific to Flutter. 107 | flutter: 108 | 109 | # The following line ensures that the Material Icons font is 110 | # included with your application, so that you can use the icons in 111 | # the material Icons class. 112 | uses-material-design: true 113 | 114 | # To add assets to your application, add an assets section, like this: 115 | assets: 116 | - assets/ 117 | # - images/a_dot_ham.jpeg 118 | 119 | # An image asset can refer to one or more resolution-specific "variants", see 120 | # https://flutter.dev/assets-and-images/#resolution-aware. 121 | 122 | # For details regarding adding assets from package dependencies, see 123 | # https://flutter.dev/assets-and-images/#from-packages 124 | 125 | # To add custom fonts to your application, add a fonts section here, 126 | # in this "flutter" section. Each entry in this list should have a 127 | # "family" key with the font family name, and a "fonts" key with a 128 | # list giving the asset and other descriptors for the font. For 129 | # example: 130 | # fonts: 131 | # - family: Schyler 132 | # fonts: 133 | # - asset: fonts/Schyler-Regular.ttf 134 | # - asset: fonts/Schyler-Italic.ttf 135 | # style: italic 136 | # - family: Trajan Pro 137 | # fonts: 138 | # - asset: fonts/TrajanPro.ttf 139 | # - asset: fonts/TrajanPro_Bold.ttf 140 | # weight: 700 141 | # 142 | # For details regarding fonts from package dependencies, 143 | # see https://flutter.dev/custom-fonts/#from-packages 144 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | flutter_todo 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 111 | 112 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_todo", 3 | "short_name": "flutter_todo", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /web/splash/img/dark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/dark-1x.png -------------------------------------------------------------------------------- /web/splash/img/dark-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/dark-2x.png -------------------------------------------------------------------------------- /web/splash/img/dark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/dark-3x.png -------------------------------------------------------------------------------- /web/splash/img/dark-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/dark-4x.png -------------------------------------------------------------------------------- /web/splash/img/light-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/light-1x.png -------------------------------------------------------------------------------- /web/splash/img/light-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/light-2x.png -------------------------------------------------------------------------------- /web/splash/img/light-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/light-3x.png -------------------------------------------------------------------------------- /web/splash/img/light-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/web/splash/img/light-4x.png -------------------------------------------------------------------------------- /web/splash/splash.js: -------------------------------------------------------------------------------- 1 | function removeSplashFromWeb() { 2 | const elem = document.getElementById("splash"); 3 | if (elem) { 4 | elem.remove(); 5 | } 6 | document.body.style.background = "transparent"; 7 | } 8 | -------------------------------------------------------------------------------- /web/splash/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin:0; 3 | height:100%; 4 | background: #ffffff; 5 | 6 | background-size: 100% 100%; 7 | } 8 | 9 | .center { 10 | margin: 0; 11 | position: absolute; 12 | top: 50%; 13 | left: 50%; 14 | -ms-transform: translate(-50%, -50%); 15 | transform: translate(-50%, -50%); 16 | } 17 | 18 | .contain { 19 | display:block; 20 | width:100%; height:100%; 21 | object-fit: contain; 22 | } 23 | 24 | .stretch { 25 | display:block; 26 | width:100%; height:100%; 27 | } 28 | 29 | .cover { 30 | display:block; 31 | width:100%; height:100%; 32 | object-fit: cover; 33 | } 34 | 35 | @media (prefers-color-scheme: dark) { 36 | body { 37 | margin:0; 38 | height:100%; 39 | background: #3450A1; 40 | 41 | background-size: 100% 100%; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(flutter_todo LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "flutter_todo") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 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 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 11 | 12 | # === Flutter Library === 13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 14 | 15 | # Published to parent scope for install step. 16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 20 | 21 | list(APPEND FLUTTER_LIBRARY_HEADERS 22 | "flutter_export.h" 23 | "flutter_windows.h" 24 | "flutter_messenger.h" 25 | "flutter_plugin_registrar.h" 26 | "flutter_texture_registrar.h" 27 | ) 28 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 29 | add_library(flutter INTERFACE) 30 | target_include_directories(flutter INTERFACE 31 | "${EPHEMERAL_DIR}" 32 | ) 33 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 34 | add_dependencies(flutter flutter_assemble) 35 | 36 | # === Wrapper === 37 | list(APPEND CPP_WRAPPER_SOURCES_CORE 38 | "core_implementations.cc" 39 | "standard_codec.cc" 40 | ) 41 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 42 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 43 | "plugin_registrar.cc" 44 | ) 45 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 46 | list(APPEND CPP_WRAPPER_SOURCES_APP 47 | "flutter_engine.cc" 48 | "flutter_view_controller.cc" 49 | ) 50 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 51 | 52 | # Wrapper sources needed for a plugin. 53 | add_library(flutter_wrapper_plugin STATIC 54 | ${CPP_WRAPPER_SOURCES_CORE} 55 | ${CPP_WRAPPER_SOURCES_PLUGIN} 56 | ) 57 | apply_standard_settings(flutter_wrapper_plugin) 58 | set_target_properties(flutter_wrapper_plugin PROPERTIES 59 | POSITION_INDEPENDENT_CODE ON) 60 | set_target_properties(flutter_wrapper_plugin PROPERTIES 61 | CXX_VISIBILITY_PRESET hidden) 62 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 63 | target_include_directories(flutter_wrapper_plugin PUBLIC 64 | "${WRAPPER_ROOT}/include" 65 | ) 66 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 67 | 68 | # Wrapper sources needed for the runner. 69 | add_library(flutter_wrapper_app STATIC 70 | ${CPP_WRAPPER_SOURCES_CORE} 71 | ${CPP_WRAPPER_SOURCES_APP} 72 | ) 73 | apply_standard_settings(flutter_wrapper_app) 74 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 75 | target_include_directories(flutter_wrapper_app PUBLIC 76 | "${WRAPPER_ROOT}/include" 77 | ) 78 | add_dependencies(flutter_wrapper_app flutter_assemble) 79 | 80 | # === Flutter tool backend === 81 | # _phony_ is a non-existent file to force this command to run every time, 82 | # since currently there's no way to get a full input/output list from the 83 | # flutter tool. 84 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 85 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 86 | add_custom_command( 87 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 88 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 89 | ${CPP_WRAPPER_SOURCES_APP} 90 | ${PHONY_OUTPUT} 91 | COMMAND ${CMAKE_COMMAND} -E env 92 | ${FLUTTER_TOOL_ENVIRONMENT} 93 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 94 | windows-x64 $ 95 | VERBATIM 96 | ) 97 | add_custom_target(flutter_assemble DEPENDS 98 | "${FLUTTER_LIBRARY}" 99 | ${FLUTTER_LIBRARY_HEADERS} 100 | ${CPP_WRAPPER_SOURCES_CORE} 101 | ${CPP_WRAPPER_SOURCES_PLUGIN} 102 | ${CPP_WRAPPER_SOURCES_APP} 103 | ) 104 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | set(PLUGIN_BUNDLED_LIBRARIES) 9 | 10 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 11 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 12 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 13 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 15 | endforeach(plugin) 16 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "flutter_todo" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "flutter_todo" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "flutter_todo.exe" "\0" 98 | VALUE "ProductName", "flutter_todo" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"flutter_todo", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amirziyacode/Flutter_Todo/e19b664e34fcabfee250ea4ebe7ed1da5f7c0b8c/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | 7 | namespace { 8 | 9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 10 | 11 | // The number of Win32Window objects that currently exist. 12 | static int g_active_window_count = 0; 13 | 14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 15 | 16 | // Scale helper to convert logical scaler values to physical using passed in 17 | // scale factor 18 | int Scale(int source, double scale_factor) { 19 | return static_cast(source * scale_factor); 20 | } 21 | 22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 23 | // This API is only needed for PerMonitor V1 awareness mode. 24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 25 | HMODULE user32_module = LoadLibraryA("User32.dll"); 26 | if (!user32_module) { 27 | return; 28 | } 29 | auto enable_non_client_dpi_scaling = 30 | reinterpret_cast( 31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 32 | if (enable_non_client_dpi_scaling != nullptr) { 33 | enable_non_client_dpi_scaling(hwnd); 34 | FreeLibrary(user32_module); 35 | } 36 | } 37 | 38 | } // namespace 39 | 40 | // Manages the Win32Window's window class registration. 41 | class WindowClassRegistrar { 42 | public: 43 | ~WindowClassRegistrar() = default; 44 | 45 | // Returns the singleton registar instance. 46 | static WindowClassRegistrar* GetInstance() { 47 | if (!instance_) { 48 | instance_ = new WindowClassRegistrar(); 49 | } 50 | return instance_; 51 | } 52 | 53 | // Returns the name of the window class, registering the class if it hasn't 54 | // previously been registered. 55 | const wchar_t* GetWindowClass(); 56 | 57 | // Unregisters the window class. Should only be called if there are no 58 | // instances of the window. 59 | void UnregisterWindowClass(); 60 | 61 | private: 62 | WindowClassRegistrar() = default; 63 | 64 | static WindowClassRegistrar* instance_; 65 | 66 | bool class_registered_ = false; 67 | }; 68 | 69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 70 | 71 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 72 | if (!class_registered_) { 73 | WNDCLASS window_class{}; 74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 75 | window_class.lpszClassName = kWindowClassName; 76 | window_class.style = CS_HREDRAW | CS_VREDRAW; 77 | window_class.cbClsExtra = 0; 78 | window_class.cbWndExtra = 0; 79 | window_class.hInstance = GetModuleHandle(nullptr); 80 | window_class.hIcon = 81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 82 | window_class.hbrBackground = 0; 83 | window_class.lpszMenuName = nullptr; 84 | window_class.lpfnWndProc = Win32Window::WndProc; 85 | RegisterClass(&window_class); 86 | class_registered_ = true; 87 | } 88 | return kWindowClassName; 89 | } 90 | 91 | void WindowClassRegistrar::UnregisterWindowClass() { 92 | UnregisterClass(kWindowClassName, nullptr); 93 | class_registered_ = false; 94 | } 95 | 96 | Win32Window::Win32Window() { 97 | ++g_active_window_count; 98 | } 99 | 100 | Win32Window::~Win32Window() { 101 | --g_active_window_count; 102 | Destroy(); 103 | } 104 | 105 | bool Win32Window::CreateAndShow(const std::wstring& title, 106 | const Point& origin, 107 | const Size& size) { 108 | Destroy(); 109 | 110 | const wchar_t* window_class = 111 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 112 | 113 | const POINT target_point = {static_cast(origin.x), 114 | static_cast(origin.y)}; 115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 117 | double scale_factor = dpi / 96.0; 118 | 119 | HWND window = CreateWindow( 120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 123 | nullptr, nullptr, GetModuleHandle(nullptr), this); 124 | 125 | if (!window) { 126 | return false; 127 | } 128 | 129 | return OnCreate(); 130 | } 131 | 132 | // static 133 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 134 | UINT const message, 135 | WPARAM const wparam, 136 | LPARAM const lparam) noexcept { 137 | if (message == WM_NCCREATE) { 138 | auto window_struct = reinterpret_cast(lparam); 139 | SetWindowLongPtr(window, GWLP_USERDATA, 140 | reinterpret_cast(window_struct->lpCreateParams)); 141 | 142 | auto that = static_cast(window_struct->lpCreateParams); 143 | EnableFullDpiSupportIfAvailable(window); 144 | that->window_handle_ = window; 145 | } else if (Win32Window* that = GetThisFromHandle(window)) { 146 | return that->MessageHandler(window, message, wparam, lparam); 147 | } 148 | 149 | return DefWindowProc(window, message, wparam, lparam); 150 | } 151 | 152 | LRESULT 153 | Win32Window::MessageHandler(HWND hwnd, 154 | UINT const message, 155 | WPARAM const wparam, 156 | LPARAM const lparam) noexcept { 157 | switch (message) { 158 | case WM_DESTROY: 159 | window_handle_ = nullptr; 160 | Destroy(); 161 | if (quit_on_close_) { 162 | PostQuitMessage(0); 163 | } 164 | return 0; 165 | 166 | case WM_DPICHANGED: { 167 | auto newRectSize = reinterpret_cast(lparam); 168 | LONG newWidth = newRectSize->right - newRectSize->left; 169 | LONG newHeight = newRectSize->bottom - newRectSize->top; 170 | 171 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 172 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 173 | 174 | return 0; 175 | } 176 | case WM_SIZE: { 177 | RECT rect = GetClientArea(); 178 | if (child_content_ != nullptr) { 179 | // Size and position the child window. 180 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 181 | rect.bottom - rect.top, TRUE); 182 | } 183 | return 0; 184 | } 185 | 186 | case WM_ACTIVATE: 187 | if (child_content_ != nullptr) { 188 | SetFocus(child_content_); 189 | } 190 | return 0; 191 | } 192 | 193 | return DefWindowProc(window_handle_, message, wparam, lparam); 194 | } 195 | 196 | void Win32Window::Destroy() { 197 | OnDestroy(); 198 | 199 | if (window_handle_) { 200 | DestroyWindow(window_handle_); 201 | window_handle_ = nullptr; 202 | } 203 | if (g_active_window_count == 0) { 204 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 205 | } 206 | } 207 | 208 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 209 | return reinterpret_cast( 210 | GetWindowLongPtr(window, GWLP_USERDATA)); 211 | } 212 | 213 | void Win32Window::SetChildContent(HWND content) { 214 | child_content_ = content; 215 | SetParent(content, window_handle_); 216 | RECT frame = GetClientArea(); 217 | 218 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 219 | frame.bottom - frame.top, true); 220 | 221 | SetFocus(child_content_); 222 | } 223 | 224 | RECT Win32Window::GetClientArea() { 225 | RECT frame; 226 | GetClientRect(window_handle_, &frame); 227 | return frame; 228 | } 229 | 230 | HWND Win32Window::GetHandle() { 231 | return window_handle_; 232 | } 233 | 234 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 235 | quit_on_close_ = quit_on_close; 236 | } 237 | 238 | bool Win32Window::OnCreate() { 239 | // No-op; provided for subclasses. 240 | return true; 241 | } 242 | 243 | void Win32Window::OnDestroy() { 244 | // No-op; provided for subclasses. 245 | } 246 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | --------------------------------------------------------------------------------