commit 12d6264d9624c287d50b13531ab4f25cb7ebcf64 Author: tamojit Date: Wed May 11 23:41:39 2022 -0700 initial commit diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..15f6107 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..87e13c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# See https://www.dartlang.org/guides/libraries/private-files + +# Files and directories created by pub +.dart_tool/ +.packages +build/ +# If you're building an application, you may want to check-in your pubspec.lock +pubspec.lock + +# Directory created by dartdoc +# If you don't generate documentation locally you can remove this line. +doc/api/ + +# Avoid committing generated Javascript files: +*.dart.js +*.info.json # Produced by the --dump-info flag. +*.js # When generated by dart2js. Don't specify *.js if your + # project includes source files written in JavaScript. +*.js_ +*.js.deps +*.js.map +.idea +/.flutter-plugins +/.flutter-plugins-dependencies diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7a9dfa0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c904f1b --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# itas-mob + + diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +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 +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..06eaca9 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,71 @@ +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 31 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.blog_app_v2" + minSdkVersion 19 + targetSdkVersion 31 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + multiDexEnabled true + } + + 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" + implementation 'com.google.android.gms:play-services-ads:7.5.0' + implementation 'com.android.support:multidex:1.0.3' +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..e00a36e --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0c1c135 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java b/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java new file mode 100644 index 0000000..9213f13 --- /dev/null +++ b/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java @@ -0,0 +1,20 @@ +// Generated file. +// If you wish to remove Flutter's multidex support, delete this entire file. + +package io.flutter.app; + +import android.content.Context; +import androidx.annotation.CallSuper; +import androidx.multidex.MultiDex; + +/** + * Extension of {@link io.flutter.app.FlutterApplication}, adding multidex support. + */ +public class FlutterMultiDexApplication extends FlutterApplication { + @Override + @CallSuper + protected void attachBaseContext(Context base) { + super.attachBaseContext(base); + MultiDex.install(this); + } +} diff --git a/android/app/src/main/kotlin/com/example/blog_app_v2/MainActivity.kt b/android/app/src/main/kotlin/com/example/blog_app_v2/MainActivity.kt new file mode 100644 index 0000000..76aad0a --- /dev/null +++ b/android/app/src/main/kotlin/com/example/blog_app_v2/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.blog_app_v2 + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..449a9f9 --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..d74aa35 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..e00a36e --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..c45f25c --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,29 @@ +buildscript { + ext.kotlin_version = '1.5.31' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..bc6a58a --- /dev/null +++ b/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-6.7-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/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/assets/Pacifico-Regular.ttf b/assets/Pacifico-Regular.ttf new file mode 100644 index 0000000..27765d0 Binary files /dev/null and b/assets/Pacifico-Regular.ttf differ diff --git a/assets/facebook.png b/assets/facebook.png new file mode 100644 index 0000000..06ec035 Binary files /dev/null and b/assets/facebook.png differ diff --git a/assets/facebook2.png b/assets/facebook2.png new file mode 100644 index 0000000..1276c93 Binary files /dev/null and b/assets/facebook2.png differ diff --git a/assets/linkedin.png b/assets/linkedin.png new file mode 100644 index 0000000..08aabe0 Binary files /dev/null and b/assets/linkedin.png differ diff --git a/assets/twitter.png b/assets/twitter.png new file mode 100644 index 0000000..54e2536 Binary files /dev/null and b/assets/twitter.png differ diff --git a/images/Screenshot_2022-02-02-23-23-20-582_com.example.blog_app_v2.jpg b/images/Screenshot_2022-02-02-23-23-20-582_com.example.blog_app_v2.jpg new file mode 100644 index 0000000..6683d57 Binary files /dev/null and b/images/Screenshot_2022-02-02-23-23-20-582_com.example.blog_app_v2.jpg differ diff --git a/images/Screenshot_2022-02-02-23-23-43-879_com.example.blog_app_v2.jpg b/images/Screenshot_2022-02-02-23-23-43-879_com.example.blog_app_v2.jpg new file mode 100644 index 0000000..f29187b Binary files /dev/null and b/images/Screenshot_2022-02-02-23-23-43-879_com.example.blog_app_v2.jpg differ diff --git a/images/Screenshot_2022-02-02-23-23-53-174_com.example.blog_app_v2.jpg b/images/Screenshot_2022-02-02-23-23-53-174_com.example.blog_app_v2.jpg new file mode 100644 index 0000000..33bc68f Binary files /dev/null and b/images/Screenshot_2022-02-02-23-23-53-174_com.example.blog_app_v2.jpg differ diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.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/ephemeral/ +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/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..8d4492f --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..1e8c3c9 --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..ff168e3 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,34 @@ +PODS: + - Flutter (1.0.0) + - hexcolor (0.0.1): + - Flutter + - path_provider_ios (0.0.1): + - Flutter + - webview_flutter_wkwebview (0.0.1): + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - hexcolor (from `.symlinks/plugins/hexcolor/ios`) + - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + hexcolor: + :path: ".symlinks/plugins/hexcolor/ios" + path_provider_ios: + :path: ".symlinks/plugins/path_provider_ios/ios" + webview_flutter_wkwebview: + :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" + +SPEC CHECKSUMS: + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89 + path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 + webview_flutter_wkwebview: 005fbd90c888a42c5690919a1527ecc6649e1162 + +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c + +COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f82c6bf --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,548 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + 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 */; }; + DA5BCAAAE9DB3435E45DF9F5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18369F226F7EAF0F0170F1C0 /* Pods_Runner.framework */; }; +/* 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 = ""; }; + 18369F226F7EAF0F0170F1C0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3D55264A600F41A353071573 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 6569393B37CE8F6EE3A78B32 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 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 = ""; }; + 7F282EE7701B0D0CB095D055 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 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 = ( + DA5BCAAAE9DB3435E45DF9F5 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 204D34F05A8F4255C523C176 /* Pods */ = { + isa = PBXGroup; + children = ( + 3D55264A600F41A353071573 /* Pods-Runner.debug.xcconfig */, + 6569393B37CE8F6EE3A78B32 /* Pods-Runner.release.xcconfig */, + 7F282EE7701B0D0CB095D055 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 6A5806B1833E029C0954027C /* Frameworks */ = { + isa = PBXGroup; + children = ( + 18369F226F7EAF0F0170F1C0 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 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 */, + 204D34F05A8F4255C523C176 /* Pods */, + 6A5806B1833E029C0954027C /* Frameworks */, + ); + 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 = ( + C948D0FC8D6C4A48630ABAAC /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 60FA727985EFF7E7BF903D47 /* [CP] Embed Pods Frameworks */, + ); + 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 = 1300; + 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"; + }; + 60FA727985EFF7E7BF903D47 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 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"; + }; + C948D0FC8D6C4A48630ABAAC /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* 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 = 9.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; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.blogAppV2; + 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 = 9.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 = 9.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; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm86; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.blogAppV2; + 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; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.blogAppV2; + 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/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..3db53b6 --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/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/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/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/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/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/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/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/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..ea74c0e --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + sentientgeeks_flutter_architecture + 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/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/lib/app/app.dart b/lib/app/app.dart new file mode 100644 index 0000000..e96d998 --- /dev/null +++ b/lib/app/app.dart @@ -0,0 +1,27 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:itasmob/presentation/resources/routes_manager.dart'; +import 'package:flutter/material.dart'; + +class MyApp extends StatefulWidget { + MyApp._internal(); // private named constructor + int appState = 0; + static final MyApp instance = + MyApp._internal(); // single instance -- singleton + + factory MyApp() => instance; // factory for the class instance + + @override + _MyAppState createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + initialRoute: Routes.splashRoute, + onGenerateRoute: RouteGenerator.getRoute, + ); + } +} \ No newline at end of file diff --git a/lib/app/constants.dart b/lib/app/constants.dart new file mode 100644 index 0000000..7036721 --- /dev/null +++ b/lib/app/constants.dart @@ -0,0 +1,6 @@ +class Constants{ + static const String baseUrl = "https://newsapi.org"; + static const String apiKey = "640f7435fec643d6abdd8eb6de375859"; +} + + diff --git a/lib/app/di.dart b/lib/app/di.dart new file mode 100644 index 0000000..6da8230 --- /dev/null +++ b/lib/app/di.dart @@ -0,0 +1,53 @@ +import 'package:itasmob/data/data_source/remote_data_source.dart'; +import 'package:itasmob/data/network/app_api.dart'; +import 'package:itasmob/data/network/dio_factory.dart'; +import 'package:itasmob/data/network/network_info.dart'; +import 'package:itasmob/data/repository/repository_impl.dart'; +import 'package:itasmob/domain/repository/repository.dart'; +import 'package:itasmob/domain/usecase/get_news_usecase.dart'; +import 'package:itasmob/presentation/home/home_vm.dart'; +import 'package:data_connection_checker_tv/data_connection_checker.dart'; +import 'package:get_it/get_it.dart'; + + +final instance = GetIt.instance; + +Future initAppModule() async { + + // network info + instance.registerLazySingleton( + () => NetworkInfoImpl(DataConnectionChecker())); + + // dio factory + instance.registerLazySingleton(() => DioFactory()); + + + // app service client + final dio = await instance().getDio(); + instance.registerLazySingleton(() => AppServiceClient(dio)); + + // remote data source + instance.registerLazySingleton( + () => RemoteDataSourceImplementer(instance())); + + + // repository + instance.registerLazySingleton( + () => RepositoryImpl(instance(), instance(),)); + +} + +initHomeModule() { + if (!GetIt.I.isRegistered()) { + instance.registerFactory(() => GetNewsUseCase(instance())); + instance.registerFactory(() => HomeViewModel(instance())); + + } +} + + +resetModules() { + instance.reset(dispose: false); + initAppModule(); + initHomeModule(); +} diff --git a/lib/app/extension.dart b/lib/app/extension.dart new file mode 100644 index 0000000..fd542c8 --- /dev/null +++ b/lib/app/extension.dart @@ -0,0 +1,23 @@ +const EMPTY = ""; +const ZERO = 0; + +extension NonNullString on String{ + String orEmpty(){ + if(this == null){ + return EMPTY; + } else { + return this; + } + } +} + + +extension NonNullInt on int{ + int orEmpty(){ + if(this == null){ + return ZERO; + } else { + return this; + } + } +} \ No newline at end of file diff --git a/lib/data/data_source/remote_data_source.dart b/lib/data/data_source/remote_data_source.dart new file mode 100644 index 0000000..48249b4 --- /dev/null +++ b/lib/data/data_source/remote_data_source.dart @@ -0,0 +1,16 @@ +import 'package:itasmob/data/network/app_api.dart'; +import 'package:itasmob/data/response/responses.dart'; + +abstract class RemoteDataSource{ + Future getNews(); +} + + +class RemoteDataSourceImplementer implements RemoteDataSource{ + AppServiceClient _appServiceClient; + RemoteDataSourceImplementer(this._appServiceClient); + @override + Future getNews() async{ + return await _appServiceClient.getNews(); + } +} \ No newline at end of file diff --git a/lib/data/mapper/mapper.dart b/lib/data/mapper/mapper.dart new file mode 100644 index 0000000..7536c5e --- /dev/null +++ b/lib/data/mapper/mapper.dart @@ -0,0 +1,30 @@ +//Here is the mapper that converts the response from the endpoints to non nullable object (model) + +import 'package:itasmob/app/extension.dart'; +import 'package:itasmob/data/response/responses.dart'; +import 'package:itasmob/domain/model/model.dart'; + +extension DataResponseMapper on DataResposne? { + Data toDomain(){ + return Data( + this?.author?.orEmpty() ?? EMPTY, + this?.title?.orEmpty() ?? EMPTY, + this?.description?.orEmpty() ?? EMPTY, + this?.url?.orEmpty() ?? EMPTY, + this?.urlToImage?.orEmpty() ?? EMPTY, + this?.content?.orEmpty() ?? EMPTY, + this?.publishedAt?.orEmpty() ?? EMPTY, + ); + } +} + +extension NewsResponseMapper on NewsResponse?{ + News toDomain(){ + List mappedData = (this?.dataResposne.articles?.map((articles) => articles.toDomain()) ?? Iterable.empty()) + .cast() + .toList(); + + var data = NewsData(mappedData); + return News(data); + } +} \ No newline at end of file diff --git a/lib/data/network/app_api.dart b/lib/data/network/app_api.dart new file mode 100644 index 0000000..7802999 --- /dev/null +++ b/lib/data/network/app_api.dart @@ -0,0 +1,16 @@ + +import 'package:itasmob/app/constants.dart'; +import 'package:itasmob/data/response/responses.dart'; +import 'package:dio/dio.dart'; +import 'package:retrofit/http.dart'; +part 'app_api.g.dart'; + +@RestApi(baseUrl: Constants.baseUrl) +abstract class AppServiceClient{ + factory AppServiceClient(Dio dio, {String baseUrl}) = _AppServiceClient; + + @GET("/v2/top-headlines?country=us&category=business&apiKey=640f7435fec643d6abdd8eb6de375859") + Future getNews(); + +} + diff --git a/lib/data/network/app_api.g.dart b/lib/data/network/app_api.g.dart new file mode 100644 index 0000000..846fd3d --- /dev/null +++ b/lib/data/network/app_api.g.dart @@ -0,0 +1,46 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'app_api.dart'; + +// ************************************************************************** +// RetrofitGenerator +// ************************************************************************** + +class _AppServiceClient implements AppServiceClient { + _AppServiceClient(this._dio, {this.baseUrl}) { + baseUrl ??= 'https://newsapi.org'; + } + + final Dio _dio; + + String? baseUrl; + + @override + Future getNews() async { + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.fetch>(_setStreamType< + NewsResponse>(Options( + method: 'GET', headers: {}, extra: _extra) + .compose(_dio.options, + '/v2/top-headlines?country=us&category=business&apiKey=640f7435fec643d6abdd8eb6de375859', + queryParameters: queryParameters, data: _data) + .copyWith(baseUrl: baseUrl ?? _dio.options.baseUrl))); + final value = NewsResponse.fromJson(_result.data!); + return value; + } + + RequestOptions _setStreamType(RequestOptions requestOptions) { + if (T != dynamic && + !(requestOptions.responseType == ResponseType.bytes || + requestOptions.responseType == ResponseType.stream)) { + if (T == String) { + requestOptions.responseType = ResponseType.plain; + } else { + requestOptions.responseType = ResponseType.json; + } + } + return requestOptions; + } +} diff --git a/lib/data/network/dio_factory.dart b/lib/data/network/dio_factory.dart new file mode 100644 index 0000000..1644d83 --- /dev/null +++ b/lib/data/network/dio_factory.dart @@ -0,0 +1,37 @@ +import 'package:itasmob/app/constants.dart'; +import 'package:dio/dio.dart'; +import 'package:flutter/foundation.dart'; +import 'package:pretty_dio_logger/pretty_dio_logger.dart'; + +const String APPLICATION_JSON = "application/json"; +const String CONTENT_TYPE = "content-type"; +const String ACCEPT = "accept"; +const String AUTHORIZATION = "authorization"; +const String DEFAULT_LANGUAGE = "language"; + +class DioFactory { + + Future getDio() async { + Dio dio = Dio(); + int _timeOut = 60 * 1000; // 1 min + Map headers = { + CONTENT_TYPE: APPLICATION_JSON, + ACCEPT: APPLICATION_JSON, + }; + + dio.options = BaseOptions( + baseUrl: Constants.baseUrl, + connectTimeout: _timeOut, + receiveTimeout: _timeOut, + headers: headers); + + // if (kReleaseMode) { + // print("release mode no logs"); + // } else { + // dio.interceptors.add(PrettyDioLogger( + // requestHeader: true, requestBody: true, responseHeader: true)); + // } + + return dio; + } +} diff --git a/lib/data/network/error_handler.dart b/lib/data/network/error_handler.dart new file mode 100644 index 0000000..6132a68 --- /dev/null +++ b/lib/data/network/error_handler.dart @@ -0,0 +1,163 @@ +import 'package:itasmob/presentation/resources/strings_manager.dart'; +import 'package:dio/dio.dart'; + +import 'failure.dart'; + +enum DataSource { + SUCCESS, + NO_CONTENT, + BAD_REQUEST, + FORBIDDEN, + UNAUTHORISED, + NOT_FOUND, + INTERNAL_SERVER_ERROR, + CONNECT_TIMEOUT, + CANCEL, + RECEIVE_TIMEOUT, + SEND_TIMEOUT, + CACHE_ERROR, + NO_INTERNET_CONNECTION, + DEFAULT +} + +class ErrorHandler implements Exception { + late Failure failure; + + ErrorHandler.handle(dynamic error) { + if (error is DioError) { + // dio error so its error from response of the API + failure = _handleError(error); + } else { + // default error + failure = DataSource.DEFAULT.getFailure(); + } + } + + Failure _handleError(DioError error) { + switch (error.type) { + case DioErrorType.connectTimeout: + return DataSource.CONNECT_TIMEOUT.getFailure(); + case DioErrorType.sendTimeout: + return DataSource.SEND_TIMEOUT.getFailure(); + case DioErrorType.receiveTimeout: + return DataSource.RECEIVE_TIMEOUT.getFailure(); + case DioErrorType.response: + switch (error.response?.statusCode) { + case ResponseCode.BAD_REQUEST: + return DataSource.BAD_REQUEST.getFailure(); + case ResponseCode.FORBIDDEN: + return DataSource.FORBIDDEN.getFailure(); + case ResponseCode.UNAUTHORISED: + return DataSource.UNAUTHORISED.getFailure(); + case ResponseCode.NOT_FOUND: + return DataSource.NOT_FOUND.getFailure(); + case ResponseCode.INTERNAL_SERVER_ERROR: + return DataSource.INTERNAL_SERVER_ERROR.getFailure(); + default: + return DataSource.DEFAULT.getFailure(); + } + case DioErrorType.cancel: + return DataSource.CANCEL.getFailure(); + case DioErrorType.other: + return DataSource.DEFAULT.getFailure(); + } + } +} + +extension DataSourceExtension on DataSource { + Failure getFailure() { + switch (this) { + case DataSource.BAD_REQUEST: + return Failure(ResponseCode.BAD_REQUEST, ResponseMessage.BAD_REQUEST); + case DataSource.FORBIDDEN: + return Failure(ResponseCode.FORBIDDEN, ResponseMessage.FORBIDDEN); + case DataSource.UNAUTHORISED: + return Failure(ResponseCode.UNAUTHORISED, ResponseMessage.UNAUTHORISED); + case DataSource.NOT_FOUND: + return Failure(ResponseCode.NOT_FOUND, ResponseMessage.NOT_FOUND); + case DataSource.INTERNAL_SERVER_ERROR: + return Failure(ResponseCode.INTERNAL_SERVER_ERROR, + ResponseMessage.INTERNAL_SERVER_ERROR); + case DataSource.CONNECT_TIMEOUT: + return Failure( + ResponseCode.CONNECT_TIMEOUT, ResponseMessage.CONNECT_TIMEOUT); + case DataSource.CANCEL: + return Failure(ResponseCode.CANCEL, ResponseMessage.CANCEL); + case DataSource.RECEIVE_TIMEOUT: + return Failure( + ResponseCode.RECEIVE_TIMEOUT, ResponseMessage.RECEIVE_TIMEOUT); + case DataSource.SEND_TIMEOUT: + return Failure(ResponseCode.SEND_TIMEOUT, ResponseMessage.SEND_TIMEOUT); + case DataSource.CACHE_ERROR: + return Failure(ResponseCode.CACHE_ERROR, ResponseMessage.CACHE_ERROR); + case DataSource.NO_INTERNET_CONNECTION: + return Failure(ResponseCode.NO_INTERNET_CONNECTION, + ResponseMessage.NO_INTERNET_CONNECTION); + case DataSource.DEFAULT: + return Failure(ResponseCode.DEFAULT, ResponseMessage.DEFAULT); + default: + return Failure(ResponseCode.DEFAULT, ResponseMessage.DEFAULT); + } + } +} + +class ResponseCode { + // API status codes + static const int SUCCESS = 200; // success with data + static const int NO_CONTENT = 201; // success with no content + static const int BAD_REQUEST = 400; // failure, api rejected the request + static const int FORBIDDEN = 403; // failure, api rejected the request + static const int UNAUTHORISED = 401; // failure user is not authorised + static const int NOT_FOUND = + 404; // failure, api url is not correct and not found + static const int INTERNAL_SERVER_ERROR = + 500; // failure, crash happened in server side + + // local status code + static const int DEFAULT = -1; + static const int CONNECT_TIMEOUT = -2; + static const int CANCEL = -3; + static const int RECEIVE_TIMEOUT = -4; + static const int SEND_TIMEOUT = -5; + static const int CACHE_ERROR = -6; + static const int NO_INTERNET_CONNECTION = -7; +} + +class ResponseMessage { + // API status codes + // API response codes + static const String SUCCESS = AppStrings.success; // success with data + static const String NO_CONTENT = + AppStrings.noContent; // success with no content + static const String BAD_REQUEST = + AppStrings.badRequestError; // failure, api rejected our request + static const String FORBIDDEN = + AppStrings.forbiddenError; // failure, api rejected our request + static const String UNAUTHORISED = + AppStrings.unauthorizedError; // failure, user is not authorised + static const String NOT_FOUND = AppStrings + .notFoundError; // failure, API url is not correct and not found in api side. + static const String INTERNAL_SERVER_ERROR = + AppStrings.internalServerError; // failure, a crash happened in API side. + + // local responses codes + static const String DEFAULT = + AppStrings.defaultError; // unknown error happened + static const String CONNECT_TIMEOUT = + AppStrings.timeoutError; // issue in connectivity + static const String CANCEL = + AppStrings.defaultError; // API request was cancelled + static const String RECEIVE_TIMEOUT = + AppStrings.timeoutError; // issue in connectivity + static const String SEND_TIMEOUT = + AppStrings.timeoutError; // issue in connectivity + static const String CACHE_ERROR = AppStrings + .defaultError; // issue in getting data from local data source (cache) + static const String NO_INTERNET_CONNECTION = + AppStrings.noInternetError; // issue in connectivity +} + +class ApiInternalStatus { + static const String SUCCESS = "ok"; + static const int FAILURE = 1; +} diff --git a/lib/data/network/failure.dart b/lib/data/network/failure.dart new file mode 100644 index 0000000..47d6223 --- /dev/null +++ b/lib/data/network/failure.dart @@ -0,0 +1,6 @@ +class Failure{ + int code; + String message; + + Failure(this.code, this.message); +} \ No newline at end of file diff --git a/lib/data/network/network_info.dart b/lib/data/network/network_info.dart new file mode 100644 index 0000000..e2659e4 --- /dev/null +++ b/lib/data/network/network_info.dart @@ -0,0 +1,15 @@ +import 'package:data_connection_checker_tv/data_connection_checker.dart'; + +abstract class NetworkInfo{ + Future get isConnected; +} + +class NetworkInfoImpl implements NetworkInfo{ + DataConnectionChecker _dataConnectionChecker; + + NetworkInfoImpl(this._dataConnectionChecker); + @override + + Future get isConnected => _dataConnectionChecker.hasConnection; + +} \ No newline at end of file diff --git a/lib/data/repository/repository_impl.dart b/lib/data/repository/repository_impl.dart new file mode 100644 index 0000000..6f765d8 --- /dev/null +++ b/lib/data/repository/repository_impl.dart @@ -0,0 +1,39 @@ +import 'package:itasmob/data/data_source/remote_data_source.dart'; +import 'package:itasmob/data/network/error_handler.dart'; +import 'package:itasmob/data/network/network_info.dart'; +import 'package:itasmob/domain/model/model.dart'; +import 'package:itasmob/data/network/failure.dart'; +import 'package:itasmob/domain/repository/repository.dart'; +import 'package:dartz/dartz.dart'; +import 'package:itasmob/data/mapper/mapper.dart'; + +class RepositoryImpl implements Repository{ + RemoteDataSource _remoteDataSource; + NetworkInfo _networkInfo; + + RepositoryImpl(this._remoteDataSource, this._networkInfo); + @override + Future> getNews() async{ + if(await _networkInfo.isConnected){ + final response = await _remoteDataSource.getNews(); + print(response); + try { + final response = await _remoteDataSource.getNews(); + print(response); + if(response.status == ApiInternalStatus.SUCCESS){ + print(response.dataResposne); + return Right(response.toDomain()); + } else { + return Left(Failure(ApiInternalStatus.FAILURE, ResponseMessage.DEFAULT)); + } + } catch (error) { + print("this is the error $error.toString()"); + + return (Left(ErrorHandler.handle(error).failure)); + } + } else { + return Left(DataSource.NO_INTERNET_CONNECTION.getFailure()); + } + } + +} \ No newline at end of file diff --git a/lib/data/response/responses.dart b/lib/data/response/responses.dart new file mode 100644 index 0000000..4e0a852 --- /dev/null +++ b/lib/data/response/responses.dart @@ -0,0 +1,65 @@ +import 'package:json_annotation/json_annotation.dart'; +part 'responses.g.dart'; + + +@JsonSerializable() +class BaseResponse{ + @JsonKey(name: "status") + String? status; + @JsonKey(name: "totalResults") + int? totalResults; +} + +@JsonSerializable() +class DataResposne{ + @JsonKey(name: "author") + String? author; + @JsonKey(name: "title") + String? title; + @JsonKey(name: "description") + String? description; + @JsonKey(name: "url") + String? url; + @JsonKey(name: "urlToImage") + String? urlToImage; + @JsonKey(name: "content") + String? content; + @JsonKey(name: "publishedAt") + String? publishedAt; + + DataResposne(this.author, this.title, this.description, this.url, this.urlToImage, this.content, this.publishedAt); + + //from json + factory DataResposne.fromJson(Map json) => _$DataResposneFromJson(json); + + //to json + Map toJson() => _$DataResposneToJson(this); +} + +@JsonSerializable() +class HomeDataResponse{ + @JsonKey(name: "articles") + List? articles; + + HomeDataResponse(this.articles); + + //from json + factory HomeDataResponse.fromJson(Map json) => _$HomeDataResponseFromJson(json); + + //to json + Map toJson() => _$HomeDataResponseToJson(this); +} + +@JsonSerializable() +class NewsResponse extends BaseResponse{ + @JsonKey(name: "data") + HomeDataResponse dataResposne; + + NewsResponse(this.dataResposne); + + //from json + factory NewsResponse.fromJson(Map json) => _$NewsResponseFromJson(json); + + //to json + Map toJson() => _$NewsResponseToJson(this); +} \ No newline at end of file diff --git a/lib/data/response/responses.g.dart b/lib/data/response/responses.g.dart new file mode 100644 index 0000000..d515cf2 --- /dev/null +++ b/lib/data/response/responses.g.dart @@ -0,0 +1,64 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'responses.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BaseResponse _$BaseResponseFromJson(Map json) { + return BaseResponse()..status = json['status'] as String?; +} + +Map _$BaseResponseToJson(BaseResponse instance) => + { + 'status': instance.status, + }; + +DataResposne _$DataResposneFromJson(Map json) { + return DataResposne( + json['author'] as String?, + json['title'] as String?, + json['description'] as String?, + json['url'] as String?, + json['urlToImage'] as String?, + json['content'] as String?, + json['publishedAt'] as String?, + ); +} + +Map _$DataResposneToJson(DataResposne instance) => + { + 'author': instance.author, + 'title': instance.title, + 'description': instance.description, + 'url': instance.url, + 'urlToImage': instance.urlToImage, + 'content': instance.content, + 'publishedAt': instance.publishedAt, + }; + +HomeDataResponse _$HomeDataResponseFromJson(Map json) { + return HomeDataResponse( + (json['articles'] as List?) + ?.map((e) => DataResposne.fromJson(e as Map)) + .toList(), + ); +} + +Map _$HomeDataResponseToJson(HomeDataResponse instance) => + { + 'articles': instance.articles, + }; + +NewsResponse _$NewsResponseFromJson(Map json) { + return NewsResponse( + HomeDataResponse.fromJson(json), + )..status = json['status'] as String?; +} + +Map _$NewsResponseToJson(NewsResponse instance) => + { + 'status': instance.status, + 'data': instance.dataResposne, + }; diff --git a/lib/domain/model/model.dart b/lib/domain/model/model.dart new file mode 100644 index 0000000..3943ae5 --- /dev/null +++ b/lib/domain/model/model.dart @@ -0,0 +1,25 @@ +class Data{ + String author; + String title; + String description; + String url; + String urlToImage; + String content; + String publishedAt; + + Data(this.author, this.title, this.description, this.url, this.urlToImage, this.content, this.publishedAt); +} + +class NewsData{ + List data; + + NewsData(this.data); +} + + + +class News{ + NewsData newsData; + + News(this.newsData); +} \ No newline at end of file diff --git a/lib/domain/repository/repository.dart b/lib/domain/repository/repository.dart new file mode 100644 index 0000000..5a6fe41 --- /dev/null +++ b/lib/domain/repository/repository.dart @@ -0,0 +1,7 @@ +import 'package:itasmob/data/network/failure.dart'; +import 'package:itasmob/domain/model/model.dart'; +import 'package:dartz/dartz.dart'; + +abstract class Repository{ + Future> getNews(); +} \ No newline at end of file diff --git a/lib/domain/usecase/base_usecase.dart b/lib/domain/usecase/base_usecase.dart new file mode 100644 index 0000000..45d231a --- /dev/null +++ b/lib/domain/usecase/base_usecase.dart @@ -0,0 +1,6 @@ +import 'package:itasmob/data/network/failure.dart'; +import 'package:dartz/dartz.dart'; + +abstract class BaseUseCase{ + Future> execute(In input); +} \ No newline at end of file diff --git a/lib/domain/usecase/get_news_usecase.dart b/lib/domain/usecase/get_news_usecase.dart new file mode 100644 index 0000000..3384e62 --- /dev/null +++ b/lib/domain/usecase/get_news_usecase.dart @@ -0,0 +1,15 @@ +import 'package:itasmob/data/network/failure.dart'; +import 'package:itasmob/domain/model/model.dart'; +import 'package:itasmob/domain/repository/repository.dart'; +import 'package:itasmob/domain/usecase/base_usecase.dart'; +import 'package:dartz/dartz.dart'; + +class GetNewsUseCase extends BaseUseCase { + Repository _repository; + + GetNewsUseCase(this._repository); + @override + Future> execute(void input) async{ + return await _repository.getNews(); + } +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..bba94e1 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,10 @@ +import 'package:flutter/material.dart'; + +import 'app/app.dart'; +import 'app/di.dart'; + +void main() async{ + WidgetsFlutterBinding.ensureInitialized(); + await initAppModule(); + runApp(MyApp()); +} \ No newline at end of file diff --git a/lib/presentation/base/base_viewmodel.dart b/lib/presentation/base/base_viewmodel.dart new file mode 100644 index 0000000..99d8755 --- /dev/null +++ b/lib/presentation/base/base_viewmodel.dart @@ -0,0 +1,14 @@ +abstract class BaseViewModel extends BaseViewModelInput with BaseViewModelOutputs{ + +} + +abstract class BaseViewModelInput{ + void start(); + void dispose(); + + Sink get inputState; +} + +abstract class BaseViewModelOutputs{ + Stream get outputState; +} \ No newline at end of file diff --git a/lib/presentation/common/theme_helper.dart b/lib/presentation/common/theme_helper.dart new file mode 100644 index 0000000..87ab404 --- /dev/null +++ b/lib/presentation/common/theme_helper.dart @@ -0,0 +1,95 @@ +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; + +class ThemeHelper{ + + InputDecoration textInputDecoration([String lableText="", String hintText = ""]){ + return InputDecoration( + labelText: lableText, + hintText: hintText, + fillColor: Colors.white, + filled: true, + contentPadding: EdgeInsets.fromLTRB(20, 10, 20, 10), + focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide(color: Colors.grey)), + enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide(color: Colors.grey.shade400)), + errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide(color: Colors.red, width: 2.0)), + focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(100.0), borderSide: BorderSide(color: Colors.red, width: 2.0)), + ); + } + + BoxDecoration inputBoxDecorationShaddow() { + return BoxDecoration(boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.7), + blurRadius: 20, + offset: const Offset(0, 5), + ) + ]); + } + + BoxDecoration buttonBoxDecoration(BuildContext context, [String color1 = "", String color2 = ""]) { + Color c1 = Theme.of(context).primaryColor; + Color c2 = Theme.of(context).accentColor; + if (color1.isEmpty == false) { + c1 = HexColor(color1); + } + if (color2.isEmpty == false) { + c2 = HexColor(color2); + } + + return BoxDecoration( + boxShadow: [ + BoxShadow(color: Colors.black26, offset: Offset(0, 4), blurRadius: 5.0) + ], + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + stops: [0.0, 1.0], + colors: [ + c1, + c2, + ], + ), + color: Colors.deepPurple.shade300, + borderRadius: BorderRadius.circular(30), + ); + } + + ButtonStyle buttonStyle() { + return ButtonStyle( + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0), + ), + ), + minimumSize: MaterialStateProperty.all(Size(50, 50)), + backgroundColor: MaterialStateProperty.all(Colors.transparent), + shadowColor: MaterialStateProperty.all(Colors.transparent), + ); + } + + AlertDialog alartDialog(String title, String content, BuildContext context) { + return AlertDialog( + title: Text(title), + content: Text(content), + actions: [ + TextButton( + child: Text( + "OK", + style: TextStyle(color: Colors.white), + ), + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.black38)), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + } + +} + +class LoginFormStyle{ + +} \ No newline at end of file diff --git a/lib/presentation/details/details.dart b/lib/presentation/details/details.dart new file mode 100644 index 0000000..f63806d --- /dev/null +++ b/lib/presentation/details/details.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class DetailsView extends StatelessWidget { + const DetailsView({ Key? key }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + + ); + } +} \ No newline at end of file diff --git a/lib/presentation/home/home_vm.dart b/lib/presentation/home/home_vm.dart new file mode 100644 index 0000000..1247150 --- /dev/null +++ b/lib/presentation/home/home_vm.dart @@ -0,0 +1,67 @@ +import 'dart:async'; + +import 'package:itasmob/domain/model/model.dart'; +import 'package:itasmob/domain/usecase/get_news_usecase.dart'; +import 'package:itasmob/presentation/base/base_viewmodel.dart'; + +class HomeViewModel extends BaseViewModel with HomeViewModelInput, HomeViewModelOutputs{ + GetNewsUseCase _getNewsUseCase; + + HomeViewModel(this._getNewsUseCase); + + final StreamController _dataStreamController = StreamController.broadcast(); + + @override + void dispose() { + _dataStreamController.close(); + } + + @override + + Sink get inputState => throw UnimplementedError(); + + @override + + Stream get outputState => throw UnimplementedError(); + + @override + void start() { + // _getNews(); + } + + // //private functions + // _getNews() async{ + // // ignore: void_checks + // (await _getNewsUseCase.execute(Void)).fold((l) => null, (newsObject) { + // inputHomeData.add(NewsViewObject(newsObject.newsData.data)); + // }); + // } + + + + @override + + Stream get outputHomeData => _dataStreamController.stream.map((data) => data); + + @override + + Sink get inputHomeData => _dataStreamController.sink; + +} + + + + +abstract class HomeViewModelInput{ + Sink get inputHomeData; +} + +abstract class HomeViewModelOutputs{ + Stream get outputHomeData; +} + +class NewsViewObject{ + List data; + + NewsViewObject(this.data); +} \ No newline at end of file diff --git a/lib/presentation/home/index.dart b/lib/presentation/home/index.dart new file mode 100644 index 0000000..ec08ce3 --- /dev/null +++ b/lib/presentation/home/index.dart @@ -0,0 +1,139 @@ +// import 'package:blog_app/widgets/Text.dart'; +// ignore_for_file: prefer_const_constructors +import 'package:itasmob/app/di.dart'; +import 'package:itasmob/presentation/home/home_vm.dart'; +import 'package:flutter/material.dart'; +import 'package:charts_flutter/flutter.dart' as charts; +import '../../widgets/header_widgets.dart'; +import '../common/theme_helper.dart'; + +class HomeView extends StatefulWidget { + const HomeView({Key? key}): super(key:key); + + @override + _HomePageState createState() => _HomePageState(); +} + +class PieData { + PieData(this.activity, this.time); + String activity; + double time; + +} + + +class _HomePageState extends State{ + double _headerHeight = 150; + Key _formKey = GlobalKey(); + int _selectedIndex = 0; + late List> _pieData; + + @override void initState() { + super.initState(); + _pieData = >[]; +} + + generateData() { + var piedata = [ + new PieData('Work', 35.8), + new PieData('Eat', 8.3), + new PieData('Commute', 10.8), + new PieData('TV', 15.6), + new PieData('Sleep', 19.2), + new PieData('Other', 10.3), + ]; + _pieData.add( + charts.Series( + domainFn: (PieData data, _) => data.activity, + measureFn: (PieData data, _) => data.time, + id: 'Time spent', + data: piedata, + labelAccessorFn: (PieData row, _) => '${row.activity}', + ), + ); + return _pieData; +} + + + + @override + Widget build(BuildContext context) { + + return Scaffold( + backgroundColor: Colors.white, + body: SingleChildScrollView( + child: Column( + children: [ + Container( + height: _headerHeight, + child: HeaderWidget(_headerHeight, true, Icons.person), + ), + SafeArea( + child: Container( + padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + margin: EdgeInsets.fromLTRB(20, 10, 20, 10),// This will be the login form + child: Column( + children: [ + Text( + 'Homepage', + style: TextStyle(fontSize: 40,color: Colors.indigoAccent , fontWeight: FontWeight.bold), + ), + Text( + '', + style: TextStyle(color: Colors.grey), + ), + SizedBox(height: 0.0), + Form( + key: _formKey, + child: Column( + children: [ + Container( + child: TextField( + decoration: ThemeHelper().textInputDecoration('search'), + ), + decoration: ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 20.0), + SizedBox(height: 15.0), + ] + ), + ), + ] + ), + ), + ), + ] + ), + ), + bottomNavigationBar: BottomNavigationBar( + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.home), + label: 'Home', + backgroundColor: Colors.white, + ), + BottomNavigationBarItem( + icon: Icon(Icons.badge_rounded), + label: 'Business', + backgroundColor: Colors.white, + ), + BottomNavigationBarItem( + icon: Icon(Icons.school), + label: 'School', + backgroundColor: Colors.white, + ), + BottomNavigationBarItem( + icon: Icon(Icons.settings), + label: 'Settings', + backgroundColor: Colors.white, + ), + ], + currentIndex: _selectedIndex, + unselectedItemColor: Colors.black, + selectedItemColor: Colors.blue, + ), + + ); + } +} + \ No newline at end of file diff --git a/lib/presentation/login/login.dart b/lib/presentation/login/login.dart new file mode 100644 index 0000000..79c68e8 --- /dev/null +++ b/lib/presentation/login/login.dart @@ -0,0 +1,180 @@ +import 'package:itasmob/presentation/home/index.dart'; +import 'package:itasmob/presentation/register/register.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:itasmob/widgets/header_widgets.dart'; +import 'package:flutter/material.dart'; + +import '../common/theme_helper.dart'; + + +class LoginView extends StatefulWidget { + + const LoginView({ Key? key }) : super(key: key); + + @override + _LoginPageState createState() => _LoginPageState(); +} + +class _LoginPageState extends State { + double _headerHeight = 250; + Key _formKey = GlobalKey(); + late TextEditingController _emailController; + late TextEditingController _passwordController; + + @override + void initState() { + super.initState(); + _emailController = TextEditingController(); + _passwordController = TextEditingController(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: SingleChildScrollView( + child: Column( + children: [ + Container( + height: _headerHeight, + child: HeaderWidget(_headerHeight, true, Icons.person), + ), + SafeArea( + child: Container( + padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + margin: EdgeInsets.fromLTRB( + 20, 10, 20, 10), // This will be the login form + child: Column( + children: [ + Text( + 'Welcome GoPlanners!', + style: TextStyle( + fontSize: 30, + color: Colors.indigoAccent, + fontWeight: FontWeight.bold), + ), + Text( + '', + style: TextStyle(color: Colors.grey), + ), + SizedBox(height: 30.0), + Form( + key: _formKey, + child: Column( + children: [ + Container( + child: TextField( + controller: _emailController, + decoration: ThemeHelper().textInputDecoration( + 'User Name', 'Enter your user name'), + ), + decoration: + ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 30.0), + Container( + child: TextField( + controller: _passwordController, + obscureText: true, + decoration: ThemeHelper().textInputDecoration( + 'Password', 'Enter your password'), + ), + decoration: + ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 15.0), + Container( + margin: EdgeInsets.fromLTRB(10, 0, 10, 20), + alignment: Alignment.topRight, + child: GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + + HomeView() + ), + ); + }, + child: Text( + "Forgot your password?", + style: TextStyle( + color: Colors.lightBlue, + ), + ), + ), + ), + Container( + decoration: + ThemeHelper().buttonBoxDecoration(context), + child: ElevatedButton( + style: ThemeHelper().buttonStyle(), + child: Padding( + padding: + EdgeInsets.fromLTRB(40, 10, 40, 10), + child: Text( + 'Sign In'.toUpperCase(), + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.white), + ), + ), + onPressed: () async { + // await ApiService() + // .loginUser(User( + // email: _emailController.text, + // password: _passwordController.text)) + // .then((data) { + // if (data.access_token!.isNotEmpty) { + // Navigator.pushReplacement( + // context, + // MaterialPageRoute( + // builder: (context) => + // ProfilePage())); + // } else { + // showAlert( + // context: context, title: data.msg); + // } + // ; + // }); + + //After successful login we will redirect to profile page. Let's create profile page now + }, + ), + ), + Container( + margin: EdgeInsets.fromLTRB(10, 20, 10, 20), + //child: Text('Don\'t have an account? Create'), + child: Text.rich(TextSpan(children: [ + TextSpan(text: "Don\'t have an account? "), + TextSpan( + text: 'signup', + recognizer: TapGestureRecognizer() + ..onTap = () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + RegisterView())); + }, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Theme.of(context).accentColor), + ), + ])), + ), + ], + )), + ], + )), + ), + ], + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/presentation/register/register.dart b/lib/presentation/register/register.dart new file mode 100644 index 0000000..f4aa913 --- /dev/null +++ b/lib/presentation/register/register.dart @@ -0,0 +1,243 @@ +import 'package:itasmob/presentation/common/theme_helper.dart'; +import 'package:itasmob/presentation/home/index.dart'; +import 'package:itasmob/presentation/login/login.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; + +import '../../widgets/header_widgets.dart'; + +class RegisterView extends StatefulWidget { + const RegisterView({ Key? key }) : super(key: key); + + @override + State createState() { + return _RegistrationPageState(); + } +} +class _RegistrationPageState extends State{ + + final _formKey = GlobalKey(); + bool checkedValue = false; + bool checkboxValue = false; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: SingleChildScrollView( + child: Stack( + children: [ + Container( + height: 150, + child: HeaderWidget(150, false, Icons.person_add_alt_1_rounded), + ), + Container( + margin: EdgeInsets.fromLTRB(25, 50, 25, 10), + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + alignment: Alignment.center, + child: Column( + children: [ + Form( + key: _formKey, + child: Column( + children: [ + GestureDetector( + child: Stack( + children: [ + Container( + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100), + border: Border.all( + width: 5, color: Colors.white), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 20, + offset: const Offset(5, 5), + ), + ], + ), + child: Icon( + Icons.person, + color: Colors.grey.shade300, + size: 80.0, + ), + ), + Container( + padding: EdgeInsets.fromLTRB(80, 80, 0, 0), + child: Icon( + Icons.add_circle, + color: Colors.grey.shade700, + size: 25.0, + ), + ), + ], + ), + ), + SizedBox(height: 30,), + Container( + child: TextFormField( + decoration: ThemeHelper().textInputDecoration('First Name', 'Enter your first name'), + ), + decoration: ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 30,), + Container( + child: TextFormField( + decoration: ThemeHelper().textInputDecoration('Last Name', 'Enter your last name'), + ), + decoration: ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 20.0), + Container( + child: TextFormField( + decoration: ThemeHelper().textInputDecoration("E-mail address", "Enter your email"), + keyboardType: TextInputType.emailAddress, + validator: (val) { + if(!(val!.isEmpty) && !RegExp(r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$").hasMatch(val)){ + return "Enter a valid email address"; + } + return null; + }, + ), + decoration: ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 20.0), + Container( + child: TextFormField( + decoration: ThemeHelper().textInputDecoration( + "Mobile Number", + "Enter your mobile number"), + keyboardType: TextInputType.phone, + validator: (val) { + if(!(val!.isEmpty) && !RegExp(r"^(\d+)*$").hasMatch(val)){ + return "Enter a valid phone number"; + } + return null; + }, + ), + decoration: ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 20.0), + Container( + child: TextFormField( + obscureText: true, + decoration: ThemeHelper().textInputDecoration( + "Password*", "Enter your password"), + validator: (val) { + if (val!.isEmpty) { + return "Please enter your password"; + } + return null; + }, + ), + decoration: ThemeHelper().inputBoxDecorationShaddow(), + ), + SizedBox(height: 15.0), + FormField( + builder: (state) { + return Column( + children: [ + Row( + children: [ + Checkbox( + value: checkboxValue, + onChanged: (value) { + setState(() { + checkboxValue = value!; + state.didChange(value); + }); + }), + Text("I accept all terms and conditions.", style: TextStyle(color: Colors.grey),), + ], + ), + Container( + alignment: Alignment.centerLeft, + child: Text( + state.errorText ?? '', + textAlign: TextAlign.left, + style: TextStyle(color: Theme.of(context).errorColor,fontSize: 12,), + ), + ) + ], + ); + }, + validator: (value) { + if (!checkboxValue) { + return 'You need to accept terms and conditions'; + } else { + return null; + } + }, + ), + SizedBox(height: 20.0), + Container( + decoration: ThemeHelper().buttonBoxDecoration(context), + child: ElevatedButton( + style: ThemeHelper().buttonStyle(), + child: Padding( + padding: const EdgeInsets.fromLTRB(40, 10, 40, 10), + child: Text( + "Register".toUpperCase(), + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + ), + onPressed: () { + if (_formKey.currentState!.validate()) { + Navigator.of(context).pushAndRemoveUntil( + MaterialPageRoute( + builder: (context) => HomeView() + ), + (Route route) => false + ); + } + }, + ), + ), + + Container( + margin: EdgeInsets.fromLTRB(10, 20, 10, 20), + //child: Text('Don\'t have an account? Create'), + child: Text.rich(TextSpan(children: [ + TextSpan(text: "Already have an account? "), + TextSpan( + text: 'Login', + recognizer: TapGestureRecognizer() + ..onTap = () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + LoginView())); + }, + style: TextStyle( + fontWeight: FontWeight.bold, + color: Theme.of(context).accentColor), + ), + ])), + ), + SizedBox(height: 30.0), + Text("Or create account using social media", style: TextStyle(color: Colors.grey),), + SizedBox(height: 25.0), + + ], + ), + ), + ], + ), + ), + ], + ), + ), + ); + } + +} \ No newline at end of file diff --git a/lib/presentation/resources/routes_manager.dart b/lib/presentation/resources/routes_manager.dart new file mode 100644 index 0000000..d1310e1 --- /dev/null +++ b/lib/presentation/resources/routes_manager.dart @@ -0,0 +1,45 @@ +import 'package:itasmob/app/di.dart'; +import 'package:itasmob/presentation/details/details.dart'; +import 'package:itasmob/presentation/home/index.dart'; +import 'package:itasmob/presentation/login/login.dart'; +import 'package:itasmob/presentation/register/register.dart'; +import 'package:itasmob/presentation/splash/splash.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + + +class Routes{ + static const String splashRoute = "/splash"; + static const String loginRoute = "/login"; + static const String registerRoute = "/register"; + static const String homeRoute = "/home"; + static const String detailsRoute = "/details"; +} + +class RouteGenerator{ + static Route getRoute (RouteSettings routeSettings){ + switch (routeSettings.name){ + case Routes.splashRoute : + return MaterialPageRoute(builder: (_) => const SplashView()); + case Routes.registerRoute : + return MaterialPageRoute(builder: (_) => const RegisterView()); + case Routes.loginRoute : + return MaterialPageRoute(builder: (_) => const LoginView()); + case Routes.homeRoute : + initHomeModule(); + return MaterialPageRoute(builder: (_) => const HomeView()); + case Routes.detailsRoute : + return MaterialPageRoute(builder: (_) => const DetailsView()); + default : + return unDefinedRoute(); + } + } + + static Route unDefinedRoute(){ + return MaterialPageRoute(builder: (ctx) => const Scaffold( + body: Center( + child: Text("This route is not found!"), + ), + )); + } +} \ No newline at end of file diff --git a/lib/presentation/resources/strings_manager.dart b/lib/presentation/resources/strings_manager.dart new file mode 100644 index 0000000..5f749db --- /dev/null +++ b/lib/presentation/resources/strings_manager.dart @@ -0,0 +1,16 @@ +class AppStrings { + // error handler + static const String badRequestError = "bad_request_error"; + static const String noContent = "no_content"; + static const String forbiddenError = "forbidden_error"; + static const String unauthorizedError = "unauthorized_error"; + static const String notFoundError = "not_found_error"; + static const String conflictError = "conflict_error"; + static const String internalServerError = "internal_server_error"; + static const String unknownError = "unknown_error"; + static const String timeoutError = "timeout_error"; + static const String defaultError = "default_error"; + static const String cacheError = "cache_error"; + static const String noInternetError = "no_internet_error"; + static const String success = "success"; +} \ No newline at end of file diff --git a/lib/presentation/splash/splash.dart b/lib/presentation/splash/splash.dart new file mode 100644 index 0000000..d8c617d --- /dev/null +++ b/lib/presentation/splash/splash.dart @@ -0,0 +1,79 @@ +import 'dart:async'; + +import 'package:itasmob/presentation/login/login.dart'; +import 'package:flutter/material.dart'; +import "../home/index.dart"; + +class SplashView extends StatefulWidget { + const SplashView({ Key? key }) : super(key: key); + final String title=""; + @override + _SplashScreenState createState() => _SplashScreenState(); + +} + + class _SplashScreenState extends State { + bool _isVisible = false; + + _SplashScreenState(){ + + new Timer(const Duration(milliseconds: 2000), (){ + setState(() { + Navigator.of(context).pushAndRemoveUntil( + MaterialPageRoute(builder: (context) => LoginView()), (route) => false); + }); + }); + + new Timer( + Duration(milliseconds: 10),(){ + setState(() { + _isVisible = true; // Now it is showing fade effect and navigating to Login page + }); + } + ); + + } + + @override + Widget build(BuildContext context) { + + return Container( + decoration: new BoxDecoration( + gradient: new LinearGradient( + colors: [Theme.of(context).accentColor, Theme.of(context).primaryColor], + begin: const FractionalOffset(0, 0), + end: const FractionalOffset(1.0, 0.0), + stops: [0.0, 1.0], + tileMode: TileMode.clamp, + ), + ), + child: AnimatedOpacity( + opacity: _isVisible ? 1.0 : 0, + duration: Duration(milliseconds: 1200), + child: Center( + child: Container( + height: 140.0, + width: 140.0, + child: Center( + child: ClipOval( + //child: Icon(Icons.android_outlined, size: 128,), //put your logo here + ), + ), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.3), + blurRadius: 2.0, + offset: Offset(5.0, 3.0), + spreadRadius: 2.0, + ) + ] + ), + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/widgets/header_widgets.dart b/lib/widgets/header_widgets.dart new file mode 100644 index 0000000..2271916 --- /dev/null +++ b/lib/widgets/header_widgets.dart @@ -0,0 +1,167 @@ +import 'package:flutter/material.dart'; + +class HeaderWidget extends StatefulWidget { + final double _height; + final bool _showIcon; + final IconData _icon; + + const HeaderWidget(this._height, this._showIcon, this._icon, {Key? key}) : super(key: key); + + @override + _HeaderWidgetState createState() => _HeaderWidgetState(_height, _showIcon, _icon); +} + +class _HeaderWidgetState extends State { + double _height; + bool _showIcon; + IconData _icon; + + _HeaderWidgetState(this._height, this._showIcon, this._icon); + + @override + Widget build(BuildContext context) { + double width = MediaQuery + .of(context) + .size + .width; + + return Container( + child: Stack( + children: [ + ClipPath( + child: Container( + decoration: new BoxDecoration( + gradient: new LinearGradient( + colors: [ + Theme.of(context).primaryColor.withOpacity(0.4), + Theme.of(context).accentColor.withOpacity(0.7), + ], + begin: const FractionalOffset(0.0, 0.0), + end: const FractionalOffset(1.0, 0.0), + stops: [0.0, 1.0], + tileMode: TileMode.clamp + ), + ), + ), + clipper: new ShapeClipper( + [ + Offset(width / 5, _height), + Offset(width / 10 * 5, _height - 60), + Offset(width / 5 * 4, _height + 20), + Offset(width, _height - 18) + ] + ), + ), + ClipPath( + child: Container( + decoration: new BoxDecoration( + gradient: new LinearGradient( + colors: [ + Theme.of(context).primaryColor.withOpacity(0.4), + Theme.of(context).accentColor.withOpacity(0.4), + ], + begin: const FractionalOffset(0.0, 0.0), + end: const FractionalOffset(1.0, 0.0), + stops: [0.0, 1.0], + tileMode: TileMode.clamp + ), + ), + ), + clipper: new ShapeClipper( + [ + Offset(width / 3, _height + 20), + Offset(width / 10 * 8, _height - 60), + Offset(width / 5 * 4, _height - 60), + Offset(width, _height - 20) + ] + ), + ), + ClipPath( + child: Container( + decoration: new BoxDecoration( + gradient: new LinearGradient( + colors: [ + Theme.of(context).primaryColor, + Theme.of(context).accentColor, + ], + begin: const FractionalOffset(0.0, 0.0), + end: const FractionalOffset(1.0, 0.0), + stops: [0.0, 1.0], + tileMode: TileMode.clamp + ), + ), + ), + clipper: new ShapeClipper( + [ + Offset(width / 5, _height), + Offset(width / 2, _height - 40), + Offset(width / 5 * 4, _height - 80), + Offset(width, _height - 20) + ] + ), + ), + Visibility( + visible: _showIcon, + child: Container( + height: _height - 40, + child: Center( + child: Container( + margin: EdgeInsets.all(20), + padding: EdgeInsets.only( + left: 5.0, + top: 20.0, + right: 5.0, + bottom: 20.0, + ), + decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(20), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(100), + topRight: Radius.circular(100), + bottomLeft: Radius.circular(60), + bottomRight: Radius.circular(60), + ), + border: Border.all(width: 5, color: Colors.white), + ), + child: Icon( + _icon, + color: Colors.white, + size: 40.0, + ), + ), + ), + ), + ), + + ], + ), + ); + } +} + +class ShapeClipper extends CustomClipper { + List _offsets = []; + ShapeClipper(this._offsets); + @override + Path getClip(Size size) { + var path = new Path(); + + path.lineTo(0.0, size.height-20); + + // path.quadraticBezierTo(size.width/5, size.height, size.width/2, size.height-40); + // path.quadraticBezierTo(size.width/5*4, size.height-80, size.width, size.height-20); + + path.quadraticBezierTo(_offsets[0].dx, _offsets[0].dy, _offsets[1].dx,_offsets[1].dy); + path.quadraticBezierTo(_offsets[2].dx, _offsets[2].dy, _offsets[3].dx,_offsets[3].dy); + + // path.lineTo(size.width, size.height-20); + path.lineTo(size.width, 0.0); + path.close(); + + + return path; + } + + @override + bool shouldReclip(CustomClipper oldClipper) => false; +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..883fbed --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,81 @@ +name: itasmob +description: An innovative attendance system. + +version: 1.0.0+1 + +environment: + sdk: ">=2.12.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + retrofit: ^2.0.1 + analyzer: ^1.7.0 + dio: ^4.0.0 + json_serializable: ^4.1.4 + retrofit_generator: ^2.0.1 + build_runner: ^2.1.4 + dartz: ^0.10.0 + data_connection_checker_tv: ^0.3.5-nullsafety + timeago: + webview_flutter: + google_fonts: + get_it: ^7.2.0 + pretty_dio_logger: ^1.2.0-beta-1 + hexcolor: ^2.0.4 + font_awesome_flutter: ^9.1.0 + charts_flutter: ^0.12.0 + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^1.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + assets: + - assets/ + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..ef5d3d7 --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,31 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:blog_app_v2/app/app.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:blog_app_v2/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/web/favicon.png b/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/web/icons/Icon-maskable-512.png differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..56b99bc --- /dev/null +++ b/web/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + blog_app_v2 + + + + + + + diff --git a/web/manifest.json b/web/manifest.json new file mode 100644 index 0000000..7195284 --- /dev/null +++ b/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "blog_app_v2", + "short_name": "blog_app_v2", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +}