init project structure By Mohammad and Elham

merge-requests/230/merge
Mohammad Aljammal 4 years ago
commit 3ed5c3878f

44
.gitignore vendored

@ -0,0 +1,44 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
pubspec.lock
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: f7a6a7906be96d2288f5d63a5a54c515a6e987fe
channel: stable
project_type: app

@ -0,0 +1,16 @@
# diplomaticquarterapp
A new Flutter application.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

@ -0,0 +1,7 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

@ -0,0 +1,63 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.cloud.diplomaticquarterapp"
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cloud.diplomaticquarterapp">
<!-- 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,47 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cloud.diplomaticquarterapp">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="diplomaticquarterapp"
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" />
</application>
</manifest>

@ -0,0 +1,6 @@
package com.cloud.diplomaticquarterapp
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:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting -->
<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:color/white</item>
</style>
</resources>

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cloud.diplomaticquarterapp">
<!-- 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,31 @@
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}

@ -0,0 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
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-5.6.2-all.zip

@ -0,0 +1,15 @@
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}

32
ios/.gitignore vendored

@ -0,0 +1,32 @@
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3

@ -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>$(DEVELOPMENT_LANGUAGE)</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>8.0</string>
</dict>
</plist>

@ -0,0 +1 @@
#include "Generated.xcconfig"

@ -0,0 +1 @@
#include "Generated.xcconfig"

@ -0,0 +1,506 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; 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>"; };
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 = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
);
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 */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.cloud.diplomaticquarterapp;
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;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.cloud.diplomaticquarterapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.cloud.diplomaticquarterapp;
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 = "group:Runner.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,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
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,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@ -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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

@ -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>diplomaticquarterapp</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,9 @@
const MAX_SMALL_SCREEN = 660;
const BASE_URL = '';
class AppGlobal {
static var context;
}

@ -0,0 +1,10 @@
const Map<String, Map<String, String>> localizedValues = {
'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'},
'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
'lanEnglish': {'en': 'English', 'ar': 'English'},
'lanArabic': {'en': 'العربية', 'ar': 'العربية'},
'cancel': {'en': 'CANCEL', 'ar': 'الغاء'},
'done': {'en': 'DONE', 'ar': 'تأكيد'},
};

@ -0,0 +1,3 @@
const TOKEN = 'token';
const APP_LANGUAGE = 'language';

@ -0,0 +1,63 @@
import 'package:flutter/cupertino.dart';
import 'config.dart';
class SizeConfig {
static double _blockWidth = 0;
static double _blockHeight = 0;
static double realScreenWidth;
static double realScreenHeight;
static double screenWidth;
static double screenHeight;
static double textMultiplier;
static double imageSizeMultiplier;
static double heightMultiplier;
static double widthMultiplier;
static bool isPortrait = true;
static bool isMobilePortrait = false;
static bool isMobile = false;
void init(BoxConstraints constraints, Orientation orientation) {
realScreenHeight = constraints.maxHeight;
realScreenWidth = constraints.maxWidth;
if (constraints.maxWidth <= MAX_SMALL_SCREEN) {
isMobile = true;
}
if (orientation == Orientation.portrait) {
isPortrait = true;
if (realScreenWidth < 450) {
isMobilePortrait = true;
}
// textMultiplier = _blockHeight;
// imageSizeMultiplier = _blockWidth;
screenHeight = realScreenHeight;
screenWidth = realScreenWidth;
} else {
isPortrait = false;
isMobilePortrait = false;
// textMultiplier = _blockWidth;
// imageSizeMultiplier = _blockHeight;
screenHeight = realScreenWidth;
screenWidth = realScreenHeight;
}
_blockWidth = screenWidth / 100;
_blockHeight = screenHeight / 100;
textMultiplier = _blockHeight;
imageSizeMultiplier = _blockWidth;
heightMultiplier = _blockHeight;
widthMultiplier = _blockWidth;
print('realScreenWidth $realScreenWidth');
print('realScreenHeight $realScreenHeight');
print('textMultiplier $textMultiplier');
print('imageSizeMultiplier $imageSizeMultiplier');
print('heightMultiplier$heightMultiplier');
print('widthMultiplier $widthMultiplier');
print('isPortrait $isPortrait');
print('isMobilePortrait $isMobilePortrait');
}
}

@ -0,0 +1,87 @@
import 'package:diplomaticquarterapp/pages/home_page.dart';
import 'package:diplomaticquarterapp/providers/project_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';
import 'config/size_config.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
return OrientationBuilder(
builder: (context, orientation) {
SizeConfig().init(constraints, orientation);
return MultiProvider(
providers: [
ChangeNotifierProvider<ProjectProvider>(
create: (context) => ProjectProvider(),
),
],
child: Consumer<ProjectProvider>(
builder: (context, projectProvider, child) => MaterialApp(
showSemanticsDebugger: false,
title: 'Diplomatic Quarter App',
locale: projectProvider.appLocal,
localizationsDelegates: [
TranslationBaseDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: [
const Locale('ar', ''), // Arabic
const Locale('en', ''), // English
],
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light,
pageTransitionsTheme: const PageTransitionsTheme(
builders: {
TargetPlatform.android: ZoomPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0),
canvasColor: Colors.white,
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Color.fromRGBO(78, 62, 253, 1.0),
cursorColor: Color.fromRGBO(78, 62, 253, 1.0),
appBarTheme: AppBarTheme(
color: Color.fromRGBO(247, 248, 251, 1),
brightness: Brightness.light,
elevation: 0.0,
actionsIconTheme: IconThemeData(
color: Colors.grey[800],
),
),
),
initialRoute: '/',
routes: {
'/': (context) => MyHomePage(
title: 'Diplomatic Quarter App',
)
},
debugShowCheckedModeBanner: false,
),
),
);
},
);
},
);
}
}

@ -0,0 +1,49 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}

