@ -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 |
@ -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}" | |||
} | |||
] | |||
} |
@ -0,0 +1,3 @@ | |||
# itas-mob | |||
@ -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 |
@ -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 |
@ -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' | |||
} |
@ -0,0 +1,7 @@ | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="com.example.blog_app_v2"> | |||
<!-- Flutter needs it to communicate with the running application | |||
to allow setting breakpoints, to provide hot reload, etc. | |||
--> | |||
<uses-permission android:name="android.permission.INTERNET"/> | |||
</manifest> |
@ -0,0 +1,48 @@ | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="com.example.blog_app_v2"> | |||
<application | |||
android:name="${applicationName}" | |||
android:label="sentientgeeks_flutter_architecture" | |||
android:icon="@mipmap/ic_launcher"> | |||
<activity | |||
android:name=".MainActivity" | |||
android:launchMode="singleTop" | |||
android:theme="@style/LaunchTheme" | |||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | |||
android:hardwareAccelerated="true" | |||
android:windowSoftInputMode="adjustResize"> | |||
<!-- Specifies an Android theme to apply to this Activity as soon as | |||
the Android process has started. This theme is visible to the user | |||
while the Flutter UI initializes. After that, this theme continues | |||
to determine the Window background behind the Flutter UI. --> | |||
<meta-data | |||
android:name="io.flutter.embedding.android.NormalTheme" | |||
android:resource="@style/NormalTheme" | |||
/> | |||
<!-- Displays an Android View that continues showing the launch screen | |||
Drawable until Flutter paints its first frame, then this splash | |||
screen fades out. A splash screen is useful to avoid any visual | |||
gap between the end of Android's launch screen and the painting of | |||
Flutter's first frame. --> | |||
<meta-data | |||
android:name="io.flutter.embedding.android.SplashScreenDrawable" | |||
android:resource="@drawable/launch_background" | |||
/> | |||
<intent-filter> | |||
<action android:name="android.intent.action.MAIN"/> | |||
<category android:name="android.intent.category.LAUNCHER"/> | |||
</intent-filter> | |||
</activity> | |||
<!-- Don't delete the meta-data below. | |||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | |||
<meta-data | |||
android:name="flutterEmbedding" | |||
android:value="2" /> | |||
<meta-data | |||
android:name="com.google.android.gms.ads.APPLICATION_ID" | |||
android:value="ca-app-pub-9480894190214087~5367582995"/> | |||
<meta-data | |||
android:name="com.google.android.gms.ads.AD_MANAGER_APP" | |||
android:value="true"/> | |||
</application> | |||
</manifest> |
@ -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); | |||
} | |||
} |
@ -0,0 +1,6 @@ | |||
package com.example.blog_app_v2 | |||
import io.flutter.embedding.android.FlutterActivity | |||
class MainActivity: FlutterActivity() { | |||
} |
@ -0,0 +1,12 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!-- Modify this file to customize your launch splash screen --> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item android:drawable="?android:colorBackground" /> | |||
<!-- You can insert your own image assets here --> | |||
<!-- <item> | |||
<bitmap | |||
android:gravity="center" | |||
android:src="@mipmap/launch_image" /> | |||
</item> --> | |||
</layer-list> |
@ -0,0 +1,12 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<!-- Modify this file to customize your launch splash screen --> | |||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item android:drawable="@android:color/white" /> | |||
<!-- You can insert your own image assets here --> | |||
<!-- <item> | |||
<bitmap | |||
android:gravity="center" | |||
android:src="@mipmap/launch_image" /> | |||
</item> --> | |||
</layer-list> |
@ -0,0 +1,18 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<resources> | |||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> | |||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | |||
<!-- Show a splash screen on the activity. Automatically removed when | |||
Flutter draws its first frame --> | |||
<item name="android:windowBackground">@drawable/launch_background</item> | |||
</style> | |||
<!-- Theme applied to the Android Window as soon as the process has started. | |||
This theme determines the color of the Android Window while your | |||
Flutter UI initializes, as well as behind your Flutter UI while its | |||
running. | |||
This Theme is only used starting with V2 of Flutter's Android embedding. --> | |||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | |||
<item name="android:windowBackground">?android:colorBackground</item> | |||
</style> | |||
</resources> |
@ -0,0 +1,18 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<resources> | |||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> | |||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> | |||
<!-- Show a splash screen on the activity. Automatically removed when | |||
Flutter draws its first frame --> | |||
<item name="android:windowBackground">@drawable/launch_background</item> | |||
</style> | |||
<!-- Theme applied to the Android Window as soon as the process has started. | |||
This theme determines the color of the Android Window while your | |||
Flutter UI initializes, as well as behind your Flutter UI while its | |||
running. | |||
This Theme is only used starting with V2 of Flutter's Android embedding. --> | |||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> | |||
<item name="android:windowBackground">?android:colorBackground</item> | |||
</style> | |||
</resources> |
@ -0,0 +1,7 @@ | |||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
package="com.example.blog_app_v2"> | |||
<!-- Flutter needs it to communicate with the running application | |||
to allow setting breakpoints, to provide hot reload, etc. | |||
--> | |||
<uses-permission android:name="android.permission.INTERNET"/> | |||
</manifest> |
@ -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 | |||
} |
@ -0,0 +1,3 @@ | |||
org.gradle.jvmargs=-Xmx1536M | |||
android.useAndroidX=true | |||
android.enableJetifier=true |
@ -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 |
@ -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" |
@ -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 |
@ -0,0 +1,26 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |||
<plist version="1.0"> | |||
<dict> | |||
<key>CFBundleDevelopmentRegion</key> | |||
<string>en</string> | |||
<key>CFBundleExecutable</key> | |||
<string>App</string> | |||
<key>CFBundleIdentifier</key> | |||
<string>io.flutter.flutter.app</string> | |||
<key>CFBundleInfoDictionaryVersion</key> | |||
<string>6.0</string> | |||
<key>CFBundleName</key> | |||
<string>App</string> | |||
<key>CFBundlePackageType</key> | |||
<string>FMWK</string> | |||
<key>CFBundleShortVersionString</key> | |||
<string>1.0</string> | |||
<key>CFBundleSignature</key> | |||
<string>????</string> | |||
<key>CFBundleVersion</key> | |||
<string>1.0</string> | |||
<key>MinimumOSVersion</key> | |||
<string>9.0</string> | |||
</dict> | |||
</plist> |
@ -0,0 +1,2 @@ | |||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | |||
#include "Generated.xcconfig" |
@ -0,0 +1,2 @@ | |||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | |||
#include "Generated.xcconfig" |
@ -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 |
@ -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 |
@ -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 = "<group>"; }; | |||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; | |||
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 = "<group>"; }; | |||
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 = "<group>"; }; | |||
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 = "<group>"; }; | |||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; | |||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; | |||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; | |||
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 = "<group>"; }; | |||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; }; | |||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; }; | |||
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 = "<group>"; }; | |||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | |||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | |||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | |||
/* 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 = "<group>"; | |||
}; | |||
6A5806B1833E029C0954027C /* Frameworks */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
18369F226F7EAF0F0170F1C0 /* Pods_Runner.framework */, | |||
); | |||
name = Frameworks; | |||
sourceTree = "<group>"; | |||
}; | |||
9740EEB11CF90186004384FC /* Flutter */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, | |||
9740EEB21CF90195004384FC /* Debug.xcconfig */, | |||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */, | |||
9740EEB31CF90195004384FC /* Generated.xcconfig */, | |||
); | |||
name = Flutter; | |||
sourceTree = "<group>"; | |||
}; | |||
97C146E51CF9000F007C117D = { | |||
isa = PBXGroup; | |||
children = ( | |||
9740EEB11CF90186004384FC /* Flutter */, | |||
97C146F01CF9000F007C117D /* Runner */, | |||
97C146EF1CF9000F007C117D /* Products */, | |||
204D34F05A8F4255C523C176 /* Pods */, | |||
6A5806B1833E029C0954027C /* Frameworks */, | |||
); | |||
sourceTree = "<group>"; | |||
}; | |||
97C146EF1CF9000F007C117D /* Products */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
97C146EE1CF9000F007C117D /* Runner.app */, | |||
); | |||
name = Products; | |||
sourceTree = "<group>"; | |||
}; | |||
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 = "<group>"; | |||
}; | |||
/* 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 = "<group>"; | |||
}; | |||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { | |||
isa = PBXVariantGroup; | |||
children = ( | |||
97C147001CF9000F007C117D /* Base */, | |||
); | |||
name = LaunchScreen.storyboard; | |||
sourceTree = "<group>"; | |||
}; | |||
/* 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 */; | |||
} |
@ -0,0 +1,7 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Workspace | |||
version = "1.0"> | |||
<FileRef | |||
location = "self:"> | |||
</FileRef> | |||
</Workspace> |
@ -0,0 +1,8 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |||
<plist version="1.0"> | |||
<dict> | |||
<key>IDEDidComputeMac32BitWarning</key> | |||
<true/> | |||
</dict> | |||
</plist> |
@ -0,0 +1,8 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |||
<plist version="1.0"> | |||
<dict> | |||
<key>PreviewsEnabled</key> | |||
<false/> | |||
</dict> | |||
</plist> |
@ -0,0 +1,91 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Scheme | |||
LastUpgradeVersion = "1300" | |||
version = "1.3"> | |||
<BuildAction | |||
parallelizeBuildables = "YES" | |||
buildImplicitDependencies = "YES"> | |||
<BuildActionEntries> | |||
<BuildActionEntry | |||
buildForTesting = "YES" | |||
buildForRunning = "YES" | |||
buildForProfiling = "YES" | |||
buildForArchiving = "YES" | |||
buildForAnalyzing = "YES"> | |||
<BuildableReference | |||
BuildableIdentifier = "primary" | |||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" | |||
BuildableName = "Runner.app" | |||
BlueprintName = "Runner" | |||
ReferencedContainer = "container:Runner.xcodeproj"> | |||
</BuildableReference> | |||
</BuildActionEntry> | |||
</BuildActionEntries> | |||
</BuildAction> | |||
<TestAction | |||
buildConfiguration = "Debug" | |||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |||
shouldUseLaunchSchemeArgsEnv = "YES"> | |||
<Testables> | |||
</Testables> | |||
<MacroExpansion> | |||
<BuildableReference | |||
BuildableIdentifier = "primary" | |||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" | |||
BuildableName = "Runner.app" | |||
BlueprintName = "Runner" | |||
ReferencedContainer = "container:Runner.xcodeproj"> | |||
</BuildableReference> | |||
</MacroExpansion> | |||
<AdditionalOptions> | |||
</AdditionalOptions> | |||
</TestAction> | |||
<LaunchAction | |||
buildConfiguration = "Debug" | |||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |||
launchStyle = "0" | |||
useCustomWorkingDirectory = "NO" | |||
ignoresPersistentStateOnLaunch = "NO" | |||
debugDocumentVersioning = "YES" | |||
debugServiceExtension = "internal" | |||
allowLocationSimulation = "YES"> | |||
<BuildableProductRunnable | |||
runnableDebuggingMode = "0"> | |||
<BuildableReference | |||
BuildableIdentifier = "primary" | |||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" | |||
BuildableName = "Runner.app" | |||
BlueprintName = "Runner" | |||
ReferencedContainer = "container:Runner.xcodeproj"> | |||
</BuildableReference> | |||
</BuildableProductRunnable> | |||
<AdditionalOptions> | |||
</AdditionalOptions> | |||
</LaunchAction> | |||
<ProfileAction | |||
buildConfiguration = "Profile" | |||
shouldUseLaunchSchemeArgsEnv = "YES" | |||
savedToolIdentifier = "" | |||
useCustomWorkingDirectory = "NO" | |||
debugDocumentVersioning = "YES"> | |||
<BuildableProductRunnable | |||
runnableDebuggingMode = "0"> | |||
<BuildableReference | |||
BuildableIdentifier = "primary" | |||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" | |||
BuildableName = "Runner.app" | |||
BlueprintName = "Runner" | |||
ReferencedContainer = "container:Runner.xcodeproj"> | |||
</BuildableReference> | |||
</BuildableProductRunnable> | |||
</ProfileAction> | |||
<AnalyzeAction | |||
buildConfiguration = "Debug"> | |||
</AnalyzeAction> | |||
<ArchiveAction | |||
buildConfiguration = "Release" | |||
revealArchiveInOrganizer = "YES"> | |||
</ArchiveAction> | |||
</Scheme> |
@ -0,0 +1,10 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Workspace | |||
version = "1.0"> | |||
<FileRef | |||
location = "group:Runner.xcodeproj"> | |||
</FileRef> | |||
<FileRef | |||
location = "group:Pods/Pods.xcodeproj"> | |||
</FileRef> | |||
</Workspace> |
@ -0,0 +1,8 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |||
<plist version="1.0"> | |||
<dict> | |||
<key>IDEDidComputeMac32BitWarning</key> | |||
<true/> | |||
</dict> | |||
</plist> |
@ -0,0 +1,8 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |||
<plist version="1.0"> | |||
<dict> | |||
<key>PreviewsEnabled</key> | |||
<false/> | |||
</dict> | |||
</plist> |
@ -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) | |||
} | |||
} |
@ -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" | |||
} | |||
} |
@ -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" | |||
} | |||
} |
@ -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. |
@ -0,0 +1,37 @@ | |||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | |||
<dependencies> | |||
<deployment identifier="iOS"/> | |||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> | |||
</dependencies> | |||
<scenes> | |||
<!--View Controller--> | |||
<scene sceneID="EHf-IW-A2E"> | |||
<objects> | |||
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> | |||
<layoutGuides> | |||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> | |||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> | |||
</layoutGuides> | |||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | |||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |||
<subviews> | |||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> | |||
</imageView> | |||
</subviews> | |||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |||
<constraints> | |||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> | |||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> | |||
</constraints> | |||
</view> | |||
</viewController> | |||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | |||
</objects> | |||
<point key="canvasLocation" x="53" y="375"/> | |||
</scene> | |||
</scenes> | |||
<resources> | |||
<image name="LaunchImage" width="168" height="185"/> | |||
</resources> | |||
</document> |
@ -0,0 +1,26 @@ | |||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | |||
<dependencies> | |||
<deployment identifier="iOS"/> | |||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> | |||
</dependencies> | |||
<scenes> | |||
<!--Flutter View Controller--> | |||
<scene sceneID="tne-QT-ifu"> | |||
<objects> | |||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> | |||
<layoutGuides> | |||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | |||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | |||
</layoutGuides> | |||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | |||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | |||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | |||
</view> | |||
</viewController> | |||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | |||
</objects> | |||
</scene> | |||
</scenes> | |||
</document> |
@ -0,0 +1,45 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |||
<plist version="1.0"> | |||
<dict> | |||
<key>CFBundleDevelopmentRegion</key> | |||
<string>$(DEVELOPMENT_LANGUAGE)</string> | |||
<key>CFBundleExecutable</key> | |||
<string>$(EXECUTABLE_NAME)</string> | |||
<key>CFBundleIdentifier</key> | |||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |||
<key>CFBundleInfoDictionaryVersion</key> | |||
<string>6.0</string> | |||
<key>CFBundleName</key> | |||
<string>sentientgeeks_flutter_architecture</string> | |||
<key>CFBundlePackageType</key> | |||
<string>APPL</string> | |||
<key>CFBundleShortVersionString</key> | |||
<string>$(FLUTTER_BUILD_NAME)</string> | |||
<key>CFBundleSignature</key> | |||
<string>????</string> | |||
<key>CFBundleVersion</key> | |||
<string>$(FLUTTER_BUILD_NUMBER)</string> | |||
<key>LSRequiresIPhoneOS</key> | |||
<true/> | |||
<key>UILaunchStoryboardName</key> | |||
<string>LaunchScreen</string> | |||
<key>UIMainStoryboardFile</key> | |||
<string>Main</string> | |||
<key>UISupportedInterfaceOrientations</key> | |||
<array> | |||
<string>UIInterfaceOrientationPortrait</string> | |||
<string>UIInterfaceOrientationLandscapeLeft</string> | |||
<string>UIInterfaceOrientationLandscapeRight</string> | |||
</array> | |||
<key>UISupportedInterfaceOrientations~ipad</key> | |||
<array> | |||
<string>UIInterfaceOrientationPortrait</string> | |||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | |||
<string>UIInterfaceOrientationLandscapeLeft</string> | |||
<string>UIInterfaceOrientationLandscapeRight</string> | |||
</array> | |||
<key>UIViewControllerBasedStatusBarAppearance</key> | |||
<false/> | |||
</dict> | |||
</plist> |
@ -0,0 +1 @@ | |||
#import "GeneratedPluginRegistrant.h" |
@ -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<MyApp> { | |||
@override | |||
Widget build(BuildContext context) { | |||
return MaterialApp( | |||
debugShowCheckedModeBanner: false, | |||
initialRoute: Routes.splashRoute, | |||
onGenerateRoute: RouteGenerator.getRoute, | |||
); | |||
} | |||
} |
@ -0,0 +1,6 @@ | |||
class Constants{ | |||
static const String baseUrl = "https://newsapi.org"; | |||
static const String apiKey = "640f7435fec643d6abdd8eb6de375859"; | |||
} | |||
@ -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<void> initAppModule() async { | |||
// network info | |||
instance.registerLazySingleton<NetworkInfo>( | |||
() => NetworkInfoImpl(DataConnectionChecker())); | |||
// dio factory | |||
instance.registerLazySingleton<DioFactory>(() => DioFactory()); | |||
// app service client | |||
final dio = await instance<DioFactory>().getDio(); | |||
instance.registerLazySingleton<AppServiceClient>(() => AppServiceClient(dio)); | |||
// remote data source | |||
instance.registerLazySingleton<RemoteDataSource>( | |||
() => RemoteDataSourceImplementer(instance())); | |||
// repository | |||
instance.registerLazySingleton<Repository>( | |||
() => RepositoryImpl(instance(), instance(),)); | |||
} | |||
initHomeModule() { | |||
if (!GetIt.I.isRegistered<GetNewsUseCase>()) { | |||
instance.registerFactory<GetNewsUseCase>(() => GetNewsUseCase(instance())); | |||
instance.registerFactory<HomeViewModel>(() => HomeViewModel(instance())); | |||
} | |||
} | |||
resetModules() { | |||
instance.reset(dispose: false); | |||
initAppModule(); | |||
initHomeModule(); | |||
} |
@ -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; | |||
} | |||
} | |||
} |
@ -0,0 +1,16 @@ | |||
import 'package:itasmob/data/network/app_api.dart'; | |||
import 'package:itasmob/data/response/responses.dart'; | |||
abstract class RemoteDataSource{ | |||
Future<NewsResponse> getNews(); | |||
} | |||
class RemoteDataSourceImplementer implements RemoteDataSource{ | |||
AppServiceClient _appServiceClient; | |||
RemoteDataSourceImplementer(this._appServiceClient); | |||
@override | |||
Future<NewsResponse> getNews() async{ | |||
return await _appServiceClient.getNews(); | |||
} | |||
} |
@ -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<Data> mappedData = (this?.dataResposne.articles?.map((articles) => articles.toDomain()) ?? Iterable.empty()) | |||
.cast<Data>() | |||
.toList(); | |||
var data = NewsData(mappedData); | |||
return News(data); | |||
} | |||
} |
@ -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<NewsResponse> getNews(); | |||
} | |||
@ -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<NewsResponse> getNews() async { | |||
const _extra = <String, dynamic>{}; | |||
final queryParameters = <String, dynamic>{}; | |||
final _data = <String, dynamic>{}; | |||
final _result = await _dio.fetch<Map<String, dynamic>>(_setStreamType< | |||
NewsResponse>(Options( | |||
method: 'GET', headers: <String, dynamic>{}, 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<T>(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; | |||
} | |||
} |
@ -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<Dio> getDio() async { | |||
Dio dio = Dio(); | |||
int _timeOut = 60 * 1000; // 1 min | |||
Map<String, String> 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; | |||
} | |||
} |
@ -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; | |||
} |
@ -0,0 +1,6 @@ | |||
class Failure{ | |||
int code; | |||
String message; | |||
Failure(this.code, this.message); | |||
} |
@ -0,0 +1,15 @@ | |||
import 'package:data_connection_checker_tv/data_connection_checker.dart'; | |||
abstract class NetworkInfo{ | |||
Future<bool> get isConnected; | |||
} | |||
class NetworkInfoImpl implements NetworkInfo{ | |||
DataConnectionChecker _dataConnectionChecker; | |||
NetworkInfoImpl(this._dataConnectionChecker); | |||
@override | |||
Future<bool> get isConnected => _dataConnectionChecker.hasConnection; | |||
} |
@ -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<Either<Failure, News>> 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()); | |||
} | |||
} | |||
} |
@ -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<String, dynamic> json) => _$DataResposneFromJson(json); | |||
//to json | |||
Map<String, dynamic> toJson() => _$DataResposneToJson(this); | |||
} | |||
@JsonSerializable() | |||
class HomeDataResponse{ | |||
@JsonKey(name: "articles") | |||
List<DataResposne>? articles; | |||
HomeDataResponse(this.articles); | |||
//from json | |||
factory HomeDataResponse.fromJson(Map<String, dynamic> json) => _$HomeDataResponseFromJson(json); | |||
//to json | |||
Map<String, dynamic> toJson() => _$HomeDataResponseToJson(this); | |||
} | |||
@JsonSerializable() | |||
class NewsResponse extends BaseResponse{ | |||
@JsonKey(name: "data") | |||
HomeDataResponse dataResposne; | |||
NewsResponse(this.dataResposne); | |||
//from json | |||
factory NewsResponse.fromJson(Map<String, dynamic> json) => _$NewsResponseFromJson(json); | |||
//to json | |||
Map<String, dynamic> toJson() => _$NewsResponseToJson(this); | |||
} |
@ -0,0 +1,64 @@ | |||
// GENERATED CODE - DO NOT MODIFY BY HAND | |||
part of 'responses.dart'; | |||
// ************************************************************************** | |||
// JsonSerializableGenerator | |||
// ************************************************************************** | |||
BaseResponse _$BaseResponseFromJson(Map<String, dynamic> json) { | |||
return BaseResponse()..status = json['status'] as String?; | |||
} | |||
Map<String, dynamic> _$BaseResponseToJson(BaseResponse instance) => | |||
<String, dynamic>{ | |||
'status': instance.status, | |||
}; | |||
DataResposne _$DataResposneFromJson(Map<String, dynamic> 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<String, dynamic> _$DataResposneToJson(DataResposne instance) => | |||
<String, dynamic>{ | |||
'author': instance.author, | |||
'title': instance.title, | |||
'description': instance.description, | |||
'url': instance.url, | |||
'urlToImage': instance.urlToImage, | |||
'content': instance.content, | |||
'publishedAt': instance.publishedAt, | |||
}; | |||
HomeDataResponse _$HomeDataResponseFromJson(Map<String, dynamic> json) { | |||
return HomeDataResponse( | |||
(json['articles'] as List<dynamic>?) | |||
?.map((e) => DataResposne.fromJson(e as Map<String, dynamic>)) | |||
.toList(), | |||
); | |||
} | |||
Map<String, dynamic> _$HomeDataResponseToJson(HomeDataResponse instance) => | |||
<String, dynamic>{ | |||
'articles': instance.articles, | |||
}; | |||
NewsResponse _$NewsResponseFromJson(Map<String, dynamic> json) { | |||
return NewsResponse( | |||
HomeDataResponse.fromJson(json), | |||
)..status = json['status'] as String?; | |||
} | |||
Map<String, dynamic> _$NewsResponseToJson(NewsResponse instance) => | |||
<String, dynamic>{ | |||
'status': instance.status, | |||
'data': instance.dataResposne, | |||
}; |
@ -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> data; | |||
NewsData(this.data); | |||
} | |||
class News{ | |||
NewsData newsData; | |||
News(this.newsData); | |||
} |
@ -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<Either<Failure, News>> getNews(); | |||
} |
@ -0,0 +1,6 @@ | |||
import 'package:itasmob/data/network/failure.dart'; | |||
import 'package:dartz/dartz.dart'; | |||
abstract class BaseUseCase<In, Out>{ | |||
Future<Either<Failure, Out>> execute(In input); | |||
} |
@ -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<void, News> { | |||
Repository _repository; | |||
GetNewsUseCase(this._repository); | |||
@override | |||
Future<Either<Failure, News>> execute(void input) async{ | |||
return await _repository.getNews(); | |||
} | |||
} |
@ -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()); | |||
} |
@ -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; | |||
} |
@ -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>( | |||
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{ | |||
} |
@ -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( | |||
); | |||
} | |||
} |
@ -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<NewsViewObject>.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<NewsViewObject> get outputHomeData => _dataStreamController.stream.map((data) => data); | |||
@override | |||
Sink get inputHomeData => _dataStreamController.sink; | |||
} | |||
abstract class HomeViewModelInput{ | |||
Sink get inputHomeData; | |||
} | |||
abstract class HomeViewModelOutputs{ | |||
Stream<NewsViewObject> get outputHomeData; | |||
} | |||
class NewsViewObject{ | |||
List<Data> data; | |||
NewsViewObject(this.data); | |||
} |
@ -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<HomeView>{ | |||
double _headerHeight = 150; | |||
Key _formKey = GlobalKey<FormState>(); | |||
int _selectedIndex = 0; | |||
late List<charts.Series<PieData, String>> _pieData; | |||
@override void initState() { | |||
super.initState(); | |||
_pieData = <charts.Series<PieData, String>>[]; | |||
} | |||
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>[ | |||
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, | |||
), | |||
); | |||
} | |||
} | |||
@ -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<LoginView> { | |||
double _headerHeight = 250; | |||
Key _formKey = GlobalKey<FormState>(); | |||
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), | |||
), | |||
])), | |||
), | |||
], | |||
)), | |||
], | |||
)), | |||
), | |||
], | |||
), | |||
), | |||
); | |||
} | |||
} |
@ -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<StatefulWidget> createState() { | |||
return _RegistrationPageState(); | |||
} | |||
} | |||
class _RegistrationPageState extends State<RegisterView>{ | |||
final _formKey = GlobalKey<FormState>(); | |||
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<bool>( | |||
builder: (state) { | |||
return Column( | |||
children: <Widget>[ | |||
Row( | |||
children: <Widget>[ | |||
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<dynamic> 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), | |||
], | |||
), | |||
), | |||
], | |||
), | |||
), | |||
], | |||
), | |||
), | |||
); | |||
} | |||
} |