Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhmdHsn313 committed Jul 21, 2020
2 parents 003163b + 675b4a5 commit 7e56869
Show file tree
Hide file tree
Showing 234 changed files with 8,971 additions and 2,937 deletions.
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart"
}
]
}
17 changes: 17 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
6 changes: 6 additions & 0 deletions android/app/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
23 changes: 23 additions & 0 deletions android/app/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>app</name>
<comment>Project app created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions android/app/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1
37 changes: 30 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 28
compileSdkVersion 29

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -37,19 +43,36 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "org.codeforiraq.iqhome"
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 23
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
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
signingConfig signingConfigs.release
minifyEnabled true

// Enables resource shrinking, which is performed by the
// Android Gradle plugin.
shrinkResources true

// Includes the default ProGuard rules files that are packaged with
// the Android Gradle plugin. To learn more, go to the section about
// R8 configuration files.
proguardFiles getDefaultProguardFile(
'proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
}
Expand Down
Binary file added android/app/key.jks
Binary file not shown.
35 changes: 35 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Flutter wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
-dontwarn io.flutter.embedding.**

## Gson rules
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }

# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}

## flutter_local_notification plugin rules
-keep class com.dexterous.** { *; }
49 changes: 25 additions & 24 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.codeforiraq.iqhome">
<!-- 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. -->

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
android:name="io.flutter.app.FlutterApplication"
android:label="iqhome"
android:icon="@mipmap/ic_launcher">
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:usesCleartextTraffic="true">
<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:launchMode="singleTop"
android:theme="@style/LaunchTheme"
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. -->
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />

<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
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"/>
<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 -->
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
Expand Down
32 changes: 30 additions & 2 deletions android/app/src/main/kotlin/org/codeforiraq/iqhome/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
package org.codeforiraq.iqhome

import android.content.ContentResolver
import android.content.Context
import android.media.RingtoneManager
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {
}
class MainActivity : FlutterActivity() {
private fun resourceToUriString(context: Context, resId: Int): String {
return (ContentResolver.SCHEME_ANDROID_RESOURCE
+ "://"
+ context.resources.getResourcePackageName(resId)
+ "/"
+ context.resources.getResourceTypeName(resId)
+ "/"
+ context.resources.getResourceEntryName(resId))
}

override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine)
MethodChannel(flutterEngine.dartExecutor, "crossingthestreams.io/resourceResolver").setMethodCallHandler { call, result ->
if ("drawableToUri" == call.method) {
val resourceId = this@MainActivity.resources.getIdentifier(call.arguments as String, "drawable", this@MainActivity.packageName)
result.success(resourceToUriString(this@MainActivity.applicationContext, resourceId))
}
if ("getAlarmUri" == call.method) {
result.success(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM).toString())
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions android/app/src/main/res/drawable/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:width="90.052dp"
android:height="90.063dp"
android:viewportWidth="110.052"
android:viewportHeight="110.063">
<path
android:pathData="M102.23,45.7l-0.007,-0.007L59.365,2.834a9.67,9.67 0,0 0,-13.679 0L2.852,45.667l-0.043,0.044A9.668,9.668 0,0 0,9.245 62.19q0.148,0.014 0.3,0.014h1.708L11.253,93.743a11.332,11.332 0,0 0,11.321 11.319L82.481,105.062A11.332,11.332 0,0 0,93.8 93.743L93.8,62.2h1.584A9.673,9.673 0,0 0,102.23 45.7ZM102.23,45.7"
android:fillColor="#5a8"/>
<path
android:pathData="M60.33,30.385l0,0.063 0.245,0.607 0.611,2.252 0.348,0.284 0.4,0.24 0.28,0.334 0.109,0.335 -0.034,0.521 0.012,0.606 0.164,0.462 0.227,0.352 0.212,0.176 0.318,0.016 0.38,0.086 0.256,0.349 0.814,2.547 0.08,0.332 0.342,0.106 0.564,-0.049 0.577,0.264 0.618,0.412 0.581,0.773 0.392,0.125 1.223,-0.114 1.676,0.125 0.785,0.4 -0.081,0.245 -0.6,0.276 -1.064,0.322 -0.314,0.547 -0.177,0.705 0.032,0.4 0.261,0.436 0.752,0.865 0.042,0.313 0.133,0.436 0.14,0.3 -0.155,0.578 -0.682,0.4 -0.9,0.432 -1.8,1.921 -0.134,0.414 0.011,1.134 -0.178,0.324 -0.568,-0.006 -0.445,-0.059 -0.023,0.4 -0.284,0.529 -0.161,0.459 0.661,1.084 0.118,0.574 -0.1,0.523 -0.612,0.9 -0.363,0.606 0.088,0.135 0.476,0.24 1.486,1.975 0.478,0.692 0.627,-0.181 0.235,0.012 0.184,0.112 0.114,0.233v0.3l-0.159,0.443 0.8,0.18 0.288,0.448 0.934,1.532 -0.035,0.454 -0.447,0.722 0,0.479 0.093,0.43 0.146,0.15 1.374,0.061 0.584,0.172 1.429,0.782 1.624,1.2 1.331,0.979 1.132,0.833 1.214,-0.061 0.331,0.151 0.308,0.26 0.347,0.683 0.7,1.544 0.59,0.512 0.912,1.234 0.856,1.155 -0.564,1.569 -0.551,1.629v3.223l1.162,0.048 1.292,0.054 0.01,1.342 0.011,1.348 0.011,1.537 0.379,0.064 0.6,0.328 0.258,0.5 0.324,0.271 0.391,0.044 0.387,0.244 0.382,0.444 0.139,0.336 -0.1,0.229 0.082,0.4 0.267,0.578 0.326,0.271 0.5,0.333 -0.684,0.191 -0.738,-0.146 -1.578,-0.675 -0.511,-0.018 -0.669,0.256 -0.028,0.229 -1.666,-0.753 -0.6,-0.152 -0.215,-0.014 -0.955,0.007 -1.36,0.135 -0.8,0.306 -0.556,0.325 -0.251,0.318 -0.091,0.171 -0.433,0.938 -0.5,1.2 -0.52,1.083 -1.012,1.518 -0.56,0.7 -1.2,1.3 -1.3,0.26 -3.014,-0.256L65.769,96.322l-3.325,-0.283 -2.474,-0.211 -0.19,-0.07 -2.446,-1.859 -1.935,-1.472 -2.415,-1.84 -2.467,-1.883 -2.5,-1.914 -1.819,-1.392 -2.208,-1.793 -2.01,-1.635 -1.587,-1.293 -2.036,-1.133 -1.591,-0.886 -2.317,-1.291 -1.853,-1.033 -1.586,-0.886 -2.442,-1.365 -0.812,-0.371 -2.531,-0.456 -2.4,-0.387 -2.486,-0.4 -1.655,-0.267 1.092,-0.973 -0.336,-0.875 -0.8,0.161 -0.731,0.208 -0.443,-1.363 0.565,-0.168 -0.522,-1.78 -0.538,-1.836 -0.518,-1.776 -0.53,-1.822 2.1,-1.169 1.568,-0.875 2.195,-1.225 2.116,-1.183 2.016,-1.129 2.22,-1.245 1.986,-1.115 1.82,-0.453 0.385,-0.353 0.83,-1.525 0.709,-1.306 0.034,-0.3 0,-1.855 0.125,-2.183 0.237,-1.168 0.407,-1.034 0.376,-0.755 0.039,-0.708 -0.05,-0.718 -0.389,-1.087 -0.4,-1.134 0.045,-1.1 0.075,-0.587 0.253,-0.938 0.431,-0.687 0.464,-0.426 1.73,-0.439 1.025,-0.261 1.375,-1.22 0.815,-0.724 1.136,-1.15 0.836,-0.847 0.067,-0.294v-0.116l0.718,-0.172 1.331,-1.029 0.783,-0.962 0.248,-0.085 0.7,0.316 0.5,0.087 1.155,-0.364 0.687,0.192 0.578,0.242 0.323,0.016 1.549,0.6 0.387,0.074 0.8,0.073 1.191,0.032 0.768,-0.391 0.542,-0.378 0.381,0.009 0.369,0.091 0.31,0.161 0.264,0.283 0.123,0.4 -0.05,1.286 0.117,0.34 0.209,0.243 0.268,0.045 0.324,-0.279 0.566,-0.407 0.7,-0.444 0.519,-0.407 0.3,-0.152 0.47,0.021 0.457,0.071Z"
android:fillColor="#fff"
tools:ignore="VectorPath" />
</vector>
8 changes: 4 additions & 4 deletions android/app/src/main/res/drawable/launch_background.xml
Original file line number Diff line number Diff line change
@@ -1,12 +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" />
<item android:drawable="@color/primary" />

<!-- You can insert your own image assets here -->
<!-- <item>
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
android:src="@drawable/iraq_map" />
</item>
</layer-list>
Binary file removed android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions android/app/src/main/res/raw/keep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@drawable/*,@raw/slow_spring_board" />
Binary file not shown.
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#55AA88</color>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">IQ-Home</string>
</resources>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
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>
<item name="android:windowBackground">@color/primary</item>
</style>
</resources>
4 changes: 4 additions & 0 deletions android/key.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
storePassword=aqUE50mkXSM
keyPassword=aqUE50mkXSM
keyAlias=key
storeFile=key.jks
Binary file added assets/files/slow_spring_board.mp3
Binary file not shown.
Binary file added assets/fonts/IQ_Home.ttf
Binary file not shown.
Binary file added assets/fonts/Tajawal/Tajawal-Regular.ttf
Binary file not shown.
16 changes: 16 additions & 0 deletions assets/images/avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7e56869

Please sign in to comment.