@ -0,0 +1,74 @@
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
class ProjectProvider with ChangeNotifier {
AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale;
String currentLanguage = 'ar';
bool _isArabic = false;
bool isInternetConnection = true;
bool isLoading = false;
bool isError = false;
String error = '';
Locale get appLocal => _appLocale;
bool get isArabic => _isArabic;
StreamSubscription subscription;
ProjectProvider() {
loadSharedPrefLanguage();
subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
break;
case ConnectivityResult.mobile:
isInternetConnection = true;
break;
case ConnectivityResult.none:
isInternetConnection = false;
break;
}
notifyListeners();
});
}
void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_LANGUAGE);
_appLocale = Locale(currentLanguage ?? 'en');
_isArabic = currentLanguage != null
? currentLanguage == 'ar' ? true : false
: false;
notifyListeners();
}
void changeLanguage(String lan) {
if (lan != "en" && currentLanguage != lan) {
_appLocale = Locale("ar");
_isArabic = true;
currentLanguage = 'ar';
sharedPref.setString(APP_LANGUAGE, 'ar');
} else if (lan != "ar" && currentLanguage != lan) {
_appLocale = Locale("en");
_isArabic = false;
currentLanguage = 'en';
sharedPref.setString(APP_LANGUAGE, 'en');
}
notifyListeners();
}
@override
void dispose() {
if (subscription != null) subscription.cancel();
super.dispose();
}
}

@ -0,0 +1,95 @@
import 'dart:convert';
import 'package:shared_preferences/shared_preferences.dart';
class AppSharedPreferences {
Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
/// Save String [key] the key for save value [value] the value we need to save it
setString(String key, String value) async {
final SharedPreferences prefs = await _prefs;
return prefs.setString(key, value);
}
/// Save List of String [key] the key for save value [value] the value we need to save it
setStringList(String key, List<String> value) async {
final SharedPreferences prefs = await _prefs;
return prefs.setStringList(key, value);
}
/// Save Double [key] the key for save value [value] the value we need to save it
setDouble(String key, double value) async {
final SharedPreferences prefs = await _prefs;
return prefs.setDouble(key, value);
}
/// Save Bool [key] the key for save value [value] the value we need to save it
setBool(String key, bool value) async {
final SharedPreferences prefs = await _prefs;
return prefs.setBool(key, value);
}
/// Save int [key] the key for save value [value] the value we need to save it
setInt(String key, int value) async {
final SharedPreferences prefs = await _prefs;
return prefs.setInt(key, value);
}
/// save Object [key] the key for save value [value] the value we need to save it
setObject(String key, value) async {
final SharedPreferences prefs = await _prefs;
return prefs.setString(key, json.encode(value));
}
/// Get String [key] the key was saved
getString(String key) async {
final SharedPreferences prefs = await _prefs;
return prefs.getString(key);
}
/// Get List of String [key] the key was saved
getStringList(String key) async {
final SharedPreferences prefs = await _prefs;
return prefs.getStringList(key);
}
/// Get Double [key] the key was saved
getDouble(String key) async {
final SharedPreferences prefs = await _prefs;
return prefs.getDouble(key);
}
/// Get Bool [key] the key was saved
getBool(String key) async {
final SharedPreferences prefs = await _prefs;
return prefs.getBool(key);
}
/// Get Int [key] the key was saved
getInt(String key) async {
final SharedPreferences prefs = await _prefs;
return prefs.getInt(key);
}
/// Get Object [key] the key was saved
getObject(String key) async {
final SharedPreferences prefs = await _prefs;
var string = prefs.getString(key);
if (string == null) {
return null;
}
return json.decode(string);
}
/// clear all saved values in shared preferences
clear() async {
final SharedPreferences prefs = await _prefs;
prefs.clear();
}
/// remove value based on [key] the key was saved
remove(String key) async {
final SharedPreferences prefs = await _prefs;
prefs.remove(key);
}
}

@ -0,0 +1,116 @@
import 'package:flutter/material.dart';
import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
class AppToast {
/// show long toast message
/// [message] to show for user
/// [timeInSeconds] how many second the toast will appear to the user
/// [toastLength] the time we show the message but should be Toast.LENGTH_SHORT , Toast.LENGTH_LONG
/// [toastGravity] the position of the toast in the screen
/// [backgroundColor] the background color of the toast
/// [textColor] the text color of the toast
/// [icon] the icon you want include in the toast
/// [radius] the radius of the toast
/// [elevation] an overlay color will be applied to indicate elevation.
/// [imageSize] image size inside the toast
static void showToast({
@required String message,
Toast toastLength,
int timeInSeconds,
double fontSize,
ToastGravity toastGravity,
Color backgroundColor,
Color textColor,
ICON icon,
int radius,
int elevation,
int imageSize,
}) {
FlutterFlexibleToast.showToast(
message: message,
toastLength: toastLength,
timeInSeconds: timeInSeconds,
fontSize: fontSize,
toastGravity: toastGravity,
backgroundColor: backgroundColor,
textColor: textColor,
icon: icon,
radius: radius,
elevation: elevation,
imageSize: imageSize);
}
/// show Success toast message
/// [message] to show for user
/// [timeInSeconds] how many second the toast will appear to the user
/// [toastLength] the time we show the message but should be Toast.LENGTH_SHORT , Toast.LENGTH_LONG
/// [toastGravity] the position of the toast in the screen
/// [textColor] the text color of the toast
/// [radius] the radius of the toast
/// [elevation] an overlay color will be applied to indicate elevation.
/// [imageSize] image size inside the toast
static void showSuccessToast({
@required String message,
Toast toastLength = Toast.LENGTH_LONG,
int timeInSeconds,
double fontSize = 16,
ToastGravity toastGravity = ToastGravity.TOP,
Color textColor = Colors.white,
int radius,
int elevation,
int imageSize = 32,
}) {
FlutterFlexibleToast.showToast(
message: message,
toastLength: toastLength,
timeInSeconds: timeInSeconds,
fontSize: fontSize,
toastGravity: toastGravity,
backgroundColor: Colors.green,
textColor: textColor,
icon: ICON.SUCCESS,
radius: radius,
elevation: elevation,
imageSize: imageSize);
}
/// show Error toast message
/// [message] to show for user
/// [timeInSeconds] how many second the toast will appear to the user
/// [toastLength] the time we show the message but should be Toast.LENGTH_SHORT , Toast.LENGTH_LONG
/// [toastGravity] the position of the toast in the screen
/// [textColor] the text color of the toast
/// [radius] the radius of the toast
/// [elevation] an overlay color will be applied to indicate elevation.
/// [imageSize] image size inside the toast
static void showErrorToast({
@required String message,
Toast toastLength = Toast.LENGTH_LONG,
int timeInSeconds,
double fontSize = 16,
ToastGravity toastGravity = ToastGravity.TOP,
Color textColor = Colors.white,
int radius,
int elevation,
int imageSize = 32,
}) {
FlutterFlexibleToast.showToast(
message: message,
toastLength: toastLength,
timeInSeconds: timeInSeconds,
fontSize: fontSize,
toastGravity: toastGravity,
backgroundColor: Colors.red,
textColor: textColor,
icon: ICON.CLOSE,
radius: radius,
elevation: elevation,
imageSize: imageSize);
}
/// cancel toast
void cancelToast() {
FlutterFlexibleToast.cancel();
}
}

@ -0,0 +1,88 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class CupertinoPickerUtils{
int cupertinoPickerIndex = 0;
/// show Cupertino Picker for any list [context] the page BuildContext
/// [items] the list of items we need to show
/// [onSelectFun] the call function on select event
///The [isDismissible] parameter specifies whether the bottom sheet will be
/// dismissed when user taps on the scrim.
showCupertinoPicker(
{context, items, decKey, onSelectFun, bool isDismissible = false}) {
showModalBottomSheet(
isDismissible: isDismissible,
context: context,
builder: (BuildContext builder) {
return Container(
height: SizeConfig.realScreenHeight * 0.4,
color: Color(0xfff7f7f7),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Container(
color: Color(0xfff7f7f7),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
CupertinoButton(
child: Text(TranslationBase.of(context).cancel,
style:
TextStyle(color: Theme.of(context).primaryColor)),
onPressed: () {
Navigator.pop(context);
},
),
CupertinoButton(
child: Text(
TranslationBase.of(context).done,
style: TextStyle(color: Theme.of(context).primaryColor),
),
onPressed: () {
Navigator.pop(context);
onSelectFun(cupertinoPickerIndex);
},
),
],
),
),
Container(
height: SizeConfig.realScreenHeight * 0.3,
color: Color(0xfff7f7f7),
child: buildPickerItems(context, items, decKey, onSelectFun))
],
),
);
},
);
}
/// build Cupertino Picker for any list
/// [context] the page BuildContext
/// [items] the list of items we need to show
/// [onSelectFun] the call function on select event
/// [decKey] the key we show for user
buildPickerItems(context, List items, decKey, onSelectFun) {
return CupertinoPicker(
magnification: 1.5,
scrollController:
FixedExtentScrollController(initialItem: cupertinoPickerIndex),
children: items.map((item) {
return Text(
'${item["$decKey"]}',
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
);
}).toList(),
itemExtent: 25,
looping: true,
onSelectedItemChanged: (int index) {
cupertinoPickerIndex = index;
},
);
}
}

@ -0,0 +1,122 @@
class DateUtil {
/// convert String To Date function
/// [date] String we want to convert
static DateTime convertStringToDate(String date) {
const start = "/Date(";
const end = "+0300)";
final startIndex = date.indexOf(start);
final endIndex = date.indexOf(end, startIndex + start.length);
return DateTime.fromMillisecondsSinceEpoch(
int.parse(
date.substring(startIndex + start.length, endIndex),
),
);
}
/// check Date
/// [dateString] String we want to convert
static String checkDate(DateTime checkedTime) {
DateTime currentTime = DateTime.now();
if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month) &&
(currentTime.day == checkedTime.day)) {
return "Today";
} else if ((currentTime.year == checkedTime.year) &&
(currentTime.month == checkedTime.month)) {
if ((currentTime.day - checkedTime.day) == 1) {
return "YESTERDAY";
} else if ((currentTime.day - checkedTime.day) == -1) {
return "Tomorrow";
}
if ((currentTime.day - checkedTime.day) <= -2) {
return "Next Week";
} else {
return "Old Date";
}
}
return "Old Date";
}
/// get month by
/// [month] convert month number in to month name
static getMonth(int month) {
switch (month) {
case 1:
return "Jan";
case 2:
return "Feb";
case 3:
return "Mar";
case 4:
return "Apr";
case 5:
return "May";
case 6:
return "Jun";
case 7:
return "Jul";
case 8:
return "Aug";
case 9:
return "Sep";
case 10:
return "Oct";
case 11:
return "Nov";
case 12:
return "Dec";
}
}
/// get month by
/// [weekDay] convert week day in int to week day name
static getWeekDay(int weekDay) {
switch (weekDay) {
case 1:
return "Monday";
case 2:
return "Tuesday";
case 3:
return "Wednesday";
case 4:
return "Thursday";
case 5:
return "Friday";
case 6:
return "Saturday ";
case 7:
return "Sunday";
}
}
/// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted
static String getMonthDayYearDateFormatted(DateTime dateTime) {
if (dateTime != null)
return getMonth(dateTime.month) +
" " +
dateTime.day.toString() +
"," +
dateTime.year.toString();
else
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted
static String getDayMonthYearDateFormatted(DateTime dateTime) {
print(dateTime);
if (dateTime != null)
return dateTime.day.toString() +
"/" +
dateTime.month.toString() +
"/" +
dateTime.year.toString();
else
return "";
}
}

@ -0,0 +1,45 @@
import 'dart:async';
import 'package:diplomaticquarterapp/config/localized_values.dart';
import 'package:flutter/foundation.dart' show SynchronousFuture;
import 'package:flutter/material.dart';
class TranslationBase {
TranslationBase(this.locale);
final Locale locale;
static TranslationBase of(BuildContext context) {
return Localizations.of<TranslationBase>(context, TranslationBase);
}
String get dashboardScreenToolbarTitle =>
localizedValues['dashboardScreenToolbarTitle'][locale.languageCode];
String get settings => localizedValues['settings'][locale.languageCode];
String get language => localizedValues['language'][locale.languageCode];
String get lanEnglish => localizedValues['lanEnglish'][locale.languageCode];
String get lanArabic => localizedValues['lanArabic'][locale.languageCode];
String get cancel => localizedValues['cancel'][locale.languageCode];
String get done => localizedValues['done'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {
const TranslationBaseDelegate();
@override
bool isSupported(Locale locale) => ['en', 'ar'].contains(locale.languageCode);
@override
Future<TranslationBase> load(Locale locale) {
return SynchronousFuture<TranslationBase>(TranslationBase(locale));
}
@override
bool shouldReload(TranslationBaseDelegate old) => false;
}

@ -0,0 +1,40 @@
import 'package:connectivity/connectivity.dart';
import 'app_shared_preferences.dart';
import 'app_toast.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences();
class Utils {
///show custom Error Toast
/// [message] to show for user
static showErrorToast([String message]) {
String localMsg = generateContactAdminMessage();
if (message != null) {
localMsg = message.toString();
}
AppToast.showErrorToast(message: localMsg);
}
/// Check The Internet Connection
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
return true;
} else {
return false;
}
}
/// generate Contact Admin Message
static generateContactAdminMessage([err]) {
String localMsg = 'Something wrong happened, please contact the admin';
if (err != null) {
localMsg = localMsg + '\n \n' + err.toString();
}
return localMsg;
}
}

@ -0,0 +1,153 @@
import 'package:flutter/material.dart';
class Button extends StatefulWidget {
Button(
{Key key,
this.title: "",
this.icon,
this.onTap,
this.loading: false,
this.elevation: true})
: super(key: key);
final String title;
final Widget icon;
final VoidCallback onTap;
final bool loading;
final bool elevation;
@override
_ButtonState createState() => _ButtonState();
}
class _ButtonState extends State<Button> with TickerProviderStateMixin {
double _buttonSize = 1.0;
AnimationController _animationController;
Animation _animation;
@override
void initState() {
_animationController = AnimationController(
vsync: this,
lowerBound: 0.7,
upperBound: 1.0,
duration: Duration(milliseconds: 120));
_animation = CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutQuad,
reverseCurve: Curves.easeOutQuad);
_animation.addListener(() {
setState(() {
_buttonSize = _animation.value;
});
});
super.initState();
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
Widget _buildIcon() {
if (widget.icon != null && (widget.title != null && widget.title != "")) {
return Container(
margin: EdgeInsets.only(right: 12.0),
height: 24.0,
child: widget.icon);
} else if (widget.icon != null) {
return Container(
height: 18.0,
width: 18.0,
child: widget.icon,
);
} else {
return Container();
}
}
@override
Widget build(BuildContext context) {
return (GestureDetector(
onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0);
},
onTapUp: (TapUpDetails tap) {
_animationController.forward();
},
onTapCancel: () {
_animationController.forward();
},
onTap: Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque,
child: Transform.scale(
scale: _buttonSize,
child: AnimatedContainer(
duration: Duration(milliseconds: 150),
margin:
EdgeInsets.only(bottom: widget.title.isNotEmpty ? 14.0 : 0.0),
padding: EdgeInsets.symmetric(
vertical: widget.title != null && widget.title.isNotEmpty
? 12.0
: 15.0,
horizontal: widget.title != null && widget.title.isNotEmpty
? 22.0
: 19),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(100.0)),
gradient: LinearGradient(
begin: Alignment(-1.2, 2),
end: Alignment(1, -1),
stops: [
0.1,
0.8,
1.0
],
colors: [
Color.fromRGBO(113, 99, 255, 1.0),
Color.fromRGBO(78, 40, 253, 1.0),
Color.fromRGBO(78, 62, 253, 1.0)
]),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
47, 0, 244, widget.elevation ? 0.28 : 0.0),
spreadRadius:
_buttonSize < 1.0 ? -(1 - _buttonSize) * 50 : 0.0,
offset: Offset(0, 7.0),
blurRadius: 24.0)
]),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
_buildIcon(),
widget.loading
? Padding(
padding: const EdgeInsets.all(2.7),
child: SizedBox(
height: 19.0,
width: 19.0,
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Color.fromRGBO(113, 99, 255, 1.0))),
),
)
: Padding(
padding: EdgeInsets.only(bottom: 3.0),
child: Text(widget.title,
style: TextStyle(
color: Colors.white,
fontSize: 17.0,
fontWeight: FontWeight.w700,
fontFamily: "HKGrotesk")),
)
],
),
)),
));
}
}

@ -0,0 +1,113 @@
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
enum MINI_BUTTON { Secondary, Primary }
class MiniButton extends StatefulWidget {
MiniButton(
{Key key,
this.title: "",
this.icon,
this.onTap,
this.variant: MINI_BUTTON.Secondary})
: super(key: key);
final String title;
final IconData icon;
final VoidCallback onTap;
final MINI_BUTTON variant;
@override
_MiniButtonState createState() => _MiniButtonState();
}
class _MiniButtonState extends State<MiniButton> with TickerProviderStateMixin {
double _buttonSize = 1.0;
AnimationController _animationController;
Animation _animation;
@override
void initState() {
_animationController = AnimationController(
vsync: this,
lowerBound: 0.7,
upperBound: 1.0,
duration: Duration(milliseconds: 120));
_animation = CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutQuad,
reverseCurve: Curves.easeOutQuad);
_animation.addListener(() {
setState(() {
_buttonSize = _animation.value;
});
});
super.initState();
}
@override
void dispose() {
_animationController.dispose();
super.dispose();
}
Widget _buildIcon() {
if (widget.icon != null && (widget.title != null && widget.title != "")) {
return Container(
margin: EdgeInsets.only(right: 8.0),
child: Icon(
widget.icon,
size: 18.0,
color: widget.variant == MINI_BUTTON.Primary
? Colors.white
: Color.fromRGBO(78, 62, 253, 1.0),
));
} else {
return Container();
}
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0);
},
onTapUp: (TapUpDetails tap) {
_animationController.forward();
},
onTapCancel: () {
_animationController.forward();
},
onTap: Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque,
child: Transform.scale(
scale: _buttonSize,
child: Container(
margin: EdgeInsets.only(top: 18.0, bottom: 24.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(60.0)),
color: widget.variant == MINI_BUTTON.Primary
? Theme.of(context).primaryColor
: Theme.of(context).primaryColor.withOpacity(0.13),
),
padding: EdgeInsets.symmetric(vertical: 7.0, horizontal: 20.0),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
_buildIcon(),
Padding(
padding: EdgeInsets.only(bottom: 1.5),
child: Texts(widget.title,
color: widget.variant == MINI_BUTTON.Primary
? Colors.white
: Theme.of(context).primaryColor,
style: "bodyText1",
bold: true),
),
],
))),
);
}
}

@ -0,0 +1,234 @@
import 'package:flutter/material.dart';
class SecondaryButton extends StatefulWidget {
SecondaryButton(
{Key key,
this.title = "",
this.borderColor,
this.icon,
this.iconOnly = false,
this.color,
this.textColor,
this.onTap,
this.loading: false,
this.small = false,
this.disabled = false,
this.noBorderRadius = false})
: super(key: key);
final String title;
final Widget icon;
final VoidCallback onTap;
final bool loading;
final Color color;
final Color textColor;
final Color borderColor;
final bool small;
final bool iconOnly;
final bool disabled;
final bool noBorderRadius;
@override
_SecondaryButtonState createState() => _SecondaryButtonState();
}
class _SecondaryButtonState extends State<SecondaryButton>
with TickerProviderStateMixin {
double _buttonSize = 1.0;
AnimationController _animationController;
Animation _animation;
double _rippleSize = 0.0;
AnimationController _rippleController;
Animation _rippleAnimation;
@override
void initState() {
if (widget.disabled != null && !widget.disabled) {
setState(() {
_rippleSize = 1.0;
});
}
_animationController = AnimationController(
vsync: this,
lowerBound: 0.7,
upperBound: 1.0,
duration: Duration(milliseconds: 120));
_animation = CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutQuad,
reverseCurve: Curves.easeOutQuad);
_animation.addListener(() {
setState(() {
_buttonSize = _animation.value;
});
});
_rippleController = AnimationController(
vsync: this,
lowerBound: 0.0,
upperBound: 1.0,
duration: Duration(seconds: 1));
_rippleAnimation = CurvedAnimation(
parent: _rippleController, curve: Curves.easeInOutQuint);
_rippleAnimation.addListener(() {
setState(() {
_rippleSize = _rippleAnimation.value;
});
});
super.initState();
}
@override
void dispose() {
_animationController.dispose();
_rippleController.dispose();
super.dispose();
}
Widget _buildIcon() {
if (widget.icon != null && (widget.title != null && widget.title != "")) {
return Container(height: 25.0, child: widget.icon);
} else if (widget.icon != null &&
(widget.title == null || widget.title == "")) {
return Container(height: 25.0, width: 25, child: widget.icon);
} else {
return Container();
}
}
@override
void didUpdateWidget(SecondaryButton oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.disabled != widget.disabled) {
bool d = widget.disabled ?? false;
if (!d) {
_rippleController.forward();
} else {
if (_rippleSize == 1.0)
_rippleController.reverse(from: 1.0);
else
_rippleController.reverse();
}
}
}
@override
Widget build(BuildContext context) {
return IgnorePointer(
ignoring: widget.loading,
child: GestureDetector(
onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0);
},
onTapUp: (TapUpDetails tap) {
_animationController.forward();
},
onTapCancel: () {
_animationController.forward();
},
onTap: Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque,
child: Transform.scale(
scale: _buttonSize,
child: Container(
decoration: BoxDecoration(
border: widget.borderColor != null
? Border.all(
color: widget.borderColor.withOpacity(0.1), width: 2.0)
: null,
borderRadius: BorderRadius.all(Radius.circular(100.0)),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.04),
spreadRadius: -0.0,
offset: Offset(0, 4.0),
blurRadius: 18.0)
]),
child: ClipRRect(
borderRadius: widget.noBorderRadius
? BorderRadius.all(Radius.circular(0.0))
: BorderRadius.all(Radius.circular(48.0)),
child: Stack(
children: <Widget>[
Positioned(
left: 0,
bottom: 0,
child: Container(
width: MediaQuery.of(context).size.width,
height: 100,
decoration: BoxDecoration(
color: Theme.of(context).disabledColor,
),
),
),
Positioned(
left: -MediaQuery.of(context).size.width * 2.2 / 1.8,
bottom: -MediaQuery.of(context).size.width * 2.2 / 1.8,
child: Transform.scale(
scale: widget.disabled != null ? _rippleSize : 1.0,
child: Container(
width: MediaQuery.of(context).size.width * 2.2,
height: MediaQuery.of(context).size.width * 2.2,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: widget.color,
),
),
),
),
Container(
padding: widget.iconOnly
? EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0)
: EdgeInsets.only(
top: widget.small ? 8.0 : 14.0,
bottom: widget.small ? 6.0 : 14.0,
left: 18.0,
right: 18.0),
child: Stack(children: <Widget>[
Positioned(
child: _buildIcon(),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
widget.loading
? Padding(
padding: EdgeInsets.all(2.6),
child: SizedBox(
height: 19.0,
width: 19.0,
child: CircularProgressIndicator(
backgroundColor:
Color.fromRGBO(140, 130, 255, 1.0),
valueColor:
AlwaysStoppedAnimation<Color>(
Color.fromRGBO(
255, 255, 255, 1.0))),
),
)
: Padding(
padding: EdgeInsets.only(
bottom: widget.small ? 4.0 : 3.0),
child: Text(widget.title,
style: TextStyle(
color: widget.textColor,
fontSize: 17.0,
fontWeight: FontWeight.w800,
fontFamily: "HKGrotesk")),
)
],
)
]),
),
],
),
),
),
),
),
);
}
}

@ -0,0 +1,254 @@
import 'package:flutter/material.dart';
class Texts extends StatefulWidget {
final String text;
final String variant;
final Color color;
final bool bold;
final bool regular;
final bool medium;
final int maxLength;
final bool italic;
final TextAlign textAlign;
final int maxLines;
final bool readMore;
final String style;
final bool allowExpand;
Texts(this.text,
{Key key,
this.variant,
this.color,
this.bold,
this.regular,
this.medium,
this.allowExpand = true,
this.italic: false,
this.textAlign,
this.maxLength = 60,
this.maxLines,
this.readMore = false,
this.style})
: super(key: key);
@override
_TextsState createState() => _TextsState();
}
class _TextsState extends State<Texts> {
bool hidden = false;
String text = "";
@override
void didUpdateWidget(Texts oldWidget) {
setState(() {
if (widget.style == "overline")
text = widget.text.toUpperCase();
else {
text = widget.text;
}
});
super.didUpdateWidget(oldWidget);
}
@override
void initState() {
hidden = widget.readMore;
if (widget.style == "overline")
text = widget.text.toUpperCase();
else {
text = widget.text;
}
super.initState();
}
double _getFontSize() {
switch (widget.variant) {
case "heading0":
return 40.0;
case "heading":
return 32.0;
case "heading2":
return 28.0;
case "heading3":
return 18.0;
case "body1":
return 18.0;
case "body2":
return 20.0;
case "body2Link":
return 16.0;
case "caption":
return 16.0;
case "caption2":
return 14.0;
case "bodyText":
return 15.0;
case "bodyText2":
return 17.0;
case "caption3":
return 12.0;
case "caption4":
return 9.0;
case "overline":
return 11.0;
case "date":
return 24.0;
default:
return 16.0;
}
}
FontWeight _getFontWeight() {
if (widget.bold ?? false) {
return FontWeight.w900;
} else if (widget.regular ?? false) {
return FontWeight.w500;
} else if (widget.medium ?? false) {
return FontWeight.w800;
} else {
if (widget.style == null) {
switch (widget.variant) {
case "heading":
return FontWeight.w900;
case "heading2":
return FontWeight.w900;
case "heading3":
return FontWeight.w900;
case "body1":
return FontWeight.w800;
case "body2":
return FontWeight.w900;
case "body2Link":
return FontWeight.w800;
case "caption":
return FontWeight.w700;
case "caption2":
return FontWeight.w700;
case "bodyText":
return FontWeight.w500;
case "bodyText2":
return FontWeight.w500;
case "caption3":
return FontWeight.w600;
case "caption4":
return FontWeight.w600;
case "overline":
return FontWeight.w800;
case "date":
return FontWeight.w900;
default:
return FontWeight.w500;
}
} else {
return null;
}
}
}
@override
Widget build(BuildContext context) {
TextStyle _getFontStyle() {
switch (widget.style) {
case "headline2":
return Theme.of(context).textTheme.headline2;
case "headline3":
return Theme.of(context).textTheme.headline3;
case "headline4":
return Theme.of(context).textTheme.headline4;
case "headline5":
return Theme.of(context).textTheme.headline5;
case "headline6":
return Theme.of(context).textTheme.headline6;
case "bodyText2":
return Theme.of(context).textTheme.bodyText2;
case "bodyText_15":
return Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 15.0);
case "bodyText1":
return Theme.of(context).textTheme.bodyText1;
case "caption":
return Theme.of(context).textTheme.caption;
case "overline":
return Theme.of(context).textTheme.overline;
case "button":
return Theme.of(context).textTheme.button;
default:
return TextStyle();
}
}
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Stack(
children: <Widget>[
Text(
!hidden
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
textAlign: widget.textAlign,
overflow: widget.maxLines != null
? ((widget.maxLines > 1)
? TextOverflow.fade
: TextOverflow.ellipsis)
: null,
maxLines: widget.maxLines ?? null,
style: widget.style != null
? _getFontStyle().copyWith(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color != null ? widget.color : null,
fontWeight: _getFontWeight(),
)
: TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null,
color:
widget.color != null ? widget.color : Colors.black,
fontSize: _getFontSize(),
letterSpacing:
widget.variant == "overline" ? 1.5 : null,
fontWeight: _getFontWeight(),
)),
if (widget.readMore && text.length > widget.maxLength && hidden)
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Theme.of(context).backgroundColor,
Theme.of(context).backgroundColor.withOpacity(0),
], begin: Alignment.bottomCenter, end: Alignment.topCenter),
),
height: 30,
),
)
],
),
if (widget.allowExpand &&
widget.readMore &&
text.length > widget.maxLength)
Padding(
padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0),
child: InkWell(
onTap: () {
setState(() {
hidden = !hidden;
});
},
child: Text(hidden ? "Read More" : "Read less",
style: _getFontStyle().copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w800,
fontFamily: "HKGrotesk")),
),
),
],
);
}
}

@ -0,0 +1,88 @@
import 'package:flutter/animation.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class CustomSwitch extends StatefulWidget {
final bool value;
final AsyncCallback onChanged;
final Color activeColor;
final Color inactiveColor;
CustomSwitch(
{Key key,
this.value,
this.onChanged,
this.activeColor,
this.inactiveColor})
: super(key: key);
@override
_CustomSwitchState createState() => _CustomSwitchState();
}
class _CustomSwitchState extends State<CustomSwitch>
with SingleTickerProviderStateMixin {
Animation _circleAnimation;
AnimationController _animationController;
@override
void initState() {
super.initState();
_animationController =
AnimationController(vsync: this, duration: Duration(milliseconds: 800));
_circleAnimation = Tween(begin: 0.0, end: 30.0).animate(CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutQuint,
reverseCurve: Curves.easeInQuint));
if (widget.value) _animationController.forward();
}
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
animation: _animationController,
builder: (context, child) {
return GestureDetector(
onTap: Feedback.wrapForTap(() async {
if (widget.value) {
_animationController.reverse();
} else {
_animationController.forward();
}
await widget.onChanged();
}, context),
child: AnimatedContainer(
duration: Duration(milliseconds: 200),
width: 60.0,
height: 30.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
color: _circleAnimation.status == AnimationStatus.dismissed ||
_circleAnimation.status == AnimationStatus.reverse
? widget.inactiveColor
: widget.activeColor),
child: Padding(
padding:
EdgeInsets.only(top: 6.0, bottom: 6.0, right: 6.0, left: 6.0),
child: Row(
children: <Widget>[
Container(width: _circleAnimation.value),
Container(
width: 16.0,
height: 16.0,
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color: Colors.grey[800].withOpacity(0.15),
offset: Offset(0, 4.0),
blurRadius: 5.0)
], shape: BoxShape.circle, color: Colors.white),
)
],
),
),
),
);
},
);
}
}

@ -0,0 +1,26 @@
import 'package:diplomaticquarterapp/widgets/Buttons/button.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ButtonActions extends StatelessWidget {
final VoidCallback onPositive;
const ButtonActions({
Key key,
@required this.onPositive,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(bottom: 12.0),
child: FractionallySizedBox(
widthFactor: 0.6,
child: Button(
onTap: onPositive,
title: "Confirm",
),
),
);
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,8 @@
enum EraMode { BUDDHIST_YEAR, CHRIST_YEAR }
int calculateYearEra(EraMode era, int christYear) {
if (era == EraMode.BUDDHIST_YEAR) {
return christYear + 543;
}
return christYear;
}

@ -0,0 +1,317 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class NumberTextInputFormatter extends TextInputFormatter {
@override
TextEditingValue formatEditUpdate(
TextEditingValue oldValue, TextEditingValue newValue) {
final int newTextLength = newValue.text.length;
int selectionIndex = newValue.selection.end;
int usedSubstringIndex = 0;
final StringBuffer newText = StringBuffer();
if (newTextLength >= 1) {
newText.write('(');
if (newValue.selection.end >= 1) selectionIndex++;
}
if (newTextLength >= 4) {
newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') ');
if (newValue.selection.end >= 3) selectionIndex += 2;
}
if (newTextLength >= 7) {
newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-');
if (newValue.selection.end >= 6) selectionIndex++;
}
if (newTextLength >= 11) {
newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' ');
if (newValue.selection.end >= 10) selectionIndex++;
}
// Dump the rest.
if (newTextLength >= usedSubstringIndex)
newText.write(newValue.text.substring(usedSubstringIndex));
return TextEditingValue(
text: newText.toString(),
selection: TextSelection.collapsed(offset: selectionIndex),
);
}
}
final _mobileFormatter = NumberTextInputFormatter();
class TextFields extends StatefulWidget {
TextFields(
{Key key,
this.type,
this.hintText,
this.suffixIcon,
this.autoFocus,
this.onChanged,
this.initialValue,
this.minLines,
this.maxLines,
this.inputFormatters,
this.padding,
this.focus = false,
this.maxLengthEnforced = true,
this.suffixIconColor,
this.inputAction,
this.onSubmit,
this.keepPadding = true,
this.textCapitalization = TextCapitalization.none,
this.onTap,
this.controller,
this.keyboardType,
this.validator,
this.borderOnlyError = false,
this.onSaved,
this.onSuffixTap,
this.readOnly: false,
this.maxLength,
this.prefixIcon,
this.bare = false,
this.fontSize = 16.0,
this.fontWeight = FontWeight.w700,
this.autoValidate = false})
: super(key: key);
final String hintText;
final String initialValue;
final String type;
final bool autoFocus;
final IconData suffixIcon;
final Color suffixIconColor;
final IconData prefixIcon;
final VoidCallback onTap;
final TextEditingController controller;
final TextInputType keyboardType;
final FormFieldValidator validator;
final Function onSaved;
final Function onSuffixTap;
final Function onChanged;
final Function onSubmit;
final bool readOnly;
final int maxLength;
final int minLines;
final int maxLines;
final bool maxLengthEnforced;
final bool bare;
final TextInputAction inputAction;
final double fontSize;
final FontWeight fontWeight;
final bool keepPadding;
final TextCapitalization textCapitalization;
final List<TextInputFormatter> inputFormatters;
final bool autoValidate;
final EdgeInsets padding;
final bool focus;
final bool borderOnlyError;
@override
_TextFieldsState createState() => _TextFieldsState();
}
class _TextFieldsState extends State<TextFields> {
final FocusNode _focusNode = FocusNode();
bool focus = false;
bool view = false;
@override
void initState() {
super.initState();
_focusNode.addListener(() {
setState(() {
focus = _focusNode.hasFocus;
});
});
}
@override
void didUpdateWidget(TextFields oldWidget) {
if (widget.focus) _focusNode.requestFocus();
super.didUpdateWidget(oldWidget);
}
@override
void dispose() {
_focusNode.dispose();
super.dispose();
}
Widget _buildSuffixIcon() {
switch (widget.type) {
case "password":
return Padding(
padding: const EdgeInsets.only(right: 8.0),
child: view
? InkWell(
onTap: () {
this.setState(
() {
view = false;
},
);
},
child: Icon(
EvaIcons.eye,
size: 24.0,
color: Color.fromRGBO(78, 62, 253, 1.0),
),
)
: InkWell(
onTap: () {
this.setState(() {
view = true;
});
},
child: Icon(EvaIcons.eyeOff,
size: 24.0, color: Colors.grey[500]),
),
);
default:
if (widget.suffixIcon != null)
return InkWell(
onTap: widget.onSuffixTap,
child: Icon(widget.suffixIcon,
size: 22.0,
color: widget.suffixIconColor != null
? widget.suffixIconColor
: Colors.grey[500]),
);
else
return null;
}
}
bool _determineReadOnly() {
if (widget.readOnly != null && widget.readOnly) {
_focusNode.unfocus();
return true;
} else {
return false;
}
}
@override
Widget build(BuildContext context) {
return (AnimatedContainer(
duration: Duration(milliseconds: 300),
decoration: widget.bare
? null
: BoxDecoration(boxShadow: [
BoxShadow(
color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0),
offset: Offset(0.0, 13.0),
blurRadius: focus ? 34.0 : 12.0)
]),
child: TextFormField(
keyboardAppearance: Theme.of(context).brightness,
scrollPhysics: BouncingScrollPhysics(),
autovalidate: widget.autoValidate,
textCapitalization: widget.textCapitalization,
onFieldSubmitted: widget.inputAction == TextInputAction.next
? (widget.onSubmit != null
? widget.onSubmit
: (val) {
_focusNode.nextFocus();
})
: widget.onSubmit,
textInputAction: widget.inputAction,
minLines: widget.minLines ?? 1,
maxLines: widget.maxLines ?? 1,
maxLengthEnforced: widget.maxLengthEnforced,
initialValue: widget.initialValue,
onChanged: widget.onChanged,
focusNode: _focusNode,
maxLength: widget.maxLength ?? null,
controller: widget.controller,
keyboardType: widget.keyboardType,
readOnly: _determineReadOnly(),
obscureText: widget.type == "password" && !view ? true : false,
autofocus: widget.autoFocus ?? false,
validator: widget.validator,
onSaved: widget.onSaved,
style: Theme.of(context)
.textTheme
.body2
.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[
WhitelistingTextInputFormatter.digitsOnly,
_mobileFormatter,
]
: widget.inputFormatters,
decoration: InputDecoration(
counterText: "",
hintText: widget.hintText,
hintStyle: TextStyle(
fontSize: widget.fontSize,
fontWeight: widget.fontWeight,
color: Theme.of(context).hintColor),
contentPadding: widget.padding != null
? widget.padding
: EdgeInsets.symmetric(
vertical: (widget.bare && !widget.keepPadding) ? 0.0 : 10.0,
horizontal: 16.0),
filled: true,
fillColor: widget.bare
? Colors.transparent
: Theme.of(context).backgroundColor,
suffixIcon: _buildSuffixIcon(),
prefixIcon: widget.type != "search"
? widget.prefixIcon != null
? Padding(
padding: EdgeInsets.only(
left: 28.0, top: 14.0, bottom: 14.0, right: 0),
child: Text(
"\$",
style: TextStyle(
fontSize: 14, fontWeight: FontWeight.w800),
),
)
: null
: Icon(EvaIcons.search, size: 20.0, color: Colors.grey[500]),
errorStyle: TextStyle(
fontSize: 14.0,
fontWeight: widget.fontWeight,
height: widget.borderOnlyError ? 0.0 : null),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 2.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 2.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.dividerColor
.withOpacity(widget.bare ? 0.0 : 1.0),
width: 2.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.dividerColor
.withOpacity(widget.bare ? 0.0 : 1.0),
width: 2.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.dividerColor
.withOpacity(widget.bare ? 0.0 : 1.0),
width: 2.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0),
),
),
),
));
}
}

@ -0,0 +1,19 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
class ArrowBack extends StatelessWidget {
final Function onTap;
ArrowBack({Key key, this.onTap}) : super(key: key);
@override
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() {
onTap != null ? onTap() : Navigator.pop(context);
}, context),
child: Icon(EvaIcons.arrowBack, color: Theme.of(context).primaryColor),
);
}
}

@ -0,0 +1,22 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
class CloseBack extends StatelessWidget{
final Function onTap;
CloseBack({Key key,
this.onTap
}) : super(key: key);
@override
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() {
onTap!=null ? onTap() : Navigator.pop(context);
}, context),
child: Icon(EvaIcons.close, color: Color.fromRGBO(78, 62, 253, 1.0)),
);
}
}

@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
class FadePage extends PageRouteBuilder {
final Widget page;
FadePage({this.page})
: super(
opaque: false,
fullscreenDialog: true,
barrierDismissible: true,
barrierColor: Colors.black.withOpacity(0.8),
pageBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
) =>
page,
transitionDuration: Duration(milliseconds: 300),
transitionsBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
return FadeTransition(
opacity: animation,
child: child
);
}
);
}

@ -0,0 +1,38 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class SlideUpPageRoute extends PageRouteBuilder {
final Widget widget;
final bool fullscreenDialog;
final bool opaque;
SlideUpPageRoute({this.widget, this.fullscreenDialog=false, this.opaque=true})
: super(pageBuilder: (
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
) {
return widget;
},
fullscreenDialog: fullscreenDialog,
opaque: opaque,
barrierColor: Color.fromRGBO(0, 0, 0, 0.5),
barrierDismissible: true,
transitionDuration: Duration(milliseconds: 800),
transitionsBuilder: ((BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child) {
var begin = Offset(0.0, 1.0);
var end = Offset.zero;
var curve = Curves.easeInOutQuint;
var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
return SlideTransition(
position: animation.drive(tween),
child: child
);
}));
}

@ -0,0 +1,110 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# Localizations
flutter_localizations:
sdk: flutter
intl: ^0.16.1
# http client
http: ^0.12.1
connectivity: ^0.4.9
# State Management
provider: ^4.3.1
# Permissions
permission_handler: ^5.0.0+hotfix.3
device_info: ^0.4.2+4
# Native
flutter_device_type: ^0.2.0
local_auth: ^0.6.2+3
maps_launcher: ^1.2.1
url_launcher: ^5.5.0
shared_preferences: ^0.5.8
flutter_flexible_toast: ^0.1.4
# Progress bar
progress_hud_v2: ^2.0.0
percent_indicator: ^2.1.5
# Icons
feather_icons_flutter: any
eva_icons_flutter: any
font_awesome_flutter: any
cupertino_icons: ^0.1.3
# Image Attachments
image_picker: ^0.6.7+1
image_cropper: ^1.2.1
# UI Reqs
dotted_border: 1.0.5
expandable: ^4.1.4
hexcolor: ^1.0.1
# Notification Banner
dropdown_banner: ^1.4.0
flutter_local_notifications:
# charts
charts_flutter: ^0.9.0
# Qr code Scanner
barcode_scan: ^3.0.1
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: any
flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

@ -0,0 +1,30 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:diplomaticquarterapp/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
Loading…
Cancel
Save