Create #Forez flavor
@ -87,6 +87,10 @@ android {
|
|||||||
beta {
|
beta {
|
||||||
applicationId "org.communiquons.beta"
|
applicationId "org.communiquons.beta"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
forez {
|
||||||
|
applicationId "org.communiquons.forez"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
|
11
android/app/src/forez/AndroidManifest.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
package="org.communiquons.comunic">
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:label="#Forez"
|
||||||
|
android:usesCleartextTraffic="true"
|
||||||
|
tools:replace="android:label" />
|
||||||
|
|
||||||
|
|
||||||
|
</manifest>
|
40
android/app/src/forez/google-services.json
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "500630888942",
|
||||||
|
"firebase_url": "https://forez-1b859.firebaseio.com",
|
||||||
|
"project_id": "forez-1b859",
|
||||||
|
"storage_bucket": "forez-1b859.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:500630888942:android:9764f377f1598befd02eff",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "org.communiquons.forez"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "500630888942-bnrmk599c8q7viijmbkjp3t5fc8806nf.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDYhRp1wa6WuSENeq1Dl4b1k2BGZCnnqRo"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "500630888942-bnrmk599c8q7viijmbkjp3t5fc8806nf.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
BIN
android/app/src/forez/ic_launcher-playstore.png
Normal file
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,42 @@
|
|||||||
|
<!-- Source : https://thenounproject.com/term/wheat/13673/ -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<group android:scaleX="0.5076"
|
||||||
|
android:scaleY="0.5076"
|
||||||
|
android:translateX="28.62"
|
||||||
|
android:translateY="28.62">
|
||||||
|
<path
|
||||||
|
android:pathData="M66.488 96.548c-0.304 -0.282 -30.184 -28.843 -17.21 -74.752l1.443 0.408c-12.718 45.003 16.494 72.971 16.79 73.248L66.488 96.548z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M51.307 79.136c0 0 -11.572 2.956 -15.542 -9.378C35.764 69.758 48.012 67.057 51.307 79.136z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M31.203 52.781c0 0 0.253 13.431 14.951 11.826C46.154 64.607 45.309 52.528 31.203 52.781z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M44.283 48.953c0 0 -11.604 1.791 -13.147 -15.157C31.137 33.795 45.233 33.141 44.283 48.953z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M44.329 31.538c0 0 -13.085 -5.743 -5.397 -22.045C38.932 9.493 50.318 17.18 44.329 31.538z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M49.574 20.516c0 0 -7.518 -12.628 5.152 -19.47C54.727 1.046 63.174 8.818 49.574 20.516z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M56.039 77.342c0 0 -2.521 -12.166 11.542 -15.354C67.581 61.987 70.963 74.527 56.039 77.342z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M51.685 62.538c0 0 -0.928 -12.587 12.671 -16.64C64.355 45.898 65.199 62.875 51.685 62.538z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M49.913 47.841c0 0 -0.338 -14.528 13.853 -15.119C63.766 32.722 59.036 49.361 49.913 47.841z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:pathData="M51.263 31.382c0 0 -0.421 -11.331 12.503 -13.443C63.766 17.939 63.595 30.551 51.263 31.382z"
|
||||||
|
android:fillColor="#FFFFFF" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
37
android/app/src/forez/res/drawable/ic_wheat.xml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<!-- Source : https://thenounproject.com/term/wheat/13673/ -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:viewportWidth="100"
|
||||||
|
android:viewportHeight="100"
|
||||||
|
android:width="100dp"
|
||||||
|
android:height="100dp">
|
||||||
|
<path
|
||||||
|
android:pathData="M66.488 96.548c-0.304 -0.282 -30.184 -28.843 -17.21 -74.752l1.443 0.408c-12.718 45.003 16.494 72.971 16.79 73.248L66.488 96.548z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M51.307 79.136c0 0 -11.572 2.956 -15.542 -9.378C35.764 69.758 48.012 67.057 51.307 79.136z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M31.203 52.781c0 0 0.253 13.431 14.951 11.826C46.154 64.607 45.309 52.528 31.203 52.781z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M44.283 48.953c0 0 -11.604 1.791 -13.147 -15.157C31.137 33.795 45.233 33.141 44.283 48.953z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M44.329 31.538c0 0 -13.085 -5.743 -5.397 -22.045C38.932 9.493 50.318 17.18 44.329 31.538z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M49.574 20.516c0 0 -7.518 -12.628 5.152 -19.47C54.727 1.046 63.174 8.818 49.574 20.516z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M56.039 77.342c0 0 -2.521 -12.166 11.542 -15.354C67.581 61.987 70.963 74.527 56.039 77.342z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M51.685 62.538c0 0 -0.928 -12.587 12.671 -16.64C64.355 45.898 65.199 62.875 51.685 62.538z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M49.913 47.841c0 0 -0.338 -14.528 13.853 -15.119C63.766 32.722 59.036 49.361 49.913 47.841z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
<path
|
||||||
|
android:pathData="M51.263 31.382c0 0 -0.421 -11.331 12.503 -13.443C63.766 17.939 63.595 30.551 51.263 31.382z"
|
||||||
|
android:fillColor="#000000" />
|
||||||
|
</vector>
|
BIN
android/app/src/forez/res/drawable/ic_wheat_white.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
18
android/app/src/forez/res/drawable/launch_background.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?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>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#1b5e20" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- You can insert your own image assets here -->
|
||||||
|
<item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@drawable/ic_wheat_white" />
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
BIN
android/app/src/forez/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
android/app/src/forez/res/mipmap-hdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
android/app/src/forez/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
android/app/src/forez/res/mipmap-mdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
android/app/src/forez/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
android/app/src/forez/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
android/app/src/forez/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
android/app/src/forez/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
android/app/src/forez/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
android/app/src/forez/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#1B5E20</color>
|
||||||
|
</resources>
|
18
android/app/src/forez/res/values/styles.xml
Normal file
@ -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>
|
32
lib/main_forez_dev.dart
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:comunic/main.dart';
|
||||||
|
import 'package:comunic/models/config.dart';
|
||||||
|
|
||||||
|
/// Forez development configuration
|
||||||
|
///
|
||||||
|
/// @author Pierre Hubert
|
||||||
|
|
||||||
|
/// Fix HTTPS issue
|
||||||
|
class MyHttpOverride extends HttpOverrides {
|
||||||
|
@override
|
||||||
|
HttpClient createHttpClient(SecurityContext context) {
|
||||||
|
return super.createHttpClient(context)
|
||||||
|
..badCertificateCallback = (cert, host, port) {
|
||||||
|
return host == "devweb.local"; // Forcefully trust local website
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
Config.set(Config(
|
||||||
|
apiServerName: "192.168.1.9:3000",
|
||||||
|
apiServerUri: "/",
|
||||||
|
apiServerSecure: false,
|
||||||
|
clientName: "ForezFlutter",
|
||||||
|
));
|
||||||
|
|
||||||
|
HttpOverrides.global = new MyHttpOverride();
|
||||||
|
|
||||||
|
subMain();
|
||||||
|
}
|