├── lib ├── core │ ├── models │ │ ├── Tablo.dart │ │ ├── Settings.dart │ │ ├── Todo.dart │ │ ├── Project.dart │ │ └── Column.dart │ ├── Lang │ │ └── Lang.dart │ ├── GloryIcons │ │ └── GloryIcons.dart │ ├── components │ │ ├── ColumnPopUpMenu.dart │ │ ├── TodoWidget.dart │ │ ├── Table.dart │ │ └── ColumnWidget.dart │ └── JsonManager │ │ └── JsonManager.dart ├── main.dart └── Pages │ ├── SettingsPage.dart │ ├── ProjectPage.dart │ └── TodosPage.dart ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── .gitattributes ├── assets ├── logo.png ├── settings.json ├── glory_todo_desktop.db ├── test.json └── storage.json ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── manifest.json └── index.html ├── fonts └── GloryIcons.ttf ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── 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 │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── glory_todo_desktop │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── build.gradle └── glory_todo_desktop_android.iml ├── screenshoots ├── Ekran Alıntısı.JPG ├── Ekran Alıntısı2.JPG ├── Ekran Alıntısı3.JPG └── Ekran Alıntısı4.JPG ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── CMakeLists.txt │ ├── utils.h │ ├── runner.exe.manifest │ ├── run_loop.h │ ├── flutter_window.h │ ├── main.cpp │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── run_loop.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt ├── .gitignore └── CMakeLists.txt ├── .idea ├── runConfigurations │ └── main_dart.xml ├── modules.xml ├── libraries │ ├── KotlinJavaRuntime.xml │ └── Dart_SDK.xml └── workspace.xml ├── .flutter-plugins ├── .metadata ├── .flutter-plugins-dependencies ├── .gitignore ├── .vscode └── c_cpp_properties.json ├── glory_todo_desktop.iml ├── README.md └── pubspec.yaml /lib/core/models/Tablo.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/assets/logo.png -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/web/favicon.png -------------------------------------------------------------------------------- /fonts/GloryIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/fonts/GloryIcons.ttf -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/settings.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "colorMode": "Dark", 4 | "language": "Turkish" 5 | } 6 | ] -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/glory_todo_desktop.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/assets/glory_todo_desktop.db -------------------------------------------------------------------------------- /screenshoots/Ekran Alıntısı.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/screenshoots/Ekran Alıntısı.JPG -------------------------------------------------------------------------------- /screenshoots/Ekran Alıntısı2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/screenshoots/Ekran Alıntısı2.JPG -------------------------------------------------------------------------------- /screenshoots/Ekran Alıntısı3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/screenshoots/Ekran Alıntısı3.JPG -------------------------------------------------------------------------------- /screenshoots/Ekran Alıntısı4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/screenshoots/Ekran Alıntısı4.JPG -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/test.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "isim": "Glory Todo App" 5 | }, 6 | { 7 | "id": 2, 8 | "isim": "City Builder" 9 | } 10 | ] -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/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/yessGlory17/glory_todo_desktop/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yessGlory17/glory_todo_desktop/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/glory_todo_desktop/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.glory_todo_desktop 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.flutter-plugins: -------------------------------------------------------------------------------- 1 | # This is a generated file; do not edit or check into version control. 2 | bitsdojo_window=C:\\Users\\ozgur\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\bitsdojo_window-0.0.4\\ 3 | path_provider_windows=C:\\Users\\ozgur\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_windows-0.0.4+3\\ 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 79b49b9e1057f90ebf797725233c6b311722de69 8 | channel: dev 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 6 | #define GENERATED_PLUGIN_REGISTRANT_ 7 | 8 | #include 9 | 10 | // Registers Flutter plugins. 11 | void RegisterPlugins(flutter::PluginRegistry* registry); 12 | 13 | #endif // GENERATED_PLUGIN_REGISTRANT_ 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #include "generated_plugin_registrant.h" 6 | 7 | #include 8 | 9 | void RegisterPlugins(flutter::PluginRegistry* registry) { 10 | BitsdojoWindowPluginRegisterWithRegistrar( 11 | registry->GetRegistrarForPlugin("BitsdojoWindowPlugin")); 12 | } 13 | -------------------------------------------------------------------------------- /lib/core/models/Settings.dart: -------------------------------------------------------------------------------- 1 | class Settings { 2 | String colorMode; 3 | String language; 4 | 5 | Settings(this.colorMode, this.language); 6 | 7 | factory Settings.fromJson(dynamic json) { 8 | //print("Tip : " + json['tabloKolonlari'].toString()); 9 | return Settings(json['colorMode'], json['language']); 10 | } 11 | 12 | Map toJson() => { 13 | 'colorMode': colorMode, 14 | 'language': language, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glory_todo_desktop/Pages/ProjectPage.dart'; 3 | 4 | import 'package:glory_todo_desktop/core/JsonManager/JsonManager.dart'; 5 | 6 | void main() { 7 | ExistJson(); 8 | runApp(MyApp()); 9 | } 10 | 11 | class MyApp extends StatelessWidget { 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | debugShowCheckedModeBanner: false, 16 | home: ProjectPage(), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | bitsdojo_window 7 | ) 8 | 9 | set(PLUGIN_BUNDLED_LIBRARIES) 10 | 11 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 12 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 13 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 15 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 16 | endforeach(plugin) 17 | -------------------------------------------------------------------------------- /lib/core/models/Todo.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:glory_todo_desktop/Pages/TodosPage.dart'; 4 | 5 | class Todo { 6 | int todoId; 7 | String todo; 8 | bool isCheck; 9 | var rand = new Random(); 10 | Todo(this.todoId, this.todo, this.isCheck) {} 11 | 12 | factory Todo.fromJson(dynamic json) { 13 | //print("Tip : " + json['tabloKolonlari'].toString()); 14 | return Todo(json['todoId'], json['todo'], json['isCheck']); 15 | } 16 | 17 | Map toJson() => 18 | {'todoId': todoId, 'todo': todo, 'isCheck': isCheck}; 19 | } 20 | -------------------------------------------------------------------------------- /.idea/libraries/KotlinJavaRuntime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "run_loop.cpp" 8 | "utils.cpp" 9 | "win32_window.cpp" 10 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 11 | "Runner.rc" 12 | "runner.exe.manifest" 13 | ) 14 | apply_standard_settings(${BINARY_NAME}) 15 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 16 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 17 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 18 | add_dependencies(${BINARY_NAME} flutter_assemble) 19 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[],"android":[],"macos":[],"linux":[],"windows":[{"name":"bitsdojo_window","path":"C:\\\\Users\\\\ozgur\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\bitsdojo_window-0.0.4\\\\","dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\ozgur\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-0.0.4+3\\\\","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"bitsdojo_window","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-02-25 00:52:56.815490","version":"1.26.0-17.2.pre"} -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "glory_todo_desktop", 3 | "short_name": "glory_todo_desktop", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | # If you're building an application, you may want to check-in your pubspec.lock 8 | pubspec.lock 9 | 10 | # Directory created by dartdoc 11 | # If you don't generate documentation locally you can remove this line. 12 | doc/api/ 13 | 14 | # Avoid committing generated Javascript files: 15 | *.dart.js 16 | *.info.json # Produced by the --dump-info flag. 17 | *.js # When generated by dart2js. Don't specify *.js if your 18 | # project includes source files written in JavaScript. 19 | *.js_ 20 | *.js.deps 21 | *.js.map 22 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Win32", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [ 9 | "_DEBUG", 10 | "UNICODE", 11 | "_UNICODE" 12 | ], 13 | "windowsSdkVersion": "10.0.18362.0", 14 | "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe", 15 | "cStandard": "c17", 16 | "cppStandard": "c++17", 17 | "intelliSenseMode": "windows-msvc-x64" 18 | } 19 | ], 20 | "version": 4 21 | } -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 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 | -------------------------------------------------------------------------------- /lib/core/models/Project.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'dart:math'; 3 | 4 | class Project { 5 | int projectID; 6 | String projectName; 7 | List columns; 8 | 9 | Project(this.projectID, this.projectName, 10 | this.columns) {} //Kategori eklerken kullan çünkü id dbden veriliyor 11 | 12 | Project.addNew(this.projectID, this.projectName) { 13 | columns = []; 14 | } 15 | 16 | factory Project.fromJson(dynamic json) { 17 | //print("Tip : " + json['tabloKolonlari'].toString()); 18 | return Project(json['projectID'], json['projectName'], json['columns']); 19 | } 20 | 21 | Map toJson() => 22 | {'projectID': projectID, 'projectName': projectName, 'columns': columns}; 23 | } 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /glory_todo_desktop.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/core/models/Column.dart: -------------------------------------------------------------------------------- 1 | import 'package:glory_todo_desktop/core/models/Project.dart'; 2 | import 'dart:math'; 3 | import 'package:glory_todo_desktop/core/models/Todo.dart'; 4 | 5 | class ProjectColumn { 6 | int columnId; 7 | String columnName; 8 | List todos; 9 | 10 | ProjectColumn(this.columnId, this.columnName, 11 | this.todos) {} //Kategori eklerken kullan çünkü id dbden veriliyor 12 | 13 | //Kategorileri dbden okurken kullanılır. 14 | ProjectColumn.withID(this.columnId, this.columnName, this.todos) { 15 | //punicColumnId = rand.nextInt(1000000 - 10000).toString(); 16 | } 17 | ProjectColumn.addColumnContructor(this.columnId, this.columnName) { 18 | todos = []; 19 | } 20 | 21 | factory ProjectColumn.fromJson(dynamic json) { 22 | return ProjectColumn(json['columnId'], json['columnName'], 23 | json['todos'] /*Burada Casting vardı .cast() */); 24 | } 25 | 26 | Map toJson() => 27 | {'columnId': columnId, 'columnName': columnName, 'todos': todos}; 28 | } 29 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /windows/runner/run_loop.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_RUN_LOOP_H_ 2 | #define RUNNER_RUN_LOOP_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | // A runloop that will service events for Flutter instances as well 10 | // as native messages. 11 | class RunLoop { 12 | public: 13 | RunLoop(); 14 | ~RunLoop(); 15 | 16 | // Prevent copying 17 | RunLoop(RunLoop const&) = delete; 18 | RunLoop& operator=(RunLoop const&) = delete; 19 | 20 | // Runs the run loop until the application quits. 21 | void Run(); 22 | 23 | // Registers the given Flutter instance for event servicing. 24 | void RegisterFlutterInstance( 25 | flutter::FlutterEngine* flutter_instance); 26 | 27 | // Unregisters the given Flutter instance from event servicing. 28 | void UnregisterFlutterInstance( 29 | flutter::FlutterEngine* flutter_instance); 30 | 31 | private: 32 | using TimePoint = std::chrono::steady_clock::time_point; 33 | 34 | // Processes all currently pending messages for registered Flutter instances. 35 | TimePoint ProcessFlutterMessages(); 36 | 37 | std::set flutter_instances_; 38 | }; 39 | 40 | #endif // RUNNER_RUN_LOOP_H_ 41 | -------------------------------------------------------------------------------- /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 "run_loop.h" 10 | #include "win32_window.h" 11 | 12 | // A window that does nothing but host a Flutter view. 13 | class FlutterWindow : public Win32Window { 14 | public: 15 | // Creates a new FlutterWindow driven by the |run_loop|, hosting a 16 | // Flutter view running |project|. 17 | explicit FlutterWindow(RunLoop* run_loop, 18 | const flutter::DartProject& project); 19 | virtual ~FlutterWindow(); 20 | 21 | protected: 22 | // Win32Window: 23 | bool OnCreate() override; 24 | void OnDestroy() override; 25 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 26 | LPARAM const lparam) noexcept override; 27 | 28 | private: 29 | // The run loop driving events for this window. 30 | RunLoop* run_loop_; 31 | 32 | // The project to run. 33 | flutter::DartProject project_; 34 | 35 | // The Flutter instance hosted by this window. 36 | std::unique_ptr flutter_controller_; 37 | }; 38 | 39 | #endif // RUNNER_FLUTTER_WINDOW_H_ 40 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "flutter_window.h" 8 | #include "run_loop.h" 9 | #include "utils.h" 10 | 11 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 12 | _In_ wchar_t *command_line, _In_ int show_command) 13 | { 14 | // Attach to console when present (e.g., 'flutter run') or create a 15 | // new console when running with a debugger. 16 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) 17 | { 18 | CreateAndAttachConsole(); 19 | } 20 | 21 | // Initialize COM, so that it is available for use in the library and/or 22 | // plugins. 23 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 24 | 25 | RunLoop run_loop; 26 | 27 | flutter::DartProject project(L"data"); 28 | 29 | std::vector command_line_arguments = 30 | GetCommandLineArguments(); 31 | 32 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 33 | 34 | FlutterWindow window(&run_loop, project); 35 | Win32Window::Point origin(10, 10); 36 | Win32Window::Size size(1280, 720); 37 | if (!window.CreateAndShow(L"glory_todo_desktop", origin, size)) 38 | { 39 | return EXIT_FAILURE; 40 | } 41 | window.SetQuitOnClose(true); 42 | 43 | run_loop.Run(); 44 | 45 | ::CoUninitialize(); 46 | return EXIT_SUCCESS; 47 | } 48 | -------------------------------------------------------------------------------- /lib/core/Lang/Lang.dart: -------------------------------------------------------------------------------- 1 | class Lang { 2 | static var turkce = { 3 | "projectPageCreateButton": "Oluştur", 4 | "todosPageAddButton": "Yeni", 5 | "newProjectHeader": "Yeni Proje Adı?", 6 | "newProjectHeader2": "Yeni proje adını giriniz", 7 | "newColumnHeader": "Yeni Kolon Adı?", 8 | "newColumnHeader2": "Yeni Kolon Adı", 9 | "newTodoHeader": "Yeni Görev?", 10 | "newTodoHeader2": "Yeni görevi giriniz", 11 | "noColumnsHeader": "Herhangi bir kolon bulunamadı!", 12 | "noTodosHeader": "Herhangi bir görev bulunamadı!", 13 | "settingsColorMode": "Renk Teması", 14 | "settingsLangMode": "Dil Seçeneği", 15 | "editButton": "Düzenle", 16 | "addButton": "Ekle", 17 | "editProjectNameHeader": "Proje Adını Düzenle", 18 | }; 19 | static var english = { 20 | "projectPageCreateButton": "Create", 21 | "todosPageAddButton": "New", 22 | "newProjectHeader": "New Project Name?", 23 | "newProjectHeader2": "New project name", 24 | "newColumnHeader": "New Column Name?", 25 | "newColumnHeader2": "New Column Name", 26 | "newTodoHeader": "New Todo Name?", 27 | "newTodoHeader2": "New todo name", 28 | "noColumnsHeader": "No columns were found!", 29 | "noTodosHeader": "No task found!", 30 | "settingsColorMode": "Color Mode", 31 | "settingsLangMode": "Language Option", 32 | "editButton": "Edit", 33 | "addButton": "Add", 34 | "editProjectNameHeader": "Edit Project Name", 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /lib/core/GloryIcons/GloryIcons.dart: -------------------------------------------------------------------------------- 1 | /// Flutter icons GloryIcons 2 | /// Copyright (C) 2021 by original authors @ fluttericon.com, fontello.com 3 | /// This font was generated by FlutterIcon.com, which is derived from Fontello. 4 | /// 5 | /// To use this font, place it in your fonts/ directory and include the 6 | /// following in your pubspec.yaml 7 | /// 8 | /// flutter: 9 | /// fonts: 10 | /// - family: GloryIcons 11 | /// fonts: 12 | /// - asset: fonts/GloryIcons.ttf 13 | /// 14 | /// 15 | /// * Font Awesome 5, Copyright (C) 2016 by Dave Gandy 16 | /// Author: Dave Gandy 17 | /// License: SIL (https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt) 18 | /// Homepage: http://fortawesome.github.com/Font-Awesome/ 19 | /// * Font Awesome 4, Copyright (C) 2016 by Dave Gandy 20 | /// Author: Dave Gandy 21 | /// License: SIL () 22 | /// Homepage: http://fortawesome.github.com/Font-Awesome/ 23 | /// 24 | import 'package:flutter/widgets.dart'; 25 | 26 | class GloryIcons { 27 | GloryIcons._(); 28 | 29 | static const _kFontFam = 'GloryIcons'; 30 | static const String _kFontPkg = null; 31 | 32 | static const IconData check_circle = 33 | IconData(0xf058, fontFamily: _kFontFam, fontPackage: _kFontPkg); 34 | static const IconData circle_empty = 35 | IconData(0xf10c, fontFamily: _kFontFam, fontPackage: _kFontPkg); 36 | static const IconData circle = 37 | IconData(0xf111, fontFamily: _kFontFam, fontPackage: _kFontPkg); 38 | static const IconData circle_thin = 39 | IconData(0xf1db, fontFamily: _kFontFam, fontPackage: _kFontPkg); 40 | } 41 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | glory_todo_desktop 30 | 31 | 32 | 33 | 36 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/glory_todo_desktop_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | glory_todo_desktop 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 30 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.example.glory_todo_desktop" 38 | minSdkVersion 16 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 59 | } 60 | -------------------------------------------------------------------------------- /lib/core/components/ColumnPopUpMenu.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColumnPopUpMenu extends StatefulWidget { 4 | bool isNight; 5 | 6 | VoidCallback edit; 7 | VoidCallback remove; 8 | VoidCallback color; 9 | ColumnPopUpMenu(this.isNight, this.edit, this.remove); 10 | 11 | @override 12 | _ColumnPopUpMenuState createState() => _ColumnPopUpMenuState(); 13 | } 14 | 15 | class _ColumnPopUpMenuState extends State { 16 | Color setColor() { 17 | if (widget.isNight) { 18 | return Colors.white54; 19 | } else { 20 | return Colors.black54; 21 | } 22 | } 23 | 24 | void showMenuSelection(String value) { 25 | switch (value) { 26 | case 'edit': 27 | widget.edit(); 28 | break; 29 | case 'remove': 30 | widget.remove(); 31 | break; 32 | 33 | // Other cases for other menu options 34 | } 35 | } 36 | 37 | @override 38 | void initState() { 39 | // TODO: implement initState 40 | super.initState(); 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | bool night = widget.isNight; 46 | return PopupMenuButton( 47 | icon: Icon( 48 | Icons.more_vert, 49 | color: widget.isNight ? Color(0xFFd7d8de) : Color(0xFF1f2024), 50 | ), 51 | color: widget.isNight ? Color(0xFF1f2024) : Color(0xFFd7d8de), 52 | onSelected: showMenuSelection, 53 | itemBuilder: (BuildContext context) => >[ 54 | const PopupMenuItem( 55 | value: 'edit', 56 | child: Center( 57 | child: IconButton( 58 | icon: Icon( 59 | Icons.edit, 60 | color: Colors.black54, 61 | ), 62 | ) 63 | //color: night ? Colors.white54 : Colors.black54, 64 | ), 65 | ), 66 | const PopupMenuItem( 67 | value: 'remove', 68 | child: Center( 69 | child: IconButton( 70 | icon: Icon(Icons.delete), 71 | color: Colors.black54, 72 | ), 73 | ), 74 | ), 75 | ], 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /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(RunLoop* run_loop, 8 | const flutter::DartProject& project) 9 | : run_loop_(run_loop), project_(project) {} 10 | 11 | FlutterWindow::~FlutterWindow() {} 12 | 13 | bool FlutterWindow::OnCreate() { 14 | if (!Win32Window::OnCreate()) { 15 | return false; 16 | } 17 | 18 | RECT frame = GetClientArea(); 19 | 20 | // The size here must match the window dimensions to avoid unnecessary surface 21 | // creation / destruction in the startup path. 22 | flutter_controller_ = std::make_unique( 23 | frame.right - frame.left, frame.bottom - frame.top, project_); 24 | // Ensure that basic setup of the controller was successful. 25 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 26 | return false; 27 | } 28 | RegisterPlugins(flutter_controller_->engine()); 29 | run_loop_->RegisterFlutterInstance(flutter_controller_->engine()); 30 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 31 | return true; 32 | } 33 | 34 | void FlutterWindow::OnDestroy() { 35 | if (flutter_controller_) { 36 | run_loop_->UnregisterFlutterInstance(flutter_controller_->engine()); 37 | flutter_controller_ = nullptr; 38 | } 39 | 40 | Win32Window::OnDestroy(); 41 | } 42 | 43 | LRESULT 44 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 45 | WPARAM const wparam, 46 | LPARAM const lparam) noexcept { 47 | // Give Flutter, including plugins, an opporutunity to handle window messages. 48 | if (flutter_controller_) { 49 | std::optional result = 50 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 51 | lparam); 52 | if (result) { 53 | return *result; 54 | } 55 | } 56 | 57 | switch (message) { 58 | case WM_FONTCHANGE: 59 | flutter_controller_->engine()->ReloadSystemFonts(); 60 | break; 61 | } 62 | 63 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 64 | } 65 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /windows/runner/run_loop.cpp: -------------------------------------------------------------------------------- 1 | #include "run_loop.h" 2 | 3 | #include 4 | 5 | #include 6 | 7 | RunLoop::RunLoop() {} 8 | 9 | RunLoop::~RunLoop() {} 10 | 11 | void RunLoop::Run() { 12 | bool keep_running = true; 13 | TimePoint next_flutter_event_time = TimePoint::clock::now(); 14 | while (keep_running) { 15 | std::chrono::nanoseconds wait_duration = 16 | std::max(std::chrono::nanoseconds(0), 17 | next_flutter_event_time - TimePoint::clock::now()); 18 | ::MsgWaitForMultipleObjects( 19 | 0, nullptr, FALSE, static_cast(wait_duration.count() / 1000), 20 | QS_ALLINPUT); 21 | bool processed_events = false; 22 | MSG message; 23 | // All pending Windows messages must be processed; MsgWaitForMultipleObjects 24 | // won't return again for items left in the queue after PeekMessage. 25 | while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) { 26 | processed_events = true; 27 | if (message.message == WM_QUIT) { 28 | keep_running = false; 29 | break; 30 | } 31 | ::TranslateMessage(&message); 32 | ::DispatchMessage(&message); 33 | // Allow Flutter to process messages each time a Windows message is 34 | // processed, to prevent starvation. 35 | next_flutter_event_time = 36 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 37 | } 38 | // If the PeekMessage loop didn't run, process Flutter messages. 39 | if (!processed_events) { 40 | next_flutter_event_time = 41 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 42 | } 43 | } 44 | } 45 | 46 | void RunLoop::RegisterFlutterInstance( 47 | flutter::FlutterEngine* flutter_instance) { 48 | flutter_instances_.insert(flutter_instance); 49 | } 50 | 51 | void RunLoop::UnregisterFlutterInstance( 52 | flutter::FlutterEngine* flutter_instance) { 53 | flutter_instances_.erase(flutter_instance); 54 | } 55 | 56 | RunLoop::TimePoint RunLoop::ProcessFlutterMessages() { 57 | TimePoint next_event_time = TimePoint::max(); 58 | for (auto instance : flutter_instances_) { 59 | std::chrono::nanoseconds wait_duration = instance->ProcessMessages(); 60 | if (wait_duration != std::chrono::nanoseconds::max()) { 61 | next_event_time = 62 | std::min(next_event_time, TimePoint::clock::now() + wait_duration); 63 | } 64 | } 65 | return next_event_time; 66 | } 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | 6 | # Glory Todo Desktop 7 | 8 | Basic and Primitive Flutter Desktop Project! 9 | 10 | ## Goal 11 | > My goal is to accept my inexperience without worrying about the plugin shortcomings of Flutter Desktop. Creating a simple application to solve my own problems. Because no mission app meets exactly what I need. That's why I decided to do my best. I would be very happy if you try the first decisions when I reach the release. If you like it, don't forget to give stars! 12 | ## Screenshoot [10.02.2021] 13 | ![Onboarding Screen1](https://github.com/yessGlory17/glory_todo_desktop/blob/main/screenshoots/Ekran%20Al%C4%B1nt%C4%B1s%C4%B1.JPG) 14 | ![Onboarding Screen1](https://github.com/yessGlory17/glory_todo_desktop/blob/main/screenshoots/Ekran%20Al%C4%B1nt%C4%B1s%C4%B12.JPG) 15 | ![Onboarding Screen1](https://github.com/yessGlory17/glory_todo_desktop/blob/main/screenshoots/Ekran%20Al%C4%B1nt%C4%B1s%C4%B13.JPG) 16 | ![Onboarding Screen1](https://github.com/yessGlory17/glory_todo_desktop/blob/main/screenshoots/Ekran%20Al%C4%B1nt%C4%B1s%C4%B14.JPG) 17 | 18 | 19 | ## Todos 20 | ### 0.1.0 21 | > Target Date 10.02.2021 => Done 10.02.2021 22 | - [x] Primitive Storage 23 | - [x] Basic Design 24 | - [x] Create Project Page 25 | - [x] Create Column Page 26 | - [x] Create Todo 27 | ### 0.2.0 28 | > Target Date 15.02.2021 => Done 11.02.2021 29 | - [x] Remove Project 30 | - [x] Remove Column 31 | - [x] Check Todo 32 | - [x] Edit Project Name 33 | - [x] Edit Column Name 34 | 35 | ### 0.3.0 36 | > Target Date 21.04.2021 37 | - [x] Language Support (ENG & TR) 38 | - [ ] Theme Support 39 | - [ ] New State Managment 40 | 41 | 42 | ### 0.4.0 43 | > Target Date 25.04.2021 44 | - [ ] Progressbar for Projects 45 | - [ ] Reorderable Columns 46 | 47 | ## Getting Started 48 | 49 | This project is a starting point for a Flutter application. 50 | 51 | A few resources to get you started if this is your first Flutter project: 52 | 53 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 54 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 55 | 56 | For help getting started with Flutter, view our 57 | [online documentation](https://flutter.dev/docs), which offers tutorials, 58 | samples, guidance on mobile development, and a full API reference. 59 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/core/components/TodoWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glory_todo_desktop/core/GloryIcons/GloryIcons.dart'; 3 | import 'package:glory_todo_desktop/core/JsonManager/JsonManager.dart'; 4 | import 'ColumnWidget.dart'; 5 | 6 | class TodoWidget extends StatefulWidget { 7 | bool isNight; 8 | String todo; 9 | bool isTodoCheck; 10 | 11 | int projectId; 12 | String projectName; 13 | 14 | int columnId; 15 | String columnName; 16 | 17 | int todoId; 18 | final Function() updateTodos; 19 | TodoWidget( 20 | this.todo, 21 | this.isTodoCheck, 22 | this.isNight, 23 | this.projectId, 24 | this.projectName, 25 | this.columnId, 26 | this.columnName, 27 | this.todoId, 28 | this.updateTodos); 29 | @override 30 | _TodoWidgetState createState() => _TodoWidgetState(); 31 | } 32 | 33 | class _TodoWidgetState extends State { 34 | @override 35 | Widget build(BuildContext context) { 36 | String todo = widget.todo; 37 | return Card( 38 | color: widget.isNight ? Color(0xFF18191c) : Color(0xFFf5f6fc), 39 | child: ListTile( 40 | leading: IconButton( 41 | icon: Icon( 42 | widget.isTodoCheck 43 | ? GloryIcons.check_circle 44 | : GloryIcons.circle_empty, 45 | color: 46 | setTodoColor(), //widget.isNight ? Colors.white60 : Colors.black87, 47 | ), 48 | onPressed: () { 49 | setState(() { 50 | widget.isTodoCheck != widget.isNight; 51 | print("B A S I L D I" + widget.isTodoCheck.toString()); 52 | 53 | updateTodo(widget.projectId, widget.projectName, widget.columnId, 54 | widget.columnName, widget.todoId, widget.todo); 55 | widget.updateTodos(); 56 | //Tıklanan görevi bul. 57 | 58 | //Görevi değiştir 59 | 60 | //Yerine yeni görevi ekle 61 | }); 62 | }, 63 | ), 64 | title: Text( 65 | todo, 66 | style: TextStyle( 67 | color: setTodoColor(), 68 | decoration: widget.isTodoCheck 69 | ? TextDecoration.lineThrough 70 | : TextDecoration.none), 71 | ), 72 | ), 73 | ); 74 | } 75 | 76 | Color setTodoColor() { 77 | if (widget.isNight && widget.isTodoCheck) { 78 | return Colors.greenAccent[400]; 79 | } else if (!widget.isNight && widget.isTodoCheck) { 80 | return Colors.greenAccent[400]; 81 | } else if (!widget.isNight && !widget.isTodoCheck) { 82 | return Colors.black87; 83 | } else { 84 | return Colors.white60; 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: glory_todo_desktop 2 | description: Open source todo app. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | synchronized: ^2.2.0+2 27 | icon_shadow: ^1.0.1 28 | path_provider_windows: ^0.0.4+3 29 | bitsdojo_window: ^0.0.3 30 | flutter_svg: ^0.19.2+1 31 | 32 | # The following adds the Cupertino Icons font to your application. 33 | # Use with the CupertinoIcons class for iOS style icons. 34 | cupertino_icons: ^1.0.2 35 | 36 | dev_dependencies: 37 | flutter_test: 38 | sdk: flutter 39 | page_transition: ^1.1.7+6 40 | # For information on the generic Dart part of this file, see the 41 | # following page: https://dart.dev/tools/pub/pubspec 42 | 43 | # The following section is specific to Flutter. 44 | flutter: 45 | 46 | # The following line ensures that the Material Icons font is 47 | # included with your application, so that you can use the icons in 48 | # the material Icons class. 49 | uses-material-design: true 50 | 51 | # To add assets to your application, add an assets section, like this: 52 | assets: 53 | - assets/logo.png 54 | - assets/glory_todo_desktop.db 55 | - assets/test.json 56 | - assets/storage.json 57 | - assets/settings.json 58 | # - images/a_dot_ham.jpeg 59 | 60 | # An image asset can refer to one or more resolution-specific "variants", see 61 | # https://flutter.dev/assets-and-images/#resolution-aware. 62 | 63 | # For details regarding adding assets from package dependencies, see 64 | # https://flutter.dev/assets-and-images/#from-packages 65 | 66 | # To add custom fonts to your application, add a fonts section here, 67 | # in this "flutter" section. Each entry in this list should have a 68 | # "family" key with the font family name, and a "fonts" key with a 69 | # list giving the asset and other descriptors for the font. For 70 | # example: 71 | fonts: 72 | - family: GloryIcons 73 | fonts: 74 | - asset: fonts/GloryIcons.ttf 75 | # - asset: fonts/Schyler-Italic.ttf 76 | # style: italic 77 | # - family: Trajan Pro 78 | # fonts: 79 | # - asset: fonts/TrajanPro.ttf 80 | # - asset: fonts/TrajanPro_Bold.ttf 81 | # weight: 700 82 | # 83 | # For details regarding fonts from package dependencies, 84 | # see https://flutter.dev/custom-fonts/#from-packages 85 | -------------------------------------------------------------------------------- /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", "A new Flutter project." "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "glory_todo_desktop" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2021 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "glory_todo_desktop.exe" "\0" 98 | VALUE "ProductName", "glory_todo_desktop" "\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 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(glory_todo_desktop LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "glory_todo_desktop") 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.15) 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 | -------------------------------------------------------------------------------- /lib/core/components/Table.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glory_todo_desktop/Pages/TodosPage.dart'; 3 | import 'package:glory_todo_desktop/core/GloryIcons/GloryIcons.dart'; 4 | import 'package:glory_todo_desktop/core/models/Column.dart'; 5 | import 'package:glory_todo_desktop/core/models/Project.dart'; 6 | import 'package:glory_todo_desktop/core/models/Settings.dart'; 7 | import 'package:glory_todo_desktop/core/JsonManager/JsonManager.dart'; 8 | import 'package:page_transition/page_transition.dart'; 9 | 10 | class TabloWidget extends StatefulWidget { 11 | bool isNight; 12 | String tableHeader; 13 | int projectId; 14 | String projectName; 15 | final Function updateProjectsW; 16 | final Function refreshSettings; 17 | List settings; 18 | TabloWidget(this.isNight, this.tableHeader, this.projectId, this.projectName, 19 | this.updateProjectsW, this.refreshSettings, this.settings); 20 | 21 | @override 22 | _TabloWidgetState createState() => _TabloWidgetState(); 23 | } 24 | 25 | class _TabloWidgetState extends State { 26 | double checkedCount = 0; 27 | double noneCheckedCount = 0; 28 | double progresValue = 0.0; 29 | 30 | updateProgressBar() { 31 | countTodos(widget.projectId, widget.projectName).then((value) { 32 | print("GÖREV SAYISIIII ==============> " + value.toString()); 33 | checkedCount = value[0].toDouble() != null ? value[0].toDouble() : 0; 34 | print("Yapılan Görev Sayisi :" + checkedCount.toString()); 35 | 36 | noneCheckedCount = 37 | value[1].toDouble() != null ? value[1].toDouble() : 0.0; 38 | 39 | print("Yapılmayan Görev Sayisi : " + noneCheckedCount.toString()); 40 | 41 | print( 42 | "----------------------------Progress Bar Güncellendi!------------------------------------"); 43 | 44 | setState(() { 45 | progresValue = 46 | (checkedCount / (checkedCount + noneCheckedCount)).toDouble() != 47 | null 48 | ? (checkedCount / (checkedCount + noneCheckedCount)).toDouble() 49 | : 0.0; 50 | }); 51 | 52 | print("Progresbar Value ================> " + progresValue.toString()); 53 | }); 54 | } 55 | 56 | List settings; 57 | @override 58 | void initState() { 59 | // TODO: implement initState 60 | super.initState(); 61 | setState(() { 62 | updateProgressBar(); 63 | }); 64 | } 65 | 66 | void refreshSettings() { 67 | readSettings().then((value) { 68 | settings = value; 69 | }); 70 | } 71 | 72 | @override 73 | Widget build(BuildContext context) { 74 | widget.refreshSettings(); 75 | return GestureDetector( 76 | key: ValueKey(widget.projectName), 77 | onTap: () { 78 | Navigator.push( 79 | context, 80 | PageTransition( 81 | type: PageTransitionType.rightToLeftWithFade, 82 | //alignment: Alignment.bottomRight, 83 | child: TodosPage( 84 | widget.isNight, 85 | widget.tableHeader, 86 | widget.projectId, 87 | widget.projectName, 88 | widget.updateProjectsW, 89 | updateProgressBar, 90 | this.refreshSettings, 91 | this.settings))); 92 | }, 93 | child: Container( 94 | margin: EdgeInsets.symmetric(vertical: 20, horizontal: 10), 95 | width: 250, 96 | height: 150, 97 | decoration: BoxDecoration( 98 | boxShadow: [ 99 | BoxShadow( 100 | color: widget.settings != null 101 | ? widget.settings[0].colorMode == "Dark" 102 | ? Colors.black26 103 | : Colors.grey.shade300 104 | : Colors.black26, 105 | 106 | blurRadius: 5, 107 | offset: Offset(0, 2), // changes position of shadow 108 | ), 109 | ], 110 | color: widget.settings != null 111 | ? widget.settings[0].colorMode == "Dark" 112 | ? Color(0xFF1c1d21) 113 | : Color(0xFFd7d8de) 114 | : Color(0xFF1c1d21), 115 | borderRadius: BorderRadius.circular(15)), 116 | child: Column( 117 | children: [ 118 | Padding( 119 | padding: const EdgeInsets.symmetric(vertical: 70.0), 120 | child: Text(widget.tableHeader, 121 | style: TextStyle( 122 | fontFamily: "Roboto", 123 | fontWeight: FontWeight.w300, 124 | fontSize: 22, 125 | color: widget.isNight ? Colors.white : Colors.black, 126 | )), 127 | ), 128 | Container( 129 | width: 200, 130 | margin: EdgeInsets.symmetric(vertical: 5), 131 | child: checkProjectIsComplate(), 132 | decoration: BoxDecoration( 133 | borderRadius: BorderRadius.all(Radius.circular(10)), 134 | ), 135 | ), 136 | ], 137 | ), 138 | ), 139 | ); 140 | } 141 | 142 | setColor() {} 143 | 144 | Widget checkProjectIsComplate() { 145 | if (progresValue == 1) { 146 | return Icon( 147 | Icons.check, 148 | color: Colors.greenAccent[400], 149 | size: 40, 150 | ); 151 | } else { 152 | return LinearProgressIndicator( 153 | value: progresValue.isNaN ? 0.0 : progresValue, 154 | backgroundColor: Color(0x4D131111), 155 | minHeight: 6, 156 | valueColor: AlwaysStoppedAnimation(Colors.greenAccent[400]), 157 | ); 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /lib/Pages/SettingsPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glory_todo_desktop/core/JsonManager/JsonManager.dart'; 3 | import 'package:glory_todo_desktop/core/models/Settings.dart'; 4 | import 'package:glory_todo_desktop/core/Lang/Lang.dart'; 5 | 6 | class SettingsPage extends StatefulWidget { 7 | bool isNight; 8 | String lang = "Türkçe"; 9 | SettingsPage(this.isNight); 10 | 11 | @override 12 | _SettingsPageState createState() => _SettingsPageState(); 13 | } 14 | 15 | class _SettingsPageState extends State { 16 | List settings; 17 | 18 | void refreshSettings() { 19 | readSettings().then((value) { 20 | settings = value; 21 | }); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | List backgroundColorGradient = setModeColor(settings != null 27 | ? settings[0].colorMode == "Dark" 28 | ? true 29 | : false 30 | : true); 31 | return Scaffold( 32 | appBar: AppBar( 33 | elevation: 0.2, 34 | title: Image.asset( 35 | "assets/logo.png", 36 | width: 35, 37 | fit: BoxFit.contain, 38 | isAntiAlias: true, 39 | ), 40 | leading: IconButton( 41 | icon: Icon( 42 | Icons.arrow_back_ios_outlined, 43 | color: widget.isNight ? Colors.white70 : Color(0xFF212121), 44 | ), 45 | onPressed: () { 46 | Navigator.pop(context); 47 | }), 48 | actions: [], 49 | backgroundColor: settings != null 50 | ? settings[0].colorMode == "Dark" 51 | ? Color(0xFF141518) 52 | : Color(0xFFedeef5) 53 | : Color(0xFF141518), 54 | ), 55 | backgroundColor: Colors.transparent, 56 | body: Container( 57 | width: MediaQuery.of(context).size.width, 58 | height: MediaQuery.of(context).size.height, 59 | decoration: BoxDecoration( 60 | gradient: LinearGradient( 61 | begin: Alignment.topCenter, 62 | end: Alignment.bottomCenter, 63 | colors: [ 64 | backgroundColorGradient[0], backgroundColorGradient[1] 65 | // Color(0xFF141518), 66 | // Color(0xFF191b1f), 67 | ])), 68 | child: Column( 69 | children: [ 70 | Container( 71 | margin: EdgeInsets.only(top: 20), 72 | width: 500, 73 | height: 500, 74 | //color: Colors.blueAccent, 75 | child: Column( 76 | children: [ 77 | //Gece Gündüz Modu Ayarı 78 | Row( 79 | mainAxisAlignment: MainAxisAlignment.center, 80 | children: [ 81 | Text( 82 | settings != null 83 | ? settings[0].language == "English" 84 | ? Lang.english["settingsColorMode"] 85 | : Lang.turkce["settingsColorMode"] 86 | : "Color Mode ", 87 | style: TextStyle( 88 | fontSize: 20, 89 | fontFamily: "Roboto", 90 | fontWeight: FontWeight.w500, 91 | color: widget.isNight 92 | ? Colors.white60 93 | : Colors.black54), 94 | ), 95 | IconButton( 96 | icon: Icon(Icons.nightlight_round), 97 | color: settings != null 98 | ? settings[0].colorMode == "Dark" 99 | ? Colors.white54 100 | : Colors.yellow.shade300 101 | : Colors.white54, 102 | iconSize: 20, 103 | onPressed: () { 104 | setState(() { 105 | setChangeColorMode(); 106 | refreshSettings(); 107 | }); 108 | }, 109 | ) 110 | ], 111 | ), 112 | 113 | //Dil Ayarı 114 | Row( 115 | mainAxisAlignment: MainAxisAlignment.center, 116 | children: [ 117 | Text( 118 | settings != null 119 | ? settings[0].language == "English" 120 | ? Lang.english["settingsLangMode"] 121 | : Lang.turkce["settingsLangMode"] 122 | : "Language Option :", 123 | style: TextStyle( 124 | fontSize: 20, 125 | fontFamily: "Roboto", 126 | fontWeight: FontWeight.w500, 127 | color: widget.isNight 128 | ? Colors.white60 129 | : Colors.black54), 130 | ), 131 | RaisedButton( 132 | color: Colors.transparent, 133 | child: Text( 134 | settings != null 135 | ? settings[0].language == "Turkish" 136 | ? "Turkish" 137 | : "English" 138 | : "English", 139 | style: TextStyle( 140 | fontSize: 20, 141 | fontFamily: "Roboto", 142 | fontWeight: FontWeight.w500, 143 | color: widget.isNight 144 | ? Colors.white60 145 | : Colors.black54)), 146 | onPressed: () { 147 | setState(() { 148 | setLanguage(); 149 | refreshSettings(); 150 | }); 151 | }, 152 | ) 153 | ], 154 | ), 155 | ], 156 | ), 157 | ), 158 | ], 159 | )), 160 | ); 161 | } 162 | 163 | List setModeColor(bool isNight) { 164 | switch (isNight) { 165 | case true: 166 | { 167 | return [Color(0xFF141518), Color(0xFF191b1f)]; 168 | } 169 | break; 170 | case false: 171 | { 172 | return [Color(0xFFedeef5), Color(0xFFe9eaf5)]; 173 | } 174 | break; 175 | } 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /assets/storage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "projectID": 1, 4 | "projectName": "GLORY TODO APP", 5 | "columns": [ 6 | { 7 | "columnId": 1, 8 | "columnName": "USER INTERFACE", 9 | "todos": [ 10 | { 11 | "todoId": 1, 12 | "todo": "TRANSİTİON ANİMATİONS", 13 | "isCheck": false 14 | }, 15 | { 16 | "todoId": 2, 17 | "todo": "NEW PURE DESİGN", 18 | "isCheck": false 19 | }, 20 | { 21 | "todoId": 3, 22 | "todo": "REORDERABLE COLUMNS", 23 | "isCheck": false 24 | } 25 | ] 26 | }, 27 | { 28 | "columnId": 2, 29 | "columnName": "FİLE OPERATİONS", 30 | "todos": [ 31 | { 32 | "todoId": 1, 33 | "todo": "CREATE STORAGE FİLE", 34 | "isCheck": true 35 | }, 36 | { 37 | "todoId": 2, 38 | "todo": "ADD PROJECT", 39 | "isCheck": true 40 | }, 41 | { 42 | "todoId": 3, 43 | "todo": "ADD COLUMN", 44 | "isCheck": true 45 | }, 46 | { 47 | "todoId": 4, 48 | "todo": "ADD TODO", 49 | "isCheck": true 50 | }, 51 | { 52 | "todoId": 5, 53 | "todo": "REMOVE PROJECT", 54 | "isCheck": true 55 | }, 56 | { 57 | "todoId": 6, 58 | "todo": "CHECK TODO", 59 | "isCheck": true 60 | }, 61 | { 62 | "todoId": 7, 63 | "todo": "REMOVE COLUMN", 64 | "isCheck": false 65 | }, 66 | { 67 | "todoId": 8, 68 | "todo": "EDİT PROJECT NAME", 69 | "isCheck": true 70 | }, 71 | { 72 | "todoId": 9, 73 | "todo": "EDİT COLUMN NAME", 74 | "isCheck": false 75 | } 76 | ] 77 | }, 78 | { 79 | "columnId": 3, 80 | "columnName": "DESİNG", 81 | "todos": [ 82 | { 83 | "todoId": 1, 84 | "todo": "PURE BACKGROUND DESİGN", 85 | "isCheck": false 86 | }, 87 | { 88 | "todoId": 2, 89 | "todo": "FİND LİGHT MODE COLORS", 90 | "isCheck": false 91 | } 92 | ] 93 | }, 94 | { 95 | "columnId": 4, 96 | "columnName": "BUGS", 97 | "todos": [ 98 | { 99 | "todoId": 1, 100 | "todo": "SHOW DİALOG INPUT TEXT COLOR", 101 | "isCheck": false 102 | } 103 | ] 104 | }, 105 | { 106 | "columnId": 5, 107 | "columnName": "FEATURES", 108 | "todos": [ 109 | { 110 | "todoId": 1, 111 | "todo": "PROGRESS BAR YAPILACAK", 112 | "isCheck": false 113 | }, 114 | { 115 | "todoId": 2, 116 | "todo": "KOLON SİLME", 117 | "isCheck": false 118 | }, 119 | { 120 | "todoId": 3, 121 | "todo": "GÜNDÜZ MODU YAPILACAK", 122 | "isCheck": false 123 | } 124 | ] 125 | }, 126 | { 127 | "columnId": 6, 128 | "columnName": "TESTS", 129 | "todos": [] 130 | } 131 | ] 132 | }, 133 | { 134 | "projectID": 2, 135 | "projectName": "YAPILACAKLAR", 136 | "columns": [ 137 | { 138 | "columnId": 1, 139 | "columnName": "EKLENECEKLER", 140 | "todos": [ 141 | { 142 | "todoId": 1, 143 | "todo": "İLERLEME GÖSTERME", 144 | "isCheck": false 145 | }, 146 | { 147 | "todoId": 2, 148 | "todo": "KOLON SÜRÜKLEME", 149 | "isCheck": false 150 | }, 151 | { 152 | "todoId": 3, 153 | "todo": "GÖREV SÜRÜKLEME VE KOLONLAR ARASAINDA GEZDİRME", 154 | "isCheck": false 155 | }, 156 | { 157 | "todoId": 4, 158 | "todo": "SADE GÜNDÜZ MODU", 159 | "isCheck": false 160 | } 161 | ] 162 | }, 163 | { 164 | "columnId": 2, 165 | "columnName": "DÜZELTİLECEKLER", 166 | "todos": [ 167 | { 168 | "todoId": 1, 169 | "todo": "GÖREV GİRME RENGİ DÜZELT", 170 | "isCheck": false 171 | } 172 | ] 173 | }, 174 | { 175 | "columnId": 3, 176 | "columnName": "KOD DA DÜZELTMELER", 177 | "todos": [ 178 | { 179 | "todoId": 1, 180 | "todo": "GEREKSİZ YORUMLARI SİL", 181 | "isCheck": false 182 | }, 183 | { 184 | "todoId": 2, 185 | "todo": "TÜRKÇE SATIRLARI İNGİLİZCEYE ÇEVİR", 186 | "isCheck": false 187 | } 188 | ] 189 | } 190 | ] 191 | }, 192 | { 193 | "projectID": 3, 194 | "projectName": "DGS", 195 | "columns": [ 196 | { 197 | "columnId": 1, 198 | "columnName": "KONULAR", 199 | "todos": [] 200 | }, 201 | { 202 | "columnId": 2, 203 | "columnName": "TESTLER", 204 | "todos": [] 205 | }, 206 | { 207 | "columnId": 3, 208 | "columnName": "TEKRAR", 209 | "todos": [] 210 | } 211 | ] 212 | } 213 | ] -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/Pages/ProjectPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glory_todo_desktop/Pages/SettingsPage.dart'; 3 | import 'package:glory_todo_desktop/core/components/Table.dart'; 4 | import 'package:glory_todo_desktop/core/models/Column.dart'; 5 | import 'dart:convert'; 6 | import 'package:glory_todo_desktop/core/models/Todo.dart'; 7 | import 'package:glory_todo_desktop/core/models/Project.dart'; 8 | import 'package:glory_todo_desktop/core/models/Settings.dart'; 9 | import 'package:glory_todo_desktop/core/Lang/Lang.dart'; 10 | import 'dart:math'; 11 | import 'package:glory_todo_desktop/core/JsonManager/JsonManager.dart'; 12 | import 'package:page_transition/page_transition.dart'; 13 | 14 | class ProjectPage extends StatefulWidget { 15 | @override 16 | _ProjectPageState createState() => _ProjectPageState(); 17 | } 18 | 19 | class _ProjectPageState extends State { 20 | bool isNight = true; 21 | Color geceArkaPlan = Colors.black; 22 | Color geceOnPlan = Color(0xFF212121); 23 | 24 | var projeBaslik = TextEditingController(); 25 | int tablesIndexCount = 0; 26 | Future> tables = readProjects(); 27 | List settings; 28 | 29 | void updateProjectsWidgets() { 30 | setState(() { 31 | tables = readProjects(); 32 | }); 33 | } 34 | 35 | void refreshSettings() { 36 | readSettings().then((value) { 37 | settings = value; 38 | }); 39 | } 40 | 41 | @override 42 | void initState() { 43 | // TODO: implement initState 44 | super.initState(); 45 | tables = readProjects(); 46 | 47 | tables.then((value) => tablesIndexCount = value.length); 48 | } 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | double gridCount = MediaQuery.of(context).size.width / 300; 53 | print("PROJE SAYFASIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"); 54 | List backgroundColorGradient = 55 | setModeColor(settings != null ? settings[0].colorMode : "Dark"); 56 | refreshSettings(); 57 | return Scaffold( 58 | appBar: AppBar( 59 | elevation: 0.2, 60 | title: Image.asset( 61 | "assets/logo.png", 62 | width: 35, 63 | fit: BoxFit.contain, 64 | isAntiAlias: true, 65 | ), 66 | backgroundColor: settings != null 67 | ? settings[0].colorMode == "Dark" 68 | ? Color(0xFF141518) 69 | : Color(0xFFedeef5) 70 | : Color(0xFF141518), 71 | actions: [ 72 | IconButton( 73 | icon: Icon( 74 | Icons.settings, 75 | color: settings != null 76 | ? settings[0].colorMode == "Dark" 77 | ? Colors.white54 78 | : Colors.black54 79 | : Colors.white54, 80 | ), 81 | onPressed: () { 82 | Navigator.push( 83 | context, 84 | PageTransition( 85 | type: PageTransitionType.rightToLeftWithFade, 86 | child: SettingsPage(isNight))); 87 | }), 88 | IconButton( 89 | icon: Icon( 90 | Icons.nightlight_round, 91 | color: settings != null 92 | ? settings[0].colorMode == "Dark" 93 | ? Colors.white54 94 | : Colors.yellow.shade300 95 | : Colors.white54, 96 | ), 97 | onPressed: () { 98 | setState(() { 99 | setChangeColorMode(); 100 | refreshSettings(); 101 | }); 102 | }) 103 | ], 104 | ), 105 | backgroundColor: Colors 106 | .transparent, //isNight ? Color(0xFF191b1f) : Color(0xFFE3E6EB), 107 | floatingActionButton: FloatingActionButton.extended( 108 | backgroundColor: Color(0xFF0DC472), 109 | icon: Icon(Icons.add), 110 | label: Text( 111 | settings != null 112 | ? settings[0].language == "English" 113 | ? Lang.english["projectPageCreateButton"] 114 | : Lang.turkce["projectPageCreateButton"] 115 | : "Create!", 116 | style: TextStyle( 117 | fontFamily: "Roboto", 118 | fontWeight: FontWeight.w400, 119 | fontSize: 18), 120 | ), 121 | onPressed: () { 122 | setState(() { 123 | showDialog( 124 | context: context, 125 | builder: (BuildContext context) { 126 | return new AlertDialog( 127 | title: Text( 128 | settings != null 129 | ? settings[0].language == "English" 130 | ? Lang.english["newProjectHeader"] 131 | : Lang.turkce["newProjectHeader"] 132 | : "New Project Name?", 133 | style: TextStyle( 134 | color: settings != null 135 | ? settings[0].colorMode == "Dark" 136 | ? Colors.white54 137 | : Colors.black54 138 | : Colors.white54, 139 | ), 140 | ), 141 | content: TextFormField( 142 | controller: projeBaslik, 143 | style: TextStyle( 144 | color: isNight ? Colors.white : Colors.black), 145 | decoration: InputDecoration( 146 | hintText: "Proje Adını Giriniz", 147 | hintStyle: TextStyle( 148 | color: settings != null 149 | ? settings[0].colorMode == "Dark" 150 | ? Colors.white54 151 | : Colors.black54 152 | : Colors.white54, 153 | )), 154 | ), 155 | backgroundColor: settings != null 156 | ? settings[0].colorMode == "Dark" 157 | ? geceOnPlan 158 | : Color(0xFFf1f2f6) 159 | : geceOnPlan, 160 | actions: [ 161 | Center( 162 | child: FlatButton( 163 | color: Colors.green.shade400, 164 | onPressed: () { 165 | setState(() { 166 | print("DİL TESTİİİİİİİİİ =============> " + 167 | Lang.turkce["projectPageCreateButton"]); 168 | addProject(new Project( 169 | tablesIndexCount + 1, 170 | projeBaslik.text, 171 | List.generate( 172 | 0, 173 | (index) => ProjectColumn( 174 | 1, 175 | "", 176 | List.generate( 177 | 0, 178 | (index) => 179 | Todo(1, "", false)))))); 180 | 181 | tables = readProjects(); 182 | tables.then( 183 | (value) => tablesIndexCount = value.length); 184 | print("T ================> " + 185 | tables.toString()); 186 | projeBaslik.clear(); 187 | Navigator.pop(context); 188 | }); 189 | }, 190 | child: Container( 191 | child: Text( 192 | settings != null 193 | ? settings[0].language == "English" 194 | ? Lang 195 | .english["projectPageCreateButton"] 196 | : Lang.turkce["projectPageCreateButton"] 197 | : "Oluştur", 198 | style: TextStyle(color: Colors.white), 199 | ), 200 | ), 201 | ), 202 | ) 203 | ], 204 | ); 205 | }); 206 | }); 207 | }, 208 | ), 209 | body: Container( 210 | width: MediaQuery.of(context).size.width, 211 | height: MediaQuery.of(context).size.height, 212 | decoration: BoxDecoration( 213 | gradient: LinearGradient( 214 | begin: Alignment.topCenter, 215 | end: Alignment.bottomCenter, 216 | colors: [ 217 | backgroundColorGradient[0], backgroundColorGradient[1] 218 | // Color(0xFF141518), 219 | // Color(0xFF191b1f), 220 | ])), 221 | child: FutureBuilder( 222 | future: tables, 223 | builder: (context, snapshot) { 224 | //print("SONUC : " + snapshot.data[0]); 225 | List projects = snapshot.data ?? []; 226 | print("PROJELER => " + projects.toString()); 227 | if (projects.length > 0) { 228 | print("PROJECT : " + projects[0].projectName); 229 | tables.then((value) => tablesIndexCount = value.length); 230 | } 231 | return GridView.builder( 232 | itemCount: projects.length, 233 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 234 | crossAxisCount: gridCount.round(), 235 | ), 236 | itemBuilder: (BuildContext context, int index) { 237 | return new TabloWidget( 238 | isNight, 239 | projects[index].projectName, 240 | projects[index].projectID, 241 | projects[index].projectName, 242 | updateProjectsWidgets, 243 | refreshSettings, 244 | this.settings); 245 | //print("YAZ :=> " + data.toString()); 246 | }, 247 | ); 248 | }, 249 | ))); 250 | } 251 | 252 | int _randomId() { 253 | var rand = Random().nextInt(1000000 - 10000); 254 | return rand; 255 | } 256 | 257 | List setModeColor(String isNight) { 258 | if (settings != null) { 259 | switch (isNight) { 260 | case "Dark": 261 | { 262 | return [Color(0xFF141518), Color(0xFF191b1f)]; 263 | } 264 | break; 265 | case "Light": 266 | { 267 | return [Color(0xFFedeef5), Color(0xFFe9eaf5)]; 268 | } 269 | break; 270 | } 271 | } else { 272 | return [Color(0xFF141518), Color(0xFF191b1f)]; 273 | } 274 | } 275 | } 276 | -------------------------------------------------------------------------------- /lib/core/components/ColumnWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glory_todo_desktop/Pages/TodosPage.dart'; 3 | import 'package:glory_todo_desktop/core/JsonManager/JsonManager.dart'; 4 | import 'package:glory_todo_desktop/core/Lang/Lang.dart'; 5 | import 'package:glory_todo_desktop/core/components/ColumnPopUpMenu.dart'; 6 | import 'package:glory_todo_desktop/core/components/TodoWidget.dart'; 7 | import 'package:glory_todo_desktop/core/models/Column.dart'; 8 | import 'package:glory_todo_desktop/core/models/Project.dart'; 9 | import 'package:glory_todo_desktop/core/models/Settings.dart'; 10 | import 'package:glory_todo_desktop/core/models/Todo.dart'; 11 | 12 | /* 13 | 14 | BU SAYFADA KOLONLAR VE HER KOLONA AİT GÖREVLER YER ALIYOR. 15 | 16 | */ 17 | 18 | class ColumnWidget extends StatefulWidget { 19 | bool isNight; 20 | String tableHeader; 21 | int columnId; 22 | String columnName; 23 | int projectId; 24 | String projectName; 25 | final Function updateColumns; 26 | ColumnWidget(this.isNight, this.tableHeader, this.projectId, this.projectName, 27 | this.columnId, this.columnName, this.updateColumns); 28 | 29 | @override 30 | _ColumnWidgetState createState() => _ColumnWidgetState(); 31 | } 32 | 33 | class _ColumnWidgetState extends State { 34 | var todoTextKey = GlobalKey(); 35 | var gorevEklemeKontrol = TextEditingController(); 36 | var columnEditControl = TextEditingController(); 37 | int todoCounter = 0; 38 | String todoContent; 39 | Future> gorevlerListe; 40 | List settings; 41 | 42 | void refreshSettings() { 43 | readSettings().then((value) { 44 | settings = value; 45 | }); 46 | } 47 | 48 | void updateTodoList() { 49 | setState(() { 50 | gorevlerListe = findTodos(widget.projectId, widget.projectName, 51 | widget.columnId, widget.columnName); 52 | }); 53 | } 54 | 55 | void remove() { 56 | removeColumn(widget.projectId, widget.projectName, widget.columnId, 57 | widget.columnName); 58 | print("Silindi!"); 59 | setState(() { 60 | widget.updateColumns(); 61 | }); 62 | } 63 | 64 | @override 65 | void initState() { 66 | // TODO: implement initState 67 | super.initState(); 68 | refreshSettings(); 69 | } 70 | 71 | void edit() { 72 | showDialog( 73 | context: context, 74 | builder: (BuildContext context) { 75 | return new AlertDialog( 76 | title: Text( 77 | settings != null 78 | ? settings[0].language == "English" 79 | ? Lang.english["newColumnHeader"] 80 | : Lang.turkce["newColumnHeader"] 81 | : "New Column Name ", 82 | style: TextStyle( 83 | color: widget.isNight ? Colors.white : Colors.black), 84 | ), 85 | content: TextFormField( 86 | controller: columnEditControl, 87 | style: TextStyle( 88 | color: widget.isNight ? Colors.white : Colors.black), 89 | decoration: InputDecoration( 90 | hintText: "Yeni Kolon Adını Giriniz", 91 | hintStyle: TextStyle( 92 | color: widget.isNight ? Colors.white : Colors.black)), 93 | ), 94 | backgroundColor: 95 | widget.isNight ? Color(0xFF212121) : Color(0xFFf1f2f6), 96 | actions: [ 97 | Center( 98 | child: FlatButton( 99 | color: Colors.green.shade400, 100 | onPressed: () { 101 | setState(() { 102 | //updatefunc 103 | updateColumn( 104 | widget.projectId, 105 | widget.projectName, 106 | widget.columnId, 107 | widget.columnName, 108 | columnEditControl.text); 109 | widget.updateColumns(); 110 | gorevlerListe = findTodos( 111 | widget.projectId, 112 | widget.projectName, 113 | widget.columnId, 114 | columnEditControl.text); 115 | widget.columnName = columnEditControl.text; 116 | columnEditControl.clear(); 117 | Navigator.pop(context); 118 | }); 119 | }, 120 | child: Container( 121 | child: Text( 122 | settings != null 123 | ? settings[0].language == "English" 124 | ? Lang.english["editButton"] 125 | : Lang.turkce["editButton"] 126 | : "Edit", 127 | style: TextStyle(color: Colors.white), 128 | ), 129 | ), 130 | ), 131 | ) 132 | ], 133 | ); 134 | }); 135 | print("Editlendi!"); 136 | } 137 | 138 | @override 139 | Widget build(BuildContext context) { 140 | gorevlerListe = findTodos(widget.projectId, widget.projectName, 141 | widget.columnId, widget.columnName); 142 | 143 | //findColumnTodos(widget.tableUnicId); //widget.tableHeader 144 | return Container( 145 | key: ValueKey(widget.projectName), 146 | margin: EdgeInsets.symmetric(vertical: 20, horizontal: 10), 147 | width: 300, 148 | constraints: BoxConstraints( 149 | minHeight: 200, 150 | maxHeight: MediaQuery.of(context).size.height - 50, 151 | ), 152 | decoration: BoxDecoration( 153 | boxShadow: [ 154 | BoxShadow( 155 | color: widget.isNight ? Colors.black12 : Colors.grey.shade300, 156 | 157 | blurRadius: 6, 158 | offset: Offset(0, 2), // changes position of shadow 159 | ), 160 | ], 161 | color: widget.isNight ? Color(0xFF1f2024) : Color(0xFFd7d8de), 162 | borderRadius: BorderRadius.circular(5)), 163 | child: Column( 164 | children: [ 165 | Padding( 166 | padding: const EdgeInsets.symmetric(vertical: 8.0), 167 | child: Stack( 168 | children: [ 169 | Center( 170 | child: Padding( 171 | padding: const EdgeInsets.symmetric(vertical: 10.0), 172 | child: Text(widget.tableHeader, 173 | style: TextStyle( 174 | fontSize: 20, 175 | color: widget.isNight ? Colors.white : Colors.black, 176 | )), 177 | ), 178 | ), 179 | Positioned( 180 | top: 5, 181 | right: 0, 182 | child: ColumnPopUpMenu(widget.isNight, edit, remove), 183 | ), 184 | ], 185 | ), 186 | ), 187 | 188 | //Buraya Görevler Listesi gelmeli 189 | Container( 190 | width: 300, 191 | height: MediaQuery.of(context).size.height - 225, 192 | child: FutureBuilder( 193 | future: gorevlerListe, 194 | builder: (context, snapshot) { 195 | List listem = snapshot.data ?? []; 196 | if (listem.length > 0) { 197 | todoCounter = listem.length; 198 | print("Görev :==> " + listem[0].todo); 199 | return ListView.builder( 200 | itemCount: listem.length, 201 | itemBuilder: (BuildContext context, int index) { 202 | return TodoWidget( 203 | listem[index].todo, 204 | listem[index].isCheck, 205 | widget.isNight, 206 | widget.projectId, 207 | widget.projectName, 208 | widget.columnId, 209 | widget.columnName, 210 | listem[index].todoId, 211 | updateTodoList); 212 | }); 213 | } else { 214 | print("Herhangi bir görev bulunamadı!"); 215 | return Center( 216 | child: Text( 217 | settings != null 218 | ? settings[0].language == "English" 219 | ? Lang.english["noTodosHeader"] 220 | : Lang.turkce["noTodosHeader"] 221 | : "No task found!", 222 | style: TextStyle( 223 | color: 224 | widget.isNight ? Colors.white60 : Colors.black87), 225 | )); 226 | } 227 | }, 228 | )), 229 | //En altta ekleme butonu bulunmalı 230 | Container( 231 | width: 200, 232 | height: 20, 233 | child: IconButton( 234 | icon: Icon(Icons.add, 235 | color: widget.isNight ? Colors.white : Colors.black), 236 | onPressed: () { 237 | showDialog( 238 | context: context, 239 | builder: (BuildContext context) { 240 | return new AlertDialog( 241 | title: Text( 242 | settings != null 243 | ? settings[0].language == "English" 244 | ? Lang.english["newTodoHeader"] 245 | : Lang.turkce["newTodoHeader"] 246 | : "New Todo Name?", 247 | style: TextStyle( 248 | color: widget.isNight 249 | ? Colors.white 250 | : Colors.black), 251 | ), 252 | content: Form( 253 | key: todoTextKey, 254 | child: TextFormField( 255 | controller: gorevEklemeKontrol, 256 | validator: (value) => 257 | value != null ? null : "Bir görev giriniz.", 258 | onSaved: (value) => todoContent = value, 259 | style: TextStyle( 260 | color: widget.isNight 261 | ? Colors.white 262 | : Colors.black), 263 | decoration: InputDecoration( 264 | hintText: settings != null 265 | ? settings[0].language == "English" 266 | ? Lang.english["newTodoHeader2"] 267 | : Lang.turkce["newTodoHeader2"] 268 | : "New Todo Name?", 269 | hintStyle: TextStyle( 270 | color: widget.isNight 271 | ? Colors.white 272 | : Colors.black)), 273 | ), 274 | ), 275 | backgroundColor: widget.isNight 276 | ? Color(0xFF212121) 277 | : Color(0xFFf1f2f6), 278 | actions: [ 279 | Center( 280 | child: FlatButton( 281 | color: Colors.green.shade400, 282 | onPressed: () { 283 | setState(() { 284 | if (todoTextKey.currentState.validate()) { 285 | todoTextKey.currentState.save(); 286 | 287 | addTodo( 288 | Todo(todoCounter + 1, 289 | gorevEklemeKontrol.text, false), 290 | widget.projectId, 291 | widget.projectName, 292 | widget.columnId, 293 | widget.columnName); 294 | 295 | gorevlerListe = findTodos( 296 | widget.projectId, 297 | widget.projectName, 298 | widget.columnId, 299 | widget.columnName); 300 | gorevEklemeKontrol.clear(); 301 | 302 | Navigator.pop(context); 303 | } 304 | }); 305 | }, 306 | child: Container( 307 | child: Text( 308 | settings != null 309 | ? settings[0].language == "English" 310 | ? Lang.english["addButton"] 311 | : Lang.turkce["addButton"] 312 | : "Add", 313 | style: TextStyle(color: Colors.white), 314 | ), 315 | ), 316 | ), 317 | ) 318 | ], 319 | ); 320 | }); //SetState sonu 321 | })), 322 | ], 323 | ), 324 | ); 325 | } 326 | } 327 | -------------------------------------------------------------------------------- /lib/Pages/TodosPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glory_todo_desktop/core/JsonManager/JsonManager.dart'; 3 | import 'package:glory_todo_desktop/core/Lang/Lang.dart'; 4 | import 'package:glory_todo_desktop/core/components/ColumnWidget.dart'; 5 | import 'package:glory_todo_desktop/core/models/Column.dart'; 6 | import 'dart:io'; 7 | import 'package:glory_todo_desktop/core/components/Table.dart'; 8 | import 'package:glory_todo_desktop/core/models/Settings.dart'; 9 | import 'package:glory_todo_desktop/core/models/Todo.dart'; 10 | import 'package:glory_todo_desktop/core/models/Project.dart'; 11 | 12 | class TodosPage extends StatefulWidget { 13 | bool isNight; 14 | String projectName; 15 | int projectId; 16 | String projecName; 17 | List settings; 18 | final Function() updateProjectWidgets; 19 | final Function() updateProjectProgressBar; 20 | final Function() refreshSettings; 21 | TodosPage( 22 | this.isNight, 23 | this.projectName, 24 | this.projectId, 25 | this.projecName, 26 | this.updateProjectWidgets, 27 | this.updateProjectProgressBar, 28 | this.refreshSettings, 29 | this.settings); 30 | 31 | @override 32 | _TodosPageState createState() => _TodosPageState(); 33 | } 34 | 35 | class _TodosPageState extends State { 36 | var kontroller = TextEditingController(); 37 | Future> kolonListe; 38 | int kolonSayac = 0; 39 | String newProjectName; 40 | var projeAdiDuzenlemeKontroller = TextEditingController(); 41 | List settings; 42 | @override 43 | void initState() { 44 | // TODO: implement initState 45 | super.initState(); 46 | widget.updateProjectProgressBar(); 47 | } 48 | 49 | void updateColumns() { 50 | setState(() { 51 | kolonListe = findColumn(widget.projectId, widget.projecName); 52 | }); 53 | } 54 | 55 | void refreshSettings() { 56 | readSettings().then((value) { 57 | settings = value; 58 | }); 59 | } 60 | 61 | void back() { 62 | setState(() { 63 | widget.updateProjectWidgets(); 64 | Navigator.pop(context); 65 | }); 66 | } 67 | 68 | @override 69 | Widget build(BuildContext context) { 70 | refreshSettings(); 71 | print("Todos Page projectName => " + widget.projecName); 72 | int myIndex = 0; 73 | kolonListe = findColumn(widget.projectId, 74 | widget.projecName); //Buraya JSON üzerinden bulma fonksiyonu gelecek. 75 | kolonListe.then((value) => print("Uzunluk " + value.toString())); 76 | List backgroundColorGradient = setModeColor( 77 | widget.settings != null ? widget.settings[0].colorMode : "Dark"); 78 | return Scaffold( 79 | appBar: AppBar( 80 | backgroundColor: widget.settings != null 81 | ? widget.settings[0].colorMode == "Dark" 82 | ? Color(0xFF141518) 83 | : Color(0xFFedeef5) 84 | : Color(0xFF141518), 85 | leading: IconButton( 86 | icon: Icon( 87 | Icons.arrow_back_ios_outlined, 88 | color: widget.settings != null 89 | ? widget.settings[0].colorMode == "Dark" 90 | ? Colors.white54 91 | : Colors.black54 92 | : Colors.white54, 93 | ), 94 | onPressed: () { 95 | Navigator.pop(context); 96 | }), 97 | title: Text( 98 | "Project : " + widget.projectName, 99 | style: TextStyle( 100 | fontFamily: "Roboto", 101 | fontWeight: FontWeight.w400, 102 | color: widget.isNight ? Colors.white : Color(0xFF212121), 103 | ), 104 | ), 105 | elevation: 0.2, 106 | //widget.isNight ? Color(0xFF141518) : Colors.white, 107 | actions: [ 108 | IconButton( 109 | icon: Icon(Icons.edit), 110 | color: widget.isNight ? Colors.white54 : Colors.black54, 111 | onPressed: () { 112 | setState(() { 113 | showDialog( 114 | context: context, 115 | builder: (BuildContext context) { 116 | return new AlertDialog( 117 | title: Text( 118 | settings != null 119 | ? settings[0].language == "English" 120 | ? Lang.english["editProjectNameHeader"] 121 | : Lang.turkce["editProjectNameHeader"] 122 | : "Edit Project Name", 123 | style: TextStyle( 124 | color: widget.isNight 125 | ? Colors.white 126 | : Colors.black), 127 | ), 128 | content: TextFormField( 129 | style: TextStyle( 130 | color: widget.isNight 131 | ? Colors.white 132 | : Colors.black), 133 | controller: projeAdiDuzenlemeKontroller, 134 | decoration: InputDecoration( 135 | hintText: widget.projecName, 136 | hintStyle: TextStyle( 137 | color: widget.isNight 138 | ? Colors.white 139 | : Colors.black)), 140 | ), 141 | backgroundColor: widget.isNight 142 | ? Color(0xFF212121) 143 | : Color(0xFFf1f2f6), 144 | actions: [ 145 | Center( 146 | child: FlatButton( 147 | color: Colors.green.shade400, 148 | onPressed: () { 149 | setState(() { 150 | updateProject(Project.addNew( 151 | widget.projectId, 152 | projeAdiDuzenlemeKontroller.text)); 153 | //tables = readColumns(); 154 | widget.updateProjectWidgets(); 155 | updateColumns(); 156 | projeAdiDuzenlemeKontroller.clear(); 157 | widget.updateProjectProgressBar(); 158 | Navigator.pop(context); 159 | back(); 160 | }); 161 | }, 162 | child: Container( 163 | child: Text( 164 | settings != null 165 | ? settings[0].language == "English" 166 | ? Lang.english[ 167 | "projectPageCreateButton"] 168 | : Lang.turkce[ 169 | "projectPageCreateButton"] 170 | : "Create", 171 | style: TextStyle(color: Colors.white), 172 | ), 173 | ), 174 | ), 175 | ) 176 | ], 177 | ); 178 | }); 179 | }); 180 | }, 181 | ), 182 | IconButton( 183 | icon: Icon(Icons.delete, color: Colors.redAccent), 184 | onPressed: () { 185 | setState(() { 186 | removeProject(widget.projectId, widget.projecName); 187 | widget.updateProjectWidgets(); 188 | widget.updateProjectProgressBar(); 189 | Navigator.pop(context); 190 | }); 191 | }, 192 | ), 193 | IconButton( 194 | icon: Icon( 195 | Icons.nightlight_round, 196 | color: widget.settings != null 197 | ? widget.settings[0].colorMode == "Dark" 198 | ? Colors.white54 199 | : Colors.yellow.shade300 200 | : Colors.white54, 201 | ), 202 | onPressed: () { 203 | setState(() { 204 | widget.isNight = !widget.isNight; 205 | setChangeColorMode(); 206 | refreshSettings(); 207 | widget.refreshSettings(); 208 | }); 209 | }) 210 | ], 211 | ), 212 | backgroundColor: Colors.white, 213 | floatingActionButton: FloatingActionButton.extended( 214 | icon: Icon(Icons.add), 215 | label: Text(settings != null 216 | ? settings[0].language == "English" 217 | ? Lang.english["todosPageAddButton"] 218 | : Lang.turkce["todosPageAddButton"] 219 | : "New "), 220 | onPressed: () { 221 | setState(() { 222 | showDialog( 223 | context: context, 224 | builder: (BuildContext context) { 225 | return new AlertDialog( 226 | title: Text( 227 | settings != null 228 | ? settings[0].language == "English" 229 | ? Lang.english["newTodoHeader"] 230 | : Lang.turkce["newTodoHeader"] 231 | : "New Column Name :", 232 | style: TextStyle( 233 | color: widget.settings != null 234 | ? widget.settings[0].colorMode == "Dark" 235 | ? Colors.white54 236 | : Colors.black54 237 | : Colors.white54, 238 | ), 239 | ), 240 | content: TextFormField( 241 | style: TextStyle( 242 | color: 243 | widget.isNight ? Colors.white : Colors.black), 244 | controller: kontroller, 245 | decoration: InputDecoration( 246 | hintText: settings != null 247 | ? settings[0].language == "English" 248 | ? Lang.english["newTodoHeader2"] 249 | : Lang.turkce["newTodoHeader2"] 250 | : "New Column Name ", 251 | hintStyle: TextStyle( 252 | color: widget.settings != null 253 | ? widget.settings[0].colorMode == "Dark" 254 | ? Colors.white54 255 | : Colors.black54 256 | : Colors.white54, 257 | )), 258 | ), 259 | backgroundColor: settings != null 260 | ? settings[0].colorMode == "Dark" 261 | ? Color(0xFF212121) 262 | : Color(0xFFf1f2f6) 263 | : Color(0xFF212121), 264 | actions: [ 265 | Center( 266 | child: FlatButton( 267 | color: Colors.green.shade400, 268 | onPressed: () { 269 | setState(() { 270 | addColumn( 271 | new ProjectColumn.addColumnContructor( 272 | kolonSayac + 1, kontroller.text), 273 | widget.projectId, 274 | widget.projecName); 275 | 276 | //tables = readColumns(); 277 | kolonListe = findColumn( 278 | widget.projectId, widget.projecName); 279 | kontroller.clear(); 280 | 281 | Navigator.pop(context); 282 | }); 283 | }, 284 | child: Container( 285 | child: Text( 286 | settings != null 287 | ? settings[0].language == "English" 288 | ? Lang.english[ 289 | "projectPageCreateButton"] 290 | : Lang 291 | .turkce["projectPageCreateButton"] 292 | : "Create", 293 | style: TextStyle(color: Colors.white), 294 | ), 295 | ), 296 | ), 297 | ) 298 | ], 299 | ); 300 | }); 301 | }); 302 | }), 303 | body: Container( 304 | decoration: BoxDecoration( 305 | gradient: LinearGradient( 306 | begin: Alignment.topCenter, 307 | end: Alignment.bottomCenter, 308 | colors: [ 309 | // Color(0xFF141518), 310 | // Color(0xFF191b1f), 311 | backgroundColorGradient[0], backgroundColorGradient[1] 312 | ])), 313 | child: Row( 314 | children: [ 315 | Container( 316 | width: MediaQuery.of(context).size.width, 317 | constraints: BoxConstraints( 318 | minHeight: 200, 319 | maxHeight: MediaQuery.of(context).size.height - 50, 320 | ), 321 | child: FutureBuilder( 322 | future: kolonListe ?? [], 323 | builder: (context, snapshot) { 324 | //print("SONUC : " + snapshot.data[0]); 325 | List projects = snapshot.data ?? []; 326 | if (projects.length > 0) { 327 | print("Column : " + projects[0].columnName); 328 | kolonSayac = projects.length; 329 | return ListView.builder( 330 | key: ValueKey(projects[myIndex].columnName), 331 | scrollDirection: Axis.horizontal, 332 | itemCount: projects.length, 333 | itemBuilder: (BuildContext context, int index) { 334 | //Buradaki Tablo Widget Column Widget İle Değiştirilecek. 335 | return new ColumnWidget( 336 | widget.isNight, 337 | projects[index].columnName, 338 | widget.projectId, 339 | widget.projectName, 340 | projects[index].columnId, 341 | projects[index].columnName, 342 | updateColumns); 343 | //print("YAZ :=> " + data.toString()); 344 | }, 345 | ); 346 | } else { 347 | return new Center( 348 | child: Text( 349 | settings != null 350 | ? settings[0].language == "English" 351 | ? Lang.english["noColumnsHeader"] 352 | : Lang.turkce["noColumnsHeader"] 353 | : "No columns were found!", 354 | style: TextStyle( 355 | color: widget.isNight 356 | ? Colors.white60 357 | : Colors.black87), 358 | ), 359 | ); 360 | } 361 | }, 362 | ), 363 | ) 364 | ], 365 | ), 366 | )); 367 | } 368 | 369 | _updateMyItems(oldInd, newInd) { 370 | if (newInd > oldInd) { 371 | newInd -= 1; 372 | } 373 | 374 | final items = kolonListe.then((value) => value.removeAt(oldInd)); 375 | 376 | kolonListe.then((value) => value.insert(newInd, (items as ProjectColumn))); 377 | } 378 | 379 | List setModeColor(String isNight) { 380 | if (settings != null) { 381 | switch (isNight) { 382 | case "Dark": 383 | { 384 | return [Color(0xFF141518), Color(0xFF191b1f)]; 385 | } 386 | break; 387 | case "Light": 388 | { 389 | return [Color(0xFFedeef5), Color(0xFFe9eaf5)]; 390 | } 391 | break; 392 | } 393 | } else { 394 | return [Color(0xFF141518), Color(0xFF191b1f)]; 395 | } 396 | } 397 | } 398 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.gloryTodoDesktop; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 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; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.gloryTodoDesktop; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.gloryTodoDesktop; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /lib/core/JsonManager/JsonManager.dart: -------------------------------------------------------------------------------- 1 | import 'package:glory_todo_desktop/core/models/Column.dart'; 2 | import 'package:glory_todo_desktop/core/models/Project.dart'; 3 | import 'package:glory_todo_desktop/core/models/Todo.dart'; 4 | import 'package:glory_todo_desktop/core/models/Settings.dart'; 5 | import 'package:path_provider_windows/path_provider_windows.dart'; 6 | import 'dart:io'; 7 | import 'dart:convert'; 8 | 9 | final PathProviderWindows provider = PathProviderWindows(); 10 | //!!-----------------------------------OLUŞTURMA İŞLEMİ-------------------------------------------------- 11 | 12 | void ExistJson() async { 13 | String documentPath = await provider.getApplicationDocumentsPath(); 14 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 15 | String settingsPath = documentPath + "\\GloryTodoDesktop\\settings.json"; 16 | if (!await File(path).exists()) { 17 | Setup(); 18 | } 19 | 20 | if (!await File(settingsPath).exists()) { 21 | CreateSettingsFile(); 22 | } 23 | } 24 | 25 | //Bertilen Adresde Json Dosyası oluşturma 26 | void Setup() async { 27 | String documentPath = await provider.getApplicationDocumentsPath(); 28 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 29 | new File(path).createSync(recursive: true); 30 | 31 | //Temel bir json dosyası oluştur [] 32 | List empty = []; 33 | String emptyListToString = jsonEncode(empty); 34 | File file = File(path); 35 | file.writeAsStringSync(emptyListToString, mode: FileMode.append); 36 | print("Dosya oluşturuldu"); 37 | } 38 | 39 | void CreateSettingsFile() async { 40 | String documentPath = await provider.getApplicationDocumentsPath(); 41 | String path = documentPath + "\\GloryTodoDesktop\\settings.json"; 42 | new File(path).createSync(recursive: true); 43 | 44 | //Temel bir json dosyası oluştur [] 45 | List empty = []; 46 | String emptyListToString = jsonEncode(empty); 47 | File file = File(path); 48 | file.writeAsStringSync(emptyListToString, mode: FileMode.append); 49 | print("Dosya oluşturuldu"); 50 | 51 | addDefaultSettings(); 52 | } 53 | 54 | //!!-----------------------------------OKUMA İŞLEMİ-------------------------------------------------- 55 | //Proje Okuma 56 | Future> readProjects() async { 57 | String documentPath = await provider.getApplicationDocumentsPath(); 58 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 59 | String cont = File(path).readAsStringSync(); 60 | List l = jsonDecode(cont); 61 | List liste = l.map((e) => Project.fromJson(e)).toList(); 62 | print("LİSTEM =======> " + liste.toString()); 63 | List dondurelecekListe = []; 64 | liste.forEach((element) { 65 | dondurelecekListe.add(element); 66 | }); 67 | 68 | return dondurelecekListe; 69 | } 70 | 71 | //Read Settings 72 | Future> readSettings() async { 73 | String documentPath = await provider.getApplicationDocumentsPath(); 74 | String path = documentPath + "\\GloryTodoDesktop\\settings.json"; 75 | String cont = File(path).readAsStringSync(); 76 | List l = jsonDecode(cont); 77 | List liste = l.map((e) => Settings.fromJson(e)).toList(); 78 | print("LİSTEM =======> " + liste.toString()); 79 | List dondurelecekListe = []; 80 | liste.forEach((element) { 81 | dondurelecekListe.add(element); 82 | }); 83 | 84 | return dondurelecekListe; 85 | } 86 | 87 | //!!-----------------------------------EKLEME İŞLEMİ-------------------------------------------------- 88 | //Tablo Ekle 89 | void addProject(Project newProject) async { 90 | String documentPath = await provider.getApplicationDocumentsPath(); 91 | 92 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 93 | String cont = File(path).readAsStringSync(); 94 | List liste = jsonDecode(cont); 95 | liste.add(newProject); 96 | 97 | String newContent = jsonEncode(liste); 98 | File file = new File(path); 99 | file.writeAsStringSync(newContent); 100 | 101 | print("YAZILDI!"); 102 | } 103 | 104 | //Tabloya Kolon Ekle 105 | void addColumn( 106 | ProjectColumn newColumn, int projectId, String projectName) async { 107 | String documentPath = await provider.getApplicationDocumentsPath(); 108 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 109 | String cont = File(path).readAsStringSync(); 110 | List l = jsonDecode(cont); 111 | var liste = List(); 112 | liste = l.map((e) => Project.fromJson(e)).toList(); 113 | print("Kolon Listem ===> " + liste[0].columns.toString()); 114 | liste.forEach((element) { 115 | if ((element.projectID == projectId) && 116 | (element.projectName == projectName)) { 117 | ProjectColumn addColumn = ProjectColumn.addColumnContructor( 118 | newColumn.columnId, newColumn.columnName); 119 | element.columns.add(addColumn as dynamic); 120 | print("Kolon Eklendi!!!"); 121 | } 122 | }); 123 | 124 | String newContent = jsonEncode(liste); 125 | File file = new File(path); 126 | file.writeAsStringSync(newContent); 127 | 128 | print("Eklendi!!!"); 129 | } 130 | 131 | //Kolona Görev Ekle 132 | void addTodo(Todo newTodo, int projectId, String projectName, int columnId, 133 | String columnName) async { 134 | String documentPath = await provider.getApplicationDocumentsPath(); 135 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 136 | String cont = File(path).readAsStringSync(); 137 | List l = jsonDecode(cont); 138 | var liste = List(); 139 | liste = l.map((e) => Project.fromJson(e)).toList(); 140 | print("Kolon Listem ===> " + liste[0].columns.toString()); 141 | liste.forEach((element) { 142 | if ((element.projectID == projectId) && 143 | (element.projectName == projectName)) { 144 | List findedColumns = element.columns 145 | .map((e) => ProjectColumn.fromJson(e)) 146 | .toList(); 147 | 148 | for (int j = 0; j < findedColumns.length; j++) { 149 | if ((findedColumns[j].columnId == columnId) && 150 | (findedColumns[j].columnName == columnName)) { 151 | Todo addTodo = 152 | Todo(findedColumns[j].todos.length + 1, newTodo.todo, false); 153 | if (!findedColumns.contains(addTodo)) { 154 | findedColumns[j].todos.add(addTodo); 155 | } 156 | } 157 | } 158 | //element.columns.add(addColumn as dynamic); 159 | print("Görev Eklendi!!!"); 160 | } 161 | }); 162 | 163 | String newContent = jsonEncode(liste); 164 | File file = new File(path); 165 | file.writeAsStringSync(newContent); 166 | 167 | print("Eklendi!!!"); 168 | } 169 | 170 | //Add Default Settings 171 | void addDefaultSettings() async { 172 | String documentPath = await provider.getApplicationDocumentsPath(); 173 | String path = documentPath + "\\GloryTodoDesktop\\settings.json"; 174 | String cont = File(path).readAsStringSync(); 175 | List l = jsonDecode(cont); 176 | var liste = List(); 177 | //liste = l.map((e) => Settings.fromJson(e)).toList(); 178 | 179 | liste.add(Settings("Dark", "English")); 180 | 181 | String newContent = jsonEncode(liste); 182 | File file = new File(path); 183 | file.writeAsStringSync(newContent); 184 | 185 | print("Eklendi!!!"); 186 | } 187 | //!!-----------------------------------SİLME İŞLEMİ-------------------------------------------------- 188 | 189 | //Proje Sil 190 | removeProject(int projectId, String projectName) async { 191 | String documentPath = await provider.getApplicationDocumentsPath(); 192 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 193 | String cont = File(path).readAsStringSync(); 194 | List l = jsonDecode(cont); 195 | List projectList = 196 | l.map((e) => Project.fromJson(e)).toList(); 197 | 198 | for (int i = 0; i < projectList.length; i++) { 199 | if ((projectList[i].projectID == projectId) && 200 | (projectList[i].projectName == projectName)) { 201 | projectList.remove(projectList[i]); 202 | } 203 | } 204 | 205 | List removedList = projectList; 206 | String newContent = jsonEncode(removedList); 207 | File file = new File(path); 208 | 209 | file.writeAsStringSync(newContent); 210 | } 211 | 212 | //Tablodan Kolon Sil 213 | removeColumn( 214 | int projectId, String projectName, int columnId, String columnName) async { 215 | String documentPath = await provider.getApplicationDocumentsPath(); 216 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 217 | String cont = File(path).readAsStringSync(); 218 | List l = jsonDecode(cont); 219 | List projectList = 220 | l.map((e) => Project.fromJson(e)).toList(); 221 | List findedColumns; 222 | for (int i = 0; i < projectList.length; i++) { 223 | if ((projectList[i].projectID == projectId) && 224 | (projectList[i].projectName == projectName)) { 225 | findedColumns = projectList[i] 226 | .columns 227 | .map((e) => ProjectColumn.fromJson(e)) 228 | .toList(); 229 | for (int j = 0; j < findedColumns.length; j++) { 230 | if ((findedColumns[j].columnId == columnId) && 231 | (findedColumns[j].columnName == columnName)) { 232 | projectList[i].columns.remove(projectList[i].columns[j]); 233 | } 234 | } 235 | //projectList.remove(projectList[i]); 236 | } 237 | } 238 | 239 | List removedList = projectList; 240 | String newContent = jsonEncode(removedList); 241 | File file = new File(path); 242 | 243 | file.writeAsStringSync(newContent); 244 | } 245 | //Kolondan Görev Sil 246 | 247 | //!!-----------------------------------GÜNCELLEME İŞLEMİ-------------------------------------------------- 248 | 249 | //Proje Güncelle 250 | updateProject(Project project) async { 251 | String documentPath = await provider.getApplicationDocumentsPath(); 252 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 253 | String cont = File(path).readAsStringSync(); 254 | List l = jsonDecode(cont); 255 | List projectList = 256 | l.map((e) => Project.fromJson(e)).toList(); 257 | 258 | for (int i = 0; i < projectList.length; i++) { 259 | if (projectList[i].projectID == project.projectID) { 260 | int findedIndex = projectList.indexOf(projectList[i]); 261 | Project newProject = Project(projectList[i].projectID, 262 | project.projectName, projectList[i].columns); 263 | projectList.removeAt(findedIndex); 264 | 265 | projectList.insert(findedIndex, newProject); 266 | } 267 | } 268 | 269 | List updatedList = projectList; 270 | String newContent = jsonEncode(updatedList); 271 | File file = new File(path); 272 | 273 | file.writeAsStringSync(newContent); 274 | } 275 | 276 | //Tabloda Kolonu Güncelle 277 | updateColumn(int projectId, String projectName, int columnId, String columnName, 278 | String newColumnName) async { 279 | String documentPath = await provider.getApplicationDocumentsPath(); 280 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 281 | String cont = File(path).readAsStringSync(); 282 | List l = jsonDecode(cont); 283 | List projects = l.map((e) => Project.fromJson(e)).toList(); 284 | List returnList = []; 285 | 286 | int findedProjectIndex, findedColumnIndex, findedTodoIndex; 287 | 288 | List findedColumns; 289 | List findedTodos; 290 | ProjectColumn sample; 291 | Project sampleProj; 292 | for (int i = 0; i < projects.length; i++) { 293 | if ((projects[i].projectID == projectId) && 294 | (projects[i].projectName == projectName)) { 295 | print("Kolonlar Bulundu ==============> " + 296 | jsonEncode(projects[i].columns[0].toString())); 297 | sampleProj = projects[i]; 298 | findedProjectIndex = projects.indexOf(projects[i]); 299 | findedColumns = projects[i] 300 | .columns 301 | .map((e) => ProjectColumn.fromJson(e)) 302 | .toList(); 303 | 304 | for (int j = 0; j < findedColumns.length; j++) { 305 | if ((findedColumns[j].columnId == columnId) && 306 | (findedColumns[j].columnName == columnName)) { 307 | sample = findedColumns[j]; 308 | findedColumnIndex = findedColumns.indexOf(findedColumns[j]); 309 | 310 | ProjectColumn updatedColumn = 311 | ProjectColumn(columnId, newColumnName, findedColumns[j].todos); 312 | findedColumns.removeAt(findedColumnIndex); 313 | findedColumns.insert(findedColumnIndex, updatedColumn); 314 | 315 | sample = findedColumns[j]; 316 | findedColumnIndex = findedColumns.indexOf(findedColumns[j]); 317 | findedTodos = findedColumns[j] 318 | .todos 319 | .map((e) => Todo.fromJson(e)) 320 | .toList(); 321 | 322 | //findedTodos.forEach((element) {}); 323 | } 324 | } 325 | } 326 | } 327 | 328 | //Nasıl yeniden bir döküman oluşturup yazdıracağım! 329 | ProjectColumn k1 = 330 | ProjectColumn(sample.columnId, sample.columnName, findedTodos); 331 | List updateColumns = await findedColumns; 332 | updateColumns.removeAt(findedColumnIndex); 333 | updateColumns.insert(findedColumnIndex, k1); 334 | List updatedList = await projects; 335 | 336 | Project p1 = 337 | Project(sampleProj.projectID, sampleProj.projectName, updateColumns); 338 | updatedList.removeAt(findedProjectIndex); 339 | updatedList.insert(findedProjectIndex, p1); 340 | String newContent = jsonEncode(updatedList); 341 | File file = new File(path); 342 | 343 | file.writeAsStringSync(newContent); 344 | } 345 | 346 | //Kolondan Görev Güncelle [Bu aynı zamanda görevi tamamlama işlemi olarak kullanılabilir] 347 | updateTodo(int projectId, String projectName, int columnId, String columnName, 348 | int todoId, String todo) async { 349 | String documentPath = await provider.getApplicationDocumentsPath(); 350 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 351 | String cont = File(path).readAsStringSync(); 352 | List l = jsonDecode(cont); 353 | List projects = l.map((e) => Project.fromJson(e)).toList(); 354 | List returnList = []; 355 | 356 | int findedProjectIndex, findedColumnIndex, findedTodoIndex; 357 | 358 | List findedColumns; 359 | List findedTodos; 360 | ProjectColumn sample; 361 | Project sampleProj; 362 | for (int i = 0; i < projects.length; i++) { 363 | if ((projects[i].projectID == projectId) && 364 | (projects[i].projectName == projectName)) { 365 | print("Kolonlar Bulundu ==============> " + 366 | jsonEncode(projects[i].columns[0].toString())); 367 | sampleProj = projects[i]; 368 | findedProjectIndex = projects.indexOf(projects[i]); 369 | findedColumns = projects[i] 370 | .columns 371 | .map((e) => ProjectColumn.fromJson(e)) 372 | .toList(); 373 | 374 | for (int j = 0; j < findedColumns.length; j++) { 375 | if ((findedColumns[j].columnId == columnId) && 376 | (findedColumns[j].columnName == columnName)) { 377 | sample = findedColumns[j]; 378 | findedColumnIndex = findedColumns.indexOf(findedColumns[j]); 379 | findedTodos = findedColumns[j] 380 | .todos 381 | .map((e) => Todo.fromJson(e)) 382 | .toList(); 383 | 384 | for (int k = 0; k < findedTodos.length; k++) { 385 | if ((findedTodos[k].todoId == todoId) && 386 | (findedTodos[k].todo == todo)) { 387 | findedTodoIndex = findedTodos.indexOf(findedTodos[k]); 388 | bool isNewCheck = !findedTodos[k].isCheck; 389 | findedTodos.removeAt(findedTodoIndex); 390 | Todo updatedTodo = Todo(todoId, todo, isNewCheck); 391 | findedTodos.insert(findedTodoIndex, updatedTodo); 392 | print("Bulundu ===============================> " + 393 | findedTodos[k].todo); 394 | } 395 | } 396 | //findedTodos.forEach((element) {}); 397 | } 398 | } 399 | } 400 | } 401 | 402 | //Nasıl yeniden bir döküman oluşturup yazdıracağım! 403 | ProjectColumn k1 = 404 | ProjectColumn(sample.columnId, sample.columnName, findedTodos); 405 | List updateColumns = await findedColumns; 406 | updateColumns.removeAt(findedColumnIndex); 407 | updateColumns.insert(findedColumnIndex, k1); 408 | List updatedList = await projects; 409 | 410 | Project p1 = 411 | Project(sampleProj.projectID, sampleProj.projectName, updateColumns); 412 | updatedList.removeAt(findedProjectIndex); 413 | updatedList.insert(findedProjectIndex, p1); 414 | String newContent = jsonEncode(updatedList); 415 | File file = new File(path); 416 | 417 | file.writeAsStringSync(newContent); 418 | } 419 | 420 | //Update Settings 421 | 422 | //!!-----------------------------------BULMA İŞLEMİ-------------------------------------------------- 423 | 424 | Future> findColumn( 425 | int projectId, String projectName) async { 426 | String documentPath = await provider.getApplicationDocumentsPath(); 427 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 428 | String cont = File(path).readAsStringSync(); 429 | List l = jsonDecode(cont); 430 | List projects = l.map((e) => Project.fromJson(e)).toList(); 431 | List returnList = []; 432 | for (int i = 0; i < projects.length; i++) { 433 | if ((projects[i].projectID == projectId) && 434 | (projects[i].projectName == projectName)) { 435 | // if (projects.length > 0) { 436 | // print("Kolonlar Bulundu ==============> " + 437 | // jsonEncode(projects[i].columns[0].toString())); 438 | // } 439 | 440 | List findedColumns = projects[i] 441 | .columns 442 | .map((e) => ProjectColumn.fromJson(e)) 443 | .toList(); 444 | 445 | for (int j = 0; j < findedColumns.length; j++) { 446 | returnList.add(findedColumns[j]); 447 | } 448 | } 449 | } 450 | 451 | return returnList; 452 | } 453 | 454 | Future> findTodos( 455 | int projectId, String projectName, int columnId, String columnName) async { 456 | String documentPath = await provider.getApplicationDocumentsPath(); 457 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 458 | String cont = File(path).readAsStringSync(); 459 | List l = jsonDecode(cont); 460 | List projects = l.map((e) => Project.fromJson(e)).toList(); 461 | List returnList = []; 462 | for (int i = 0; i < projects.length; i++) { 463 | if ((projects[i].projectID == projectId) && 464 | (projects[i].projectName == projectName)) { 465 | print("Kolonlar Bulundu ==============> " + 466 | jsonEncode(projects[i].columns[0].toString())); 467 | 468 | List findedColumns = projects[i] 469 | .columns 470 | .map((e) => ProjectColumn.fromJson(e)) 471 | .toList(); 472 | 473 | for (int j = 0; j < findedColumns.length; j++) { 474 | if ((findedColumns[j].columnId == columnId) && 475 | (findedColumns[j].columnName == columnName)) { 476 | List findedTodos = findedColumns[j] 477 | .todos 478 | .map((e) => Todo.fromJson(e)) 479 | .toList(); 480 | //returnList.add() 481 | print("Görev Bulundu!"); 482 | returnList = findedTodos; 483 | 484 | //findedTodos.forEach((element) {}); 485 | } 486 | } 487 | } 488 | } 489 | 490 | return returnList; 491 | } 492 | 493 | //!!-----------------------------------SIRALAMA İŞLEMİ-------------------------------------------------- 494 | 495 | //Proje Listesini al 496 | //İndexine göre sırala 497 | Future sortProjects(oldIndex, newIndex) async { 498 | String documentPath = await provider.getApplicationDocumentsPath(); 499 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 500 | String cont = File(path).readAsStringSync(); 501 | List l = jsonDecode(cont); 502 | List projectList = 503 | l.map((e) => Project.fromJson(e)).toList(); 504 | 505 | if (projectList.length >= oldIndex && projectList.length >= newIndex) { 506 | Project newIndexProject = projectList[newIndex]; 507 | Project oldIndexProject = projectList[oldIndex]; 508 | 509 | projectList.removeAt(newIndex); 510 | projectList.insert(newIndex, oldIndexProject); 511 | projectList.removeAt(oldIndex); 512 | projectList.insert(oldIndex, newIndexProject); 513 | } 514 | List updatedList = projectList; 515 | String newContent = jsonEncode(updatedList); 516 | File file = new File(path); 517 | 518 | file.writeAsStringSync(newContent); 519 | } 520 | 521 | //!!-----------------------------------GÖREVLERİ SAYMA İŞLEMİ-------------------------------------------------- 522 | 523 | Future> countTodos(int projectId, String projectName) async { 524 | int checkedTodoCounter = 0; 525 | int noneCheckedTodoCounter = 0; 526 | String documentPath = await provider.getApplicationDocumentsPath(); 527 | String path = documentPath + "\\GloryTodoDesktop\\storage.json"; 528 | String cont = File(path).readAsStringSync(); 529 | List l = jsonDecode(cont); 530 | List projects = l.map((e) => Project.fromJson(e)).toList(); 531 | List returnList = []; 532 | for (int i = 0; i < projects.length; i++) { 533 | if ((projects[i].projectID == projectId) && 534 | (projects[i].projectName == projectName)) { 535 | List findedColumns = projects[i] 536 | .columns 537 | .map((e) => ProjectColumn.fromJson(e)) 538 | .toList(); 539 | 540 | for (int j = 0; j < findedColumns.length; j++) { 541 | List findedTodos = 542 | findedColumns[j].todos.map((e) => Todo.fromJson(e)).toList(); 543 | //returnList.add() 544 | 545 | for (int y = 0; y < findedTodos.length; y++) { 546 | if (findedTodos[y].isCheck == true) { 547 | checkedTodoCounter++; 548 | } else { 549 | noneCheckedTodoCounter++; 550 | } 551 | } 552 | 553 | //findedTodos.forEach((element) {}); 554 | 555 | } 556 | } 557 | } 558 | List todoCounterList = [checkedTodoCounter, noneCheckedTodoCounter]; 559 | return todoCounterList; 560 | } 561 | 562 | //!Settings Set Functions 563 | 564 | void setChangeColorMode() async { 565 | String documentPath = await provider.getApplicationDocumentsPath(); 566 | String path = documentPath + "\\GloryTodoDesktop\\settings.json"; 567 | String cont = File(path).readAsStringSync(); 568 | List l = jsonDecode(cont); 569 | List settingsList = 570 | l.map((e) => Settings.fromJson(e)).toList(); 571 | Settings newSettings; 572 | if (settingsList[0].colorMode == "Dark") { 573 | newSettings = Settings("Light", settingsList[0].language); 574 | } else { 575 | newSettings = Settings("Dark", settingsList[0].language); 576 | } 577 | 578 | settingsList.remove(settingsList[0]); 579 | settingsList.add(newSettings); 580 | 581 | List removedList = settingsList; 582 | String newContent = jsonEncode(removedList); 583 | File file = new File(path); 584 | 585 | file.writeAsStringSync(newContent); 586 | } 587 | 588 | void setLanguage() async { 589 | String documentPath = await provider.getApplicationDocumentsPath(); 590 | String path = documentPath + "\\GloryTodoDesktop\\settings.json"; 591 | String cont = File(path).readAsStringSync(); 592 | List l = jsonDecode(cont); 593 | List settingsList = 594 | l.map((e) => Settings.fromJson(e)).toList(); 595 | Settings newSettings; 596 | if (settingsList[0].language == "English") { 597 | newSettings = Settings(settingsList[0].colorMode, "Turkish"); 598 | } else { 599 | newSettings = Settings(settingsList[0].colorMode, "English"); 600 | } 601 | 602 | settingsList.remove(settingsList[0]); 603 | settingsList.add(newSettings); 604 | 605 | List removedList = settingsList; 606 | String newContent = jsonEncode(removedList); 607 | File file = new File(path); 608 | 609 | file.writeAsStringSync(newContent); 610 | } 611 | 612 | 613 | getLanguage() async{ 614 | 615 | } --------------------------------------------------------------------------------