diff --git a/flutter_calendar_notifier/.gitignore b/flutter_calendar_notifier/.gitignore new file mode 100644 index 0000000..f3c2053 --- /dev/null +++ b/flutter_calendar_notifier/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Exceptions to above rules. +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/flutter_calendar_notifier/.metadata b/flutter_calendar_notifier/.metadata new file mode 100644 index 0000000..d7031d1 --- /dev/null +++ b/flutter_calendar_notifier/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 216dee60c0cc9449f0b29bcf922974d612263e24 + channel: stable + +project_type: app diff --git a/flutter_calendar_notifier/README.md b/flutter_calendar_notifier/README.md new file mode 100644 index 0000000..a0ce670 --- /dev/null +++ b/flutter_calendar_notifier/README.md @@ -0,0 +1,5 @@ +# flutter_calendar_notifier + +## Nilva test. + +I use provider for implementing event list and providing it through whole project for fetch and add events! diff --git a/flutter_calendar_notifier/android/.gitignore b/flutter_calendar_notifier/android/.gitignore new file mode 100644 index 0000000..0a741cb --- /dev/null +++ b/flutter_calendar_notifier/android/.gitignore @@ -0,0 +1,11 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties diff --git a/flutter_calendar_notifier/android/app/build.gradle b/flutter_calendar_notifier/android/app/build.gradle new file mode 100644 index 0000000..b6c2c9b --- /dev/null +++ b/flutter_calendar_notifier/android/app/build.gradle @@ -0,0 +1,63 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.flutter_calendar_notifier" + minSdkVersion 16 + targetSdkVersion 28 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/flutter_calendar_notifier/android/app/src/debug/AndroidManifest.xml b/flutter_calendar_notifier/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..a7d4119 --- /dev/null +++ b/flutter_calendar_notifier/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/flutter_calendar_notifier/android/app/src/main/AndroidManifest.xml b/flutter_calendar_notifier/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..80f2971 --- /dev/null +++ b/flutter_calendar_notifier/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/flutter_calendar_notifier/android/app/src/main/kotlin/com/example/flutter_calendar_notifier/MainActivity.kt b/flutter_calendar_notifier/android/app/src/main/kotlin/com/example/flutter_calendar_notifier/MainActivity.kt new file mode 100644 index 0000000..244b6fe --- /dev/null +++ b/flutter_calendar_notifier/android/app/src/main/kotlin/com/example/flutter_calendar_notifier/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.flutter_calendar_notifier + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/flutter_calendar_notifier/android/app/src/main/res/drawable/launch_background.xml b/flutter_calendar_notifier/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/flutter_calendar_notifier/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/flutter_calendar_notifier/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/flutter_calendar_notifier/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..9fb40fb Binary files /dev/null and b/flutter_calendar_notifier/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/flutter_calendar_notifier/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/flutter_calendar_notifier/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..8d028a6 Binary files /dev/null and b/flutter_calendar_notifier/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/flutter_calendar_notifier/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/flutter_calendar_notifier/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..786b173 Binary files /dev/null and b/flutter_calendar_notifier/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/flutter_calendar_notifier/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/flutter_calendar_notifier/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..e25f5d3 Binary files /dev/null and b/flutter_calendar_notifier/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/flutter_calendar_notifier/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/flutter_calendar_notifier/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..98597a9 Binary files /dev/null and b/flutter_calendar_notifier/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/flutter_calendar_notifier/android/app/src/main/res/values/styles.xml b/flutter_calendar_notifier/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..1f83a33 --- /dev/null +++ b/flutter_calendar_notifier/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/flutter_calendar_notifier/android/app/src/profile/AndroidManifest.xml b/flutter_calendar_notifier/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..a7d4119 --- /dev/null +++ b/flutter_calendar_notifier/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/flutter_calendar_notifier/android/build.gradle b/flutter_calendar_notifier/android/build.gradle new file mode 100644 index 0000000..3100ad2 --- /dev/null +++ b/flutter_calendar_notifier/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/flutter_calendar_notifier/android/gradle.properties b/flutter_calendar_notifier/android/gradle.properties new file mode 100644 index 0000000..38c8d45 --- /dev/null +++ b/flutter_calendar_notifier/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/flutter_calendar_notifier/android/gradle/wrapper/gradle-wrapper.properties b/flutter_calendar_notifier/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..296b146 --- /dev/null +++ b/flutter_calendar_notifier/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/flutter_calendar_notifier/android/settings.gradle b/flutter_calendar_notifier/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/flutter_calendar_notifier/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/flutter_calendar_notifier/ios/.gitignore b/flutter_calendar_notifier/ios/.gitignore new file mode 100644 index 0000000..e96ef60 --- /dev/null +++ b/flutter_calendar_notifier/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/flutter_calendar_notifier/ios/Flutter/AppFrameworkInfo.plist b/flutter_calendar_notifier/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..6b4c0f7 --- /dev/null +++ b/flutter_calendar_notifier/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/flutter_calendar_notifier/ios/Flutter/Debug.xcconfig b/flutter_calendar_notifier/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/flutter_calendar_notifier/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/flutter_calendar_notifier/ios/Flutter/Release.xcconfig b/flutter_calendar_notifier/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/flutter_calendar_notifier/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/flutter_calendar_notifier/ios/Runner.xcodeproj/project.pbxproj b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..17cd318 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,495 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterCalendarNotifier; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterCalendarNotifier; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterCalendarNotifier; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/flutter_calendar_notifier/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter_calendar_notifier/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..a28140c --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_calendar_notifier/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter_calendar_notifier/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/flutter_calendar_notifier/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_calendar_notifier/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/flutter_calendar_notifier/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_calendar_notifier/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/flutter_calendar_notifier/ios/Runner/AppDelegate.swift b/flutter_calendar_notifier/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png new file mode 100644 index 0000000..943dd6f Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png new file mode 100644 index 0000000..7f780ee Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png new file mode 100644 index 0000000..b355eb8 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png new file mode 100644 index 0000000..1e2f71b Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png new file mode 100644 index 0000000..41519e6 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png new file mode 100644 index 0000000..2ecc228 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png new file mode 100644 index 0000000..702f875 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png new file mode 100644 index 0000000..c5ce055 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png new file mode 100644 index 0000000..2c9f4ea Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png new file mode 100644 index 0000000..308f923 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png new file mode 100644 index 0000000..488c393 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..73d3b7f --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1 @@ +{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"}]} \ No newline at end of file diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +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. \ No newline at end of file diff --git a/flutter_calendar_notifier/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter_calendar_notifier/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_calendar_notifier/ios/Runner/Base.lproj/Main.storyboard b/flutter_calendar_notifier/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flutter_calendar_notifier/ios/Runner/Info.plist b/flutter_calendar_notifier/ios/Runner/Info.plist new file mode 100644 index 0000000..4a0946f --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flutter_calendar_notifier + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/flutter_calendar_notifier/ios/Runner/Runner-Bridging-Header.h b/flutter_calendar_notifier/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/flutter_calendar_notifier/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/flutter_calendar_notifier/lib/constants/constants.dart b/flutter_calendar_notifier/lib/constants/constants.dart new file mode 100644 index 0000000..7e653e8 --- /dev/null +++ b/flutter_calendar_notifier/lib/constants/constants.dart @@ -0,0 +1,6 @@ +const calendarId = 'primary'; +const String privateKey = + "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCoR4ORt6k8vZAW\nXr9++yKDJvM4xd2vXGEYAclqXGd/J6GByM4GxkK2oN6VebfYhPGkhw2FEegAC36A\n8tEGhAjxhVCaUbOKe2jyBJw2BUTBEvpUI221wldAabP+5VUkGkmCXpEhd9O/DaXA\nklVq7psN9N+/ruZC+wd8kYz/gLpbmq2PGAuOqPsHTZ87q2YV9h1Z400BiccOBXE+\nRLTpsKvx7Son6VexsAkk/R5Ehb1D84gvc8AfkKokgJTADmaRs6lZHdWTB7r21794\n0rYDYh5bUJEJ7oOdy8OQxAH788VyUzUWXs2D/x3Snu+Sta9LcwCLZFKDLzDMKZsn\naJN74RItAgMBAAECggEAEQnUpNoaFPVYnns6G8r6bpnGAgHpdUpUO7sKlW4FE1cu\n6iuBI3x1ispKXzYeIEUttlaaTtaboqLcodp0FvB4JgQ1P2V1rq2E2GRmcK3N4q1f\nkp9XtLyYWwRDiP6CxWSyprRD25tSDEPUfDq/fVPqzS9LFxHIF2YVbE53Hp5TwCyE\nukoWIIl+W1YPttSnr10oRTZnLl7O/FEIr7v7zEhHV1u/BSHXGXcG7Q/2n/9qqXp+\nrfpPg6Q1fnO0d6mnhEsQk5z19kWbashCkJ05sw6lNlwzhKdxmIOzLhIUsGD5gFNQ\n2w2ezEI6gsyQDUJIgqRGF5rB+qzORLUSXdMKNJlIvQKBgQDcYCW+qT4Bc72tiBuC\nJKTbsRTiBvkccsbUqSLTxfXjU2+B+G3IWr8IqGPh4vTKBkErcGc8A+u4q94qfr6u\n88dnjDkLxEtwlVfJobIlaCPGCWU6M1js1BXAGd9r78L8A97OjCVGPJ+iRPxnmDE8\nfng5k5JO2w5jsM3cCnxbxky62wKBgQDDe3Tjb0OJunxRcl/W0y4cpcIfIKf+RHdF\nlQQ3kqfAuW3Csbge4bt6KaTv/tO7Ok79EGMypJyhbpvl88MZ7pvJEnhe8k85yiBz\nNyI5e7X7bvdrVFd+BYX7KnUCzE2fhc1iI/iRBLGj0PP9qly4dxJVcko+ZX84Uy64\ntnqPwuwBlwKBgQCzuLmvhwhpWMG8rr54YXgNLppwRu2L1NLwhctAWDZSoS3UGg02\nE0OuRN3ITzYBOB6X1YBrgmsP3SI/F8Rcm7ToboPrY7d+Zl0EtBi7xvU9wVXLpCqG\nYeQnGTKLLSqgKmvfmI2hfTlWtdn+hjDJO/7CPeZY5u8SQBNyux52Hf9fdwKBgFH5\nAUkmLTIiK2OUDLBvGhUVRVP8Q7YSS9m35W7QZtwgZfCQyd7ZVd6ie/HP8EXA68Kf\nDpn8AVqIoYNKNvQ25Mjqn+NgxOw84GKwKf/k6qknHUW6tn24Hzj10t97gMl2OGwB\nHYjiaQOC6e3jdMI93EhMhumncjPSXfNDQh3q5UC9AoGBAK8myQB39FuSm76xApYK\n/WO4GgyQZVBP2yDPjpLSa5PmLuqZS55RsGwxDnvExNjUd4crrNZsjy7d6/tfVPuR\nESL9AON+uN8y0JOHl4Shy6Fi205h89DViWZre0Lz8m9GhXlxZGyWC2XTvqd00nfu\nuMtcuRbMJd8QaT3ecbi/5Rnk\n-----END PRIVATE KEY-----\n"; +const String clientEmail = + 'benyamin@flutter-calendar-289906.iam.gserviceaccount.com'; +const String clientId = "104194754640213124975"; diff --git a/flutter_calendar_notifier/lib/main.dart b/flutter_calendar_notifier/lib/main.dart new file mode 100644 index 0000000..2559d56 --- /dev/null +++ b/flutter_calendar_notifier/lib/main.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_calendar_notifier/screens/home_screen.dart'; +import 'package:provider/provider.dart'; +import 'package:flutter_calendar_notifier/models/event_data.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return ChangeNotifierProvider( + create: (context) => EventData(), + child: MaterialApp( + title: 'Flutter Calendar Notifier', + debugShowCheckedModeBanner: false, + theme: ThemeData( + primarySwatch: Colors.amber, + visualDensity: VisualDensity.adaptivePlatformDensity, + ), + home: HomeScreen(), + ), + ); + } +} diff --git a/flutter_calendar_notifier/lib/models/event.dart b/flutter_calendar_notifier/lib/models/event.dart new file mode 100644 index 0000000..a0de45f --- /dev/null +++ b/flutter_calendar_notifier/lib/models/event.dart @@ -0,0 +1,9 @@ +class Event { + final String name; + final String description; + final DateTime startDate; + final DateTime endDate; + final String repeat; + + Event(this.name, this.description, this.startDate, this.endDate, this.repeat); +} diff --git a/flutter_calendar_notifier/lib/models/event_data.dart b/flutter_calendar_notifier/lib/models/event_data.dart new file mode 100644 index 0000000..19aaf4e --- /dev/null +++ b/flutter_calendar_notifier/lib/models/event_data.dart @@ -0,0 +1,76 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter_calendar_notifier/models/event.dart' as model; +import 'package:googleapis/calendar/v3.dart' as google; +import 'package:googleapis_auth/auth_io.dart'; +import 'package:flutter_calendar_notifier/constants/constants.dart'; +import 'package:googleapis/calendar/v3.dart'; +import 'package:provider/provider.dart'; + +ClientId _clientID = ClientId(clientId, ''); +var _scopes = [CalendarApi.CalendarScope]; + +final accountCredentials = new ServiceAccountCredentials( + clientEmail, + _clientID, + privateKey, +); + +class EventData extends ChangeNotifier { + int _maxResults = 8; + List events = []; + bool loading = true; + + void getEvents() async { + AuthClient client = + await clientViaServiceAccount(accountCredentials, _scopes); + + var calendar = google.CalendarApi(client); + String calendarId = "primary"; + + Events e = await calendar.events.list(calendarId); + events = e.items; + loading = false; + + // notify + notifyListeners(); + } + + void getMoreEvents() {} + + void addNewEvent(model.Event model) async { + // create a new google event + google.Event event = google.Event(); + google.EventDateTime start = new google.EventDateTime(); + start.dateTime = model.startDate; + start.timeZone = 'Asia/Tehran'; + + google.EventDateTime end = new google.EventDateTime(); + end.timeZone = 'Asia/Tehran'; + end.dateTime = model.endDate; + + event.start = start; + event.end = end; + event.description = model.description; + event.summary = model.name; + if (model.repeat != null || model.repeat != '') { + event.recurrence = [model.repeat]; + } + + // add using AuthClient + AuthClient client = + await clientViaServiceAccount(accountCredentials, _scopes); + + var calendar = google.CalendarApi(client); + String calendarId = "primary"; + calendar.events.insert(event, calendarId).then((value) { + if (value.status == "confirmed") { + print('Event added in google calendar'); + } else { + print("Unable to add event in google calendar"); + } + }); + + // notify + notifyListeners(); + } +} diff --git a/flutter_calendar_notifier/lib/screens/add_event_screen.dart b/flutter_calendar_notifier/lib/screens/add_event_screen.dart new file mode 100644 index 0000000..efda6e3 --- /dev/null +++ b/flutter_calendar_notifier/lib/screens/add_event_screen.dart @@ -0,0 +1,250 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_calendar_notifier/models/event_data.dart'; +import 'package:flutter_calendar_notifier/utils/app_bar.dart'; +import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; +import 'package:flutter_calendar_notifier/models/event.dart'; +import 'package:provider/provider.dart'; + +class AddEventScreen extends StatefulWidget { + AddEventScreen({Key key}) : super(key: key); + + @override + _AddEventScreenState createState() => _AddEventScreenState(); +} + +class _AddEventScreenState extends State { + String _eventName; + String _eventDescription; + String _startTimeString = 'pick a start time'; + String _endTimeString = 'pick a end time'; + DateTime _startTime; + DateTime _endTime; + String _repeat; + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppBar(MediaQuery.of(context).size.width, 60, 'Add new event'), + body: Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + child: ListView(children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextField( + decoration: InputDecoration( + helperText: 'like: Meeting with Bob', + hintText: 'Event name', + ), + onChanged: (name) { + setState(() { + this._eventName = name; + }); + }), + TextField( + maxLines: 3, + decoration: InputDecoration( + helperText: 'like: Talking about home works and finals.', + hintText: 'Event Description', + ), + onChanged: (des) { + setState(() { + this._eventDescription = des; + }); + }, + ), + SizedBox( + height: 15, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text( + 'Start date: ', + style: TextStyle(fontSize: 16), + ), + Text( + 'End date: ', + style: TextStyle(fontSize: 16), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(4.0), + child: OutlineButton( + shape: new RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(30.0)), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '$_startTimeString', + ), + ), + onPressed: () { + DatePicker.showDateTimePicker(context, + showTitleActions: true, + minTime: DateTime.now(), + maxTime: DateTime(2024), + onChanged: (date) {}, onConfirm: (date) { + this._startTime = date; + setState(() { + this._startTimeString = date.toString(); + }); + }, + currentTime: DateTime.now(), + locale: LocaleType.en); + }, + ), + ), + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(4.0), + child: OutlineButton( + shape: new RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(30.0)), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '$_endTimeString', + ), + ), + onPressed: () { + DatePicker.showDateTimePicker(context, + showTitleActions: true, + minTime: DateTime.now(), + maxTime: DateTime(2024), + onChanged: (date) {}, onConfirm: (date) { + setState(() { + this._endTimeString = date.toString(); + }); + this._endTime = date; + }, + currentTime: DateTime.now(), + locale: LocaleType.en); + }, + ), + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Text( + 'Repeat: ', + style: TextStyle(fontSize: 16), + ), + ), + Row( + children: [ + Radio( + value: null, + groupValue: _repeat, + onChanged: (value) { + setState(() { + _repeat = value; + }); + }, + ), + Text('None'), + Radio( + value: 'RRULE:FREQ=DAILY', + groupValue: _repeat, + onChanged: (value) { + setState(() { + _repeat = value; + }); + }, + ), + Text('Daily'), + Radio( + value: 'RRULE:FREQ=WEEKLY', + groupValue: _repeat, + onChanged: (value) { + setState(() { + _repeat = value; + }); + }, + ), + Text('Weekly'), + ], + ), + Row( + children: [ + Radio( + value: 'RRULE:FREQ=MONTHLY', + groupValue: _repeat, + onChanged: (value) { + setState(() { + _repeat = value; + }); + }, + ), + Text('Monthly'), + Radio( + value: 'RRULE:FREQ=YEARLY', + groupValue: _repeat, + onChanged: (value) { + setState(() { + _repeat = value; + }); + }, + ), + Text('Yearly'), + ], + ), + SizedBox( + height: 10, + ), + FlatButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(60.0), + //side: BorderSide(color: Colors.red), + ), + color: Colors.green[800], + child: Container( + width: double.infinity, + height: 80, + child: Center( + child: Text( + 'Add Event', + style: TextStyle( + fontSize: 20, + color: Colors.white, + ), + ), + ), + ), + onPressed: () { + if (this._startTime != null && this._endTime != null) { + Event newEvent = new Event( + this._eventName, + this._eventDescription, + this._startTime, + this._endTime, + this._repeat); + Provider.of(context, listen: false) + .addNewEvent(newEvent); + Provider.of(context, listen: false).loading = + true; + } + Navigator.pop(context); + }, + ) + ], + ), + ]), + ), + ), + ); + } +} diff --git a/flutter_calendar_notifier/lib/screens/home_screen.dart b/flutter_calendar_notifier/lib/screens/home_screen.dart new file mode 100644 index 0000000..2011e86 --- /dev/null +++ b/flutter_calendar_notifier/lib/screens/home_screen.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_calendar_notifier/models/event_data.dart'; +import 'package:flutter_calendar_notifier/utils/app_bar.dart'; +import 'package:flutter_calendar_notifier/utils/floating_action_button.dart'; +import 'package:flutter_calendar_notifier/utils/event_list.dart'; +import 'package:provider/provider.dart'; + +class HomeScreen extends StatefulWidget { + @override + _HomeScreenState createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + appBar: MyAppBar( + MediaQuery.of(context).size.width, 60, 'Calendar Notifier'), + floatingActionButton: MyFloatingActionButton(), + body: EventsList(), + ), + ); + } +} diff --git a/flutter_calendar_notifier/lib/utils/app_bar.dart b/flutter_calendar_notifier/lib/utils/app_bar.dart new file mode 100644 index 0000000..22e4a42 --- /dev/null +++ b/flutter_calendar_notifier/lib/utils/app_bar.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_calendar_notifier/models/event_data.dart'; +import 'package:provider/provider.dart'; + +class MyAppBar extends StatelessWidget implements PreferredSizeWidget { + final double width; + final double height; + final String title; + + MyAppBar(this.width, this.height, this.title); + @override + PreferredSize build(BuildContext context) { + return PreferredSize( + preferredSize: Size( + MediaQuery.of(context).size.width, + MediaQuery.of(context).size.height * 0.08, + ), + child: AppBar( + // actions: [ + // IconButton( + // icon: Icon(Icons.refresh), + // color: Colors.white, + // onPressed: () { + // Provider.of(context, listen: false).getEvents(); + // }, + // ) + // ], + iconTheme: IconThemeData( + color: Colors.white, + ), + backgroundColor: Colors.amber[800], + title: Text( + title, + style: TextStyle( + color: Colors.white, + ), + ), + ), + ); + } + + @override + Size get preferredSize => Size(this.width, this.height); +} diff --git a/flutter_calendar_notifier/lib/utils/event_list.dart b/flutter_calendar_notifier/lib/utils/event_list.dart new file mode 100644 index 0000000..3a2b61b --- /dev/null +++ b/flutter_calendar_notifier/lib/utils/event_list.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_calendar_notifier/models/event_data.dart'; +import 'package:provider/provider.dart'; + +import 'event_tile.dart'; + +class EventsList extends StatelessWidget { + @override + Widget build(BuildContext context) { + if (Provider.of(context).loading) { + Provider.of(context).getEvents(); + return Center( + child: CircularProgressIndicator(), + ); + } else { + return ListView.builder( + itemBuilder: (context, index) { + return EventTile(Provider.of(context).events[index]); + }, + itemCount: Provider.of(context).events.length, + ); + } + } +} diff --git a/flutter_calendar_notifier/lib/utils/event_tile.dart b/flutter_calendar_notifier/lib/utils/event_tile.dart new file mode 100644 index 0000000..819f62e --- /dev/null +++ b/flutter_calendar_notifier/lib/utils/event_tile.dart @@ -0,0 +1,133 @@ +import 'package:flutter/material.dart'; +import 'package:googleapis/calendar/v3.dart' as calendar; + +class EventTile extends StatelessWidget { + final calendar.Event _event; + EventTile(this._event); + + String _makeRecurrence() { + if (_event.recurrence == null) + return ''; + else if (_event.recurrence.toString() == '[RRULE:FREQ=DAILY]') + return 'Daily event!'; + else if (_event.recurrence.toString() == '[RRULE:FREQ=WEEKLY]') + return 'Weekly event!'; + else if (_event.recurrence.toString() == '[RRULE:FREQ=MONTHLY]') + return 'Monthly event!'; + else if (_event.recurrence.toString() == '[RRULE:FREQ=YEARLY]') + return 'Yearly event!'; + else + return 'unknown repeat!'; + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 2.0, horizontal: 5), + child: Card( + elevation: 3.0, + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(15), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Container( + decoration: BoxDecoration( + color: Colors.green, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(15), + ), + ), + child: Center( + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 15.0, horizontal: 0), + child: Text( + _event.start.dateTime.toString() == 'null' + ? _event.start.dateTime.toString() + : _event.start.dateTime + .toString() + .substring(0, 16), + ), + ), + ), + ), + ), + Expanded( + child: Container( + decoration: BoxDecoration( + color: Colors.red, + borderRadius: BorderRadius.only( + topRight: Radius.circular(15), + ), + ), + child: Center( + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 15.0, horizontal: 0), + child: Text( + _event.start.dateTime.toString() == 'null' + ? _event.start.dateTime.toString() + : _event.start.dateTime + .toString() + .substring(0, 16), + ), + ), + ), + ), + ) + ], + ), + SizedBox( + height: 10, + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Text( + 'title: ${_event.summary}', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + ), + SizedBox( + height: 5, + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Text( + 'Discretion: ${_event.description}', + style: TextStyle( + fontSize: 16, + ), + ), + ), + SizedBox( + height: 3, + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Text( + _makeRecurrence(), + style: TextStyle( + fontSize: 16, + ), + ), + ), + SizedBox( + height: 8, + ) + ], + ), + ), + ); + } +} diff --git a/flutter_calendar_notifier/lib/utils/floating_action_button.dart b/flutter_calendar_notifier/lib/utils/floating_action_button.dart new file mode 100644 index 0000000..9dc9129 --- /dev/null +++ b/flutter_calendar_notifier/lib/utils/floating_action_button.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_calendar_notifier/screens/add_event_screen.dart'; + + +class MyFloatingActionButton extends StatelessWidget { + const MyFloatingActionButton({Key key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return FloatingActionButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddEventScreen(), + ), + ); + }, + child: Icon( + Icons.add, + color: Colors.white, + ), + ); + } +} diff --git a/flutter_calendar_notifier/pubspec.lock b/flutter_calendar_notifier/pubspec.lock new file mode 100644 index 0000000..372b306 --- /dev/null +++ b/flutter_calendar_notifier/pubspec.lock @@ -0,0 +1,231 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _discoveryapis_commons: + dependency: transitive + description: + name: _discoveryapis_commons + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.2" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.3" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.13" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.5" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_datetime_picker: + dependency: "direct main" + description: + name: flutter_datetime_picker + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + googleapis: + dependency: "direct main" + description: + name: googleapis + url: "https://pub.dartlang.org" + source: hosted + version: "0.55.0" + googleapis_auth: + dependency: "direct main" + description: + name: googleapis_auth + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.12" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.2" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.4" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.8" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.8" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.0" + provider: + dependency: "direct main" + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "4.3.2+2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.5" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.17" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" +sdks: + dart: ">=2.9.0-14.0.dev <3.0.0" + flutter: ">=1.16.0" diff --git a/flutter_calendar_notifier/pubspec.yaml b/flutter_calendar_notifier/pubspec.yaml new file mode 100644 index 0000000..612cc6b --- /dev/null +++ b/flutter_calendar_notifier/pubspec.yaml @@ -0,0 +1,27 @@ +name: flutter_calendar_notifier +description: A new Flutter project. + +publish_to: 'none' +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + cupertino_icons: ^0.1.3 + flutter_datetime_picker: ^1.4.0 + googleapis: any + googleapis_auth: any + provider: ^4.3.2+2 + +dev_dependencies: + flutter_test: + sdk: flutter + +flutter: + uses-material-design: true + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg