Слияние с feature_10789
@@ -15,15 +15,15 @@ apply plugin: 'com.android.application'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.0'
|
||||
compileSdkVersion 27
|
||||
buildToolsVersion '27.0.3'
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
targetSdkVersion 21
|
||||
targetSdkVersion 27
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
applicationId "com.dinect.checker"
|
||||
}
|
||||
@@ -38,6 +38,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "checker"
|
||||
|
||||
// Не смог разобраться, как коомбинировать flavors в flutter при запуске
|
||||
|
||||
productFlavors {
|
||||
@@ -53,7 +55,6 @@ android {
|
||||
buildConfigField "String", "appToken", "\"bdea0f3ba9034b688019a7cac753d1209e2b227f\""
|
||||
buildConfigField "String", "appTitle", "\"Dinect\""
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
|
||||
}
|
||||
|
||||
dinect_INT {
|
||||
@@ -67,7 +68,6 @@ android {
|
||||
buildConfigField "String", "appToken", "\"9fec83cdca38c357e6b65dbb17514cdd36bf2a08\""
|
||||
buildConfigField "String", "appTitle", "\"Dinect (INT)\""
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
|
||||
}
|
||||
|
||||
dinect_OTE {
|
||||
@@ -81,7 +81,6 @@ android {
|
||||
buildConfigField "String", "appToken", "\"9fec83cdca38c357e6b65dbb17514cdd36bf2a08\""
|
||||
buildConfigField "String", "appTitle", "\"Dinect (OTE)\""
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
|
||||
}
|
||||
|
||||
dinect_TESTING {
|
||||
@@ -95,7 +94,6 @@ android {
|
||||
buildConfigField "String", "appToken", "\"9fec83cdca38c357e6b65dbb17514cdd36bf2a08\""
|
||||
buildConfigField "String", "appTitle", "\"Dinect (TESTING)\""
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
|
||||
}
|
||||
|
||||
dinect_STAGING {
|
||||
@@ -109,7 +107,6 @@ android {
|
||||
buildConfigField "String", "appToken", "\"9fec83cdca38c357e6b65dbb17514cdd36bf2a08\""
|
||||
buildConfigField "String", "appTitle", "\"Dinect (STAGING)\""
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
|
||||
}
|
||||
|
||||
autobonus {
|
||||
@@ -149,7 +146,6 @@ android {
|
||||
buildConfigField "String", "appToken", "\"bdea0f3ba9034b688019a7cac753d1209e2b227f\""
|
||||
buildConfigField "String", "appTitle", "\"Crypto Joys\""
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
|
||||
}
|
||||
|
||||
develop {
|
||||
@@ -164,7 +160,6 @@ android {
|
||||
buildConfigField "String", "appTitle", "\"dinect (develop)\""
|
||||
buildConfigField "boolean", "showBonus", "true"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -185,7 +180,7 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||
compile 'com.android.support:appcompat-v7:25.3.1'
|
||||
compile 'com.android.support:appcompat-v7:27.1.0'
|
||||
compile 'com.squareup.okhttp3:okhttp:3.8.1'
|
||||
compile 'com.squareup.okio:okio:1.13.0'
|
||||
compile 'me.dm7.barcodescanner:zxing:1.9.8'
|
||||
|
||||
BIN
android/app/src/crypto/ic_launcher-web.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
@@ -0,0 +1,34 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0926"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
||||
170
android/app/src/crypto/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108">
|
||||
<path
|
||||
android:fillColor="#26A69A"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF"
|
||||
android:strokeWidth="0.8" />
|
||||
</vector>
|
||||
@@ -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="@mipmap/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="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
BIN
android/app/src/crypto/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
BIN
android/app/src/crypto/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
android/app/src/crypto/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
BIN
android/app/src/crypto/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
android/app/src/crypto/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
BIN
android/app/src/crypto/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
android/app/src/crypto/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
BIN
android/app/src/crypto/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
android/app/src/crypto/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
BIN
android/app/src/crypto/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
</resources>
|
||||
@@ -164,6 +164,8 @@ public abstract class AbstractScannerActivity extends AppCompatActivity impleme
|
||||
EditText manualInput = (EditText) findViewById(R.id.manual_input);
|
||||
|
||||
// для удобства, чтоб не вводить постоянно руками при разработке
|
||||
|
||||
// manualInput.setText("9990010009012057060904229");
|
||||
// manualInput.setText("4620011139016337050236302");
|
||||
manualInput.setHint(getIntent().getStringExtra("enter_manual"));
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@ import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.Manifest;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.content.pm.PackageInfo;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -94,12 +100,25 @@ public class MainActivity extends FlutterActivity {
|
||||
Log.d("kifio", call.method);
|
||||
finish();
|
||||
break;
|
||||
case "getVersionName":
|
||||
result.success(getVersion());
|
||||
break;
|
||||
default:
|
||||
result.notImplemented();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private String getVersion() {
|
||||
try {
|
||||
PackageInfo pInfo = this.getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
return pInfo.versionName;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private String getLanguage() {
|
||||
List<String> availableLanguages = Arrays.asList("ru", "en");
|
||||
if (availableLanguages.contains(Locale.getDefault().getLanguage())) {
|
||||
@@ -126,7 +145,11 @@ public class MainActivity extends FlutterActivity {
|
||||
}
|
||||
|
||||
private void startScannerActivity() {
|
||||
final int idx = getSharedPreferences("scanner", Context.MODE_PRIVATE).getInt(SCANNER_BACKEND_KEY, 0);
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.CAMERA}, 101);
|
||||
} else {
|
||||
final int idx = getSharedPreferences("scanner", Context.MODE_PRIVATE).getInt(
|
||||
SCANNER_BACKEND_KEY, 0);
|
||||
Intent cameraIntent = new Intent(MainActivity.this, SCANNER_BACKEND[idx]);
|
||||
|
||||
for (Object key : mScannerArgs.keySet()) {
|
||||
@@ -140,6 +163,18 @@ public class MainActivity extends FlutterActivity {
|
||||
setLocale((String) mScannerArgs.get("localeCode"));
|
||||
startActivityForResult(cameraIntent, START_SCANNER_REQUEST_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode,
|
||||
String permissions[], int[] grantResults) {
|
||||
if (requestCode == 101) {
|
||||
if (grantResults.length > 0
|
||||
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
startScannerActivity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
@@ -212,6 +247,10 @@ public class MainActivity extends FlutterActivity {
|
||||
|
||||
}
|
||||
|
||||
public void getVersionName() {
|
||||
|
||||
}
|
||||
|
||||
public void setStrings() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.kifio.checker.checker;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import io.flutter.app.FlutterActivity;
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant;
|
||||
|
||||
public class MainActivity extends FlutterActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
GeneratedPluginRegistrant.registerWith(this);
|
||||
}
|
||||
}
|
||||
@@ -15,15 +15,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="56dp"
|
||||
android:layout_weight="0.5"
|
||||
android:background="#с0000000" />
|
||||
android:layout_weight="0.5"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="56dp"
|
||||
android:layout_weight="0.5"
|
||||
android:background="#с0000000" />
|
||||
android:layout_weight="0.5" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
maven {
|
||||
url "https://maven.google.com"
|
||||
}
|
||||
|
||||
BIN
assets/crypto_logo.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
53
ios/Debug-Dinect-INT copy-Info.plist
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Dinect Crypto</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>checker</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.11</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>16</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Для работы сканнера штрихкодов</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Для работы сканнера штрихкодов</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</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>
|
||||
@@ -1 +1,2 @@
|
||||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
/**
|
||||
BREAKING CHANGES:
|
||||
|
||||
February 28, 2018: Removed "initWithFLXArchive" and
|
||||
"initWithFLXArchiveWithScriptSnapshot".
|
||||
|
||||
January 15, 2018: Marked "initWithFLXArchive" and
|
||||
"initWithFLXArchiveWithScriptSnapshot" as unavailable following the
|
||||
deprecation from December 11, 2017. Scheduled to be removed on February
|
||||
|
||||
@@ -14,18 +14,6 @@ FLUTTER_EXPORT
|
||||
|
||||
- (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (instancetype)initWithFLXArchive:(NSURL*)archiveURL
|
||||
dartMain:(NSURL*)dartMainURL
|
||||
packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER
|
||||
FLUTTER_UNAVAILABLE(
|
||||
"This initializer is no longer available. See the deprecation message from "
|
||||
"December 11, 2017 in Flutter.h. Instead, use [initWithFlutterAssets].");
|
||||
|
||||
- (instancetype)initWithFLXArchiveWithScriptSnapshot:(NSURL*)archiveURL NS_DESIGNATED_INITIALIZER
|
||||
FLUTTER_UNAVAILABLE(
|
||||
"This initializer is no longer available. See the deprecation message from "
|
||||
"December 11, 2017 in Flutter.h. Instead, use [initWithFlutterAssetsWithScriptSnapshot].");
|
||||
|
||||
- (instancetype)initWithFlutterAssets:(NSURL*)flutterAssetsURL
|
||||
dartMain:(NSURL*)dartMainURL
|
||||
packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/dinect/projects/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/dinect/projects/checker
|
||||
FLUTTER_ROOT=/Users/kifio/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/kifio/Desktop/FlutterProjects/checker
|
||||
FLUTTER_TARGET=lib/main.dart
|
||||
FLUTTER_BUILD_MODE=release
|
||||
FLUTTER_BUILD_MODE=debug
|
||||
FLUTTER_BUILD_DIR=build
|
||||
SYMROOT=${SOURCE_ROOT}/../build/ios
|
||||
FLUTTER_FRAMEWORK_DIR=/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release
|
||||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
FLUTTER_FRAMEWORK_DIR=/Users/kifio/flutter/bin/cache/artifacts/engine/ios
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
@@ -15,24 +15,24 @@ PODS:
|
||||
- ZXingObjC/All (3.2.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release`)
|
||||
- image_picker (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios`)
|
||||
- path_provider (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios`)
|
||||
- sqflite (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.6.2+2/ios`)
|
||||
- Flutter (from `/Users/kifio/flutter/bin/cache/artifacts/engine/ios`)
|
||||
- image_picker (from `/Users/kifio/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios`)
|
||||
- path_provider (from `/Users/kifio/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios`)
|
||||
- sqflite (from `/Users/kifio/.pub-cache/hosted/pub.dartlang.org/sqflite-0.8.2/ios`)
|
||||
- ZXingObjC (~> 3.2.2)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: /Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release
|
||||
:path: /Users/kifio/flutter/bin/cache/artifacts/engine/ios
|
||||
image_picker:
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios
|
||||
:path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios
|
||||
path_provider:
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios
|
||||
:path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios
|
||||
sqflite:
|
||||
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.6.2+2/ios
|
||||
:path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/sqflite-0.8.2/ios
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: 7eb41cd1fd524b90d7f22bceb20da2c39338b089
|
||||
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
|
||||
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
|
||||
image_picker: ee00aab0487cedc80a304085219503cc6d0f2e22
|
||||
path_provider: 09407919825bfe3c2deae39453b7a5b44f467873
|
||||
|
||||
53
ios/Runner copy-Info.plist
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Autobonus</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>checker</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.11</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>16</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Для работы сканнера штрихкодов</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Для работы сканнера штрихкодов</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</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>
|
||||
@@ -7,6 +7,7 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
0A215136DF169E20663D3326 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AC45BF661F9E3F97009713E2 /* libPods-Runner.a */; };
|
||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
|
||||
ACE8612B1F9F745B006FEF38 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
|
||||
ACE8612C1F9F745B006FEF38 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
|
||||
@@ -30,6 +31,48 @@
|
||||
ACE861441F9F745B006FEF38 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
ACE861461F9F745B006FEF38 /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
ACE861471F9F745B006FEF38 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
FB862E6620548D6C00C04986 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
|
||||
FB862E6720548D6C00C04986 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
|
||||
FB862E6820548D6C00C04986 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
FB862E6920548D6C00C04986 /* ScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBA9BAFE1F176DD10053B6EA /* ScannerViewController.swift */; };
|
||||
FB862E6B20548D6C00C04986 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB601F179D270053B6EA /* libiconv.tbd */; };
|
||||
FB862E6C20548D6C00C04986 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB3B1F1792A90053B6EA /* QuartzCore.framework */; };
|
||||
FB862E6D20548D6C00C04986 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB391F17927C0053B6EA /* CoreVideo.framework */; };
|
||||
FB862E6E20548D6C00C04986 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB371F1792730053B6EA /* CoreAudio.framework */; };
|
||||
FB862E6F20548D6C00C04986 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB351F1792690053B6EA /* CoreMedia.framework */; };
|
||||
FB862E7020548D6C00C04986 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB331F17925F0053B6EA /* CoreGraphics.framework */; };
|
||||
FB862E7120548D6C00C04986 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB311F1792570053B6EA /* AVFoundation.framework */; };
|
||||
FB862E7220548D6C00C04986 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||
FB862E7320548D6C00C04986 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
||||
FB862E7520548D6C00C04986 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
|
||||
FB862E7620548D6C00C04986 /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; };
|
||||
FB862E7720548D6C00C04986 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
FB862E7820548D6C00C04986 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
FB862E7920548D6C00C04986 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
FB862E7A20548D6C00C04986 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
FB862E7C20548D6C00C04986 /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
FB862E7D20548D6C00C04986 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
FB8CCC16204C8249002BBFDA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
|
||||
FB8CCC17204C8249002BBFDA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
|
||||
FB8CCC18204C8249002BBFDA /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
FB8CCC19204C8249002BBFDA /* ScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBA9BAFE1F176DD10053B6EA /* ScannerViewController.swift */; };
|
||||
FB8CCC1B204C8249002BBFDA /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB601F179D270053B6EA /* libiconv.tbd */; };
|
||||
FB8CCC1C204C8249002BBFDA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB3B1F1792A90053B6EA /* QuartzCore.framework */; };
|
||||
FB8CCC1D204C8249002BBFDA /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB391F17927C0053B6EA /* CoreVideo.framework */; };
|
||||
FB8CCC1E204C8249002BBFDA /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB371F1792730053B6EA /* CoreAudio.framework */; };
|
||||
FB8CCC1F204C8249002BBFDA /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB351F1792690053B6EA /* CoreMedia.framework */; };
|
||||
FB8CCC20204C8249002BBFDA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB331F17925F0053B6EA /* CoreGraphics.framework */; };
|
||||
FB8CCC21204C8249002BBFDA /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB311F1792570053B6EA /* AVFoundation.framework */; };
|
||||
FB8CCC22204C8249002BBFDA /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||
FB8CCC23204C8249002BBFDA /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
||||
FB8CCC27204C8249002BBFDA /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
|
||||
FB8CCC28204C8249002BBFDA /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; };
|
||||
FB8CCC29204C8249002BBFDA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
FB8CCC2A204C8249002BBFDA /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
FB8CCC2B204C8249002BBFDA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
FB8CCC2C204C8249002BBFDA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
FB8CCC2E204C8249002BBFDA /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
FB8CCC2F204C8249002BBFDA /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -55,6 +98,50 @@
|
||||
name = "Embed App Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB862E7B20548D6C00C04986 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
FB862E7C20548D6C00C04986 /* App.framework in Embed Frameworks */,
|
||||
FB862E7D20548D6C00C04986 /* Flutter.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB862E7F20548D6C00C04986 /* Embed App Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
);
|
||||
name = "Embed App Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB8CCC2D204C8249002BBFDA /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
FB8CCC2E204C8249002BBFDA /* App.framework in Embed Frameworks */,
|
||||
FB8CCC2F204C8249002BBFDA /* Flutter.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB8CCC33204C8249002BBFDA /* Embed App Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
);
|
||||
name = "Embed App Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -89,6 +176,10 @@
|
||||
BBA9BB391F17927C0053B6EA /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
|
||||
BBA9BB3B1F1792A90053B6EA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
BBA9BB601F179D270053B6EA /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
|
||||
FB862E8320548D6C00C04986 /* Dinect-Crypto.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Dinect-Crypto.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FB862E8420548D6C00C04986 /* Debug-Dinect-INT copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Debug-Dinect-INT copy-Info.plist"; path = "/Users/kifio/Desktop/FlutterProjects/checker/ios/Debug-Dinect-INT copy-Info.plist"; sourceTree = "<absolute>"; };
|
||||
FB8CCC37204C824A002BBFDA /* Dinect-INT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Dinect-INT.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FB8CCC38204C824A002BBFDA /* Runner copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Runner copy-Info.plist"; path = "/Users/kifio/Desktop/FlutterProjects/checker/ios/Runner copy-Info.plist"; sourceTree = "<absolute>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -107,6 +198,39 @@
|
||||
ACE861381F9F745B006FEF38 /* App.framework in Frameworks */,
|
||||
ACE8613A1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */,
|
||||
ACE8613B1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */,
|
||||
0A215136DF169E20663D3326 /* libPods-Runner.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB862E6A20548D6C00C04986 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FB862E6B20548D6C00C04986 /* libiconv.tbd in Frameworks */,
|
||||
FB862E6C20548D6C00C04986 /* QuartzCore.framework in Frameworks */,
|
||||
FB862E6D20548D6C00C04986 /* CoreVideo.framework in Frameworks */,
|
||||
FB862E6E20548D6C00C04986 /* CoreAudio.framework in Frameworks */,
|
||||
FB862E6F20548D6C00C04986 /* CoreMedia.framework in Frameworks */,
|
||||
FB862E7020548D6C00C04986 /* CoreGraphics.framework in Frameworks */,
|
||||
FB862E7120548D6C00C04986 /* AVFoundation.framework in Frameworks */,
|
||||
FB862E7220548D6C00C04986 /* Flutter.framework in Frameworks */,
|
||||
FB862E7320548D6C00C04986 /* App.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB8CCC1A204C8249002BBFDA /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FB8CCC1B204C8249002BBFDA /* libiconv.tbd in Frameworks */,
|
||||
FB8CCC1C204C8249002BBFDA /* QuartzCore.framework in Frameworks */,
|
||||
FB8CCC1D204C8249002BBFDA /* CoreVideo.framework in Frameworks */,
|
||||
FB8CCC1E204C8249002BBFDA /* CoreAudio.framework in Frameworks */,
|
||||
FB8CCC1F204C8249002BBFDA /* CoreMedia.framework in Frameworks */,
|
||||
FB8CCC20204C8249002BBFDA /* CoreGraphics.framework in Frameworks */,
|
||||
FB8CCC21204C8249002BBFDA /* AVFoundation.framework in Frameworks */,
|
||||
FB8CCC22204C8249002BBFDA /* Flutter.framework in Frameworks */,
|
||||
FB8CCC23204C8249002BBFDA /* App.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -143,6 +267,8 @@
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
BBA9BB001F1786510053B6EA /* Frameworks */,
|
||||
578B8FA7D56ACA2E56C02128 /* Pods */,
|
||||
FB8CCC38204C824A002BBFDA /* Runner copy-Info.plist */,
|
||||
FB862E8420548D6C00C04986 /* Debug-Dinect-INT copy-Info.plist */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -150,6 +276,8 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
ACE861531F9F745B006FEF38 /* Runner.app */,
|
||||
FB8CCC37204C824A002BBFDA /* Dinect-INT.app */,
|
||||
FB862E8320548D6C00C04986 /* Dinect-Crypto.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -225,6 +353,48 @@
|
||||
productReference = ACE861531F9F745B006FEF38 /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FB862E6320548D6C00C04986 /* Dinect-Crypto */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FB862E8020548D6C00C04986 /* Build configuration list for PBXNativeTarget "Dinect-Crypto" */;
|
||||
buildPhases = (
|
||||
FB862E6420548D6C00C04986 /* Run Script */,
|
||||
FB862E6520548D6C00C04986 /* Sources */,
|
||||
FB862E6A20548D6C00C04986 /* Frameworks */,
|
||||
FB862E7420548D6C00C04986 /* Resources */,
|
||||
FB862E7B20548D6C00C04986 /* Embed Frameworks */,
|
||||
FB862E7E20548D6C00C04986 /* Thin Binary */,
|
||||
FB862E7F20548D6C00C04986 /* Embed App Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "Dinect-Crypto";
|
||||
productName = Runner;
|
||||
productReference = FB862E8320548D6C00C04986 /* Dinect-Crypto.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FB8CCC12204C8249002BBFDA /* Dinect-INT */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FB8CCC34204C8249002BBFDA /* Build configuration list for PBXNativeTarget "Dinect-INT" */;
|
||||
buildPhases = (
|
||||
FB8CCC14204C8249002BBFDA /* Run Script */,
|
||||
FB8CCC15204C8249002BBFDA /* Sources */,
|
||||
FB8CCC1A204C8249002BBFDA /* Frameworks */,
|
||||
FB8CCC26204C8249002BBFDA /* Resources */,
|
||||
FB8CCC2D204C8249002BBFDA /* Embed Frameworks */,
|
||||
FB8CCC30204C8249002BBFDA /* Thin Binary */,
|
||||
FB8CCC33204C8249002BBFDA /* Embed App Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "Dinect-INT";
|
||||
productName = Runner;
|
||||
productReference = FB8CCC37204C824A002BBFDA /* Dinect-INT.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
@@ -244,6 +414,13 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
FB862E6320548D6C00C04986 = {
|
||||
DevelopmentTeam = 926V94K5Q8;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
FB8CCC12204C8249002BBFDA = {
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
@@ -260,6 +437,8 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
ACE861271F9F745B006FEF38 /* Runner */,
|
||||
FB8CCC12204C8249002BBFDA /* Dinect-INT */,
|
||||
FB862E6320548D6C00C04986 /* Dinect-Crypto */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -278,6 +457,32 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB862E7420548D6C00C04986 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FB862E7520548D6C00C04986 /* flutter_assets in Resources */,
|
||||
FB862E7620548D6C00C04986 /* app.flx in Resources */,
|
||||
FB862E7720548D6C00C04986 /* LaunchScreen.storyboard in Resources */,
|
||||
FB862E7820548D6C00C04986 /* AppFrameworkInfo.plist in Resources */,
|
||||
FB862E7920548D6C00C04986 /* Assets.xcassets in Resources */,
|
||||
FB862E7A20548D6C00C04986 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB8CCC26204C8249002BBFDA /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FB8CCC27204C8249002BBFDA /* flutter_assets in Resources */,
|
||||
FB8CCC28204C8249002BBFDA /* app.flx in Resources */,
|
||||
FB8CCC29204C8249002BBFDA /* LaunchScreen.storyboard in Resources */,
|
||||
FB8CCC2A204C8249002BBFDA /* AppFrameworkInfo.plist in Resources */,
|
||||
FB8CCC2B204C8249002BBFDA /* Assets.xcassets in Resources */,
|
||||
FB8CCC2C204C8249002BBFDA /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
@@ -334,7 +539,7 @@
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||
"${PODS_ROOT}/../../../flutter/bin/cache/artifacts/engine/ios-release/Flutter.framework",
|
||||
"${PODS_ROOT}/../../../../../flutter/bin/cache/artifacts/engine/ios/Flutter.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
@@ -360,6 +565,62 @@
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FB862E6420548D6C00C04986 /* 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";
|
||||
};
|
||||
FB862E7E20548D6C00C04986 /* 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\" thin";
|
||||
};
|
||||
FB8CCC14204C8249002BBFDA /* 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";
|
||||
};
|
||||
FB8CCC30204C8249002BBFDA /* 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\" thin";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -374,6 +635,28 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB862E6520548D6C00C04986 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FB862E6620548D6C00C04986 /* AppDelegate.m in Sources */,
|
||||
FB862E6720548D6C00C04986 /* main.m in Sources */,
|
||||
FB862E6820548D6C00C04986 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
FB862E6920548D6C00C04986 /* ScannerViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FB8CCC15204C8249002BBFDA /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FB8CCC16204C8249002BBFDA /* AppDelegate.m in Sources */,
|
||||
FB8CCC17204C8249002BBFDA /* main.m in Sources */,
|
||||
FB8CCC18204C8249002BBFDA /* GeneratedPluginRegistrant.m in Sources */,
|
||||
FB8CCC19204C8249002BBFDA /* ScannerViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
@@ -572,6 +855,152 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
FB862E8120548D6C00C04986 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = crypto;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 926V94K5Q8;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = "Debug-Dinect-INT copy-Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.dinect.checker.crypto;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OBJC_INTERFACE_HEADER_NAME = "Autobonus-Swift.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
FB862E8220548D6C00C04986 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = crypto;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 926V94K5Q8;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = "Debug-Dinect-INT copy-Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.dinect.checker.crypto;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OBJC_INTERFACE_HEADER_NAME = "Autobonus-Swift.h";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VALID_ARCHS = "arm64 arm7 armv7s";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
FB8CCC35204C8249002BBFDA /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Checker-INT";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = "Runner copy-Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.dinect.develop-iOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OBJC_INTERFACE_HEADER_NAME = "Autobonus-Swift.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
FB8CCC36204C8249002BBFDA /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Checker-INT";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = "Runner copy-Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.dinect.develop-iOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OBJC_INTERFACE_HEADER_NAME = "Autobonus-Swift.h";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VALID_ARCHS = "arm64 arm7 armv7s";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@@ -593,6 +1022,24 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
FB862E8020548D6C00C04986 /* Build configuration list for PBXNativeTarget "Dinect-Crypto" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FB862E8120548D6C00C04986 /* Debug */,
|
||||
FB862E8220548D6C00C04986 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
FB8CCC34204C8249002BBFDA /* Build configuration list for PBXNativeTarget "Dinect-INT" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FB8CCC35204C8249002BBFDA /* Debug */,
|
||||
FB8CCC36204C8249002BBFDA /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0920"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
|
||||
BuildableName = "Dinect-INT.app"
|
||||
BlueprintName = "Dinect-INT"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
|
||||
BuildableName = "Dinect-INT.app"
|
||||
BlueprintName = "Dinect-INT"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
|
||||
BuildableName = "Dinect-INT.app"
|
||||
BlueprintName = "Dinect-INT"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
|
||||
BuildableName = "Dinect-INT.app"
|
||||
BlueprintName = "Dinect-INT"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0920"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB862E6320548D6C00C04986"
|
||||
BuildableName = "Dinect-Crypto.app"
|
||||
BlueprintName = "Dinect-Crypto"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB862E6320548D6C00C04986"
|
||||
BuildableName = "Dinect-Crypto.app"
|
||||
BlueprintName = "Dinect-Crypto"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB862E6320548D6C00C04986"
|
||||
BuildableName = "Dinect-Crypto.app"
|
||||
BlueprintName = "Dinect-Crypto"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FB862E6320548D6C00C04986"
|
||||
BuildableName = "Dinect-Crypto.app"
|
||||
BlueprintName = "Dinect-Crypto"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>Dinect INT.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Dinect-Crypto.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>8</integer>
|
||||
</dict>
|
||||
<key>Runner.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>FB862E6320548D6C00C04986</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>FB8CCC12204C8249002BBFDA</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
@@ -32,13 +32,13 @@
|
||||
},
|
||||
@"com.dinect.develop-iOS" : @{
|
||||
@"locale" : @"ru",
|
||||
@"flavor" : @"autobonus",
|
||||
@"flavor" : @"dinect",
|
||||
@"currency" : @643,
|
||||
@"supportPhone" : @"support@dinect.com",
|
||||
@"supportUrl" : @"http://yandex.ru",
|
||||
@"endPoint" : @"https://pos-api-int.dinect.com/20130701/",
|
||||
@"appToken" : @"9fec83cdca38c357e6b65dbb17514cdd36bf2a08",
|
||||
@"appTitle" : @"Autobonus (develop)",
|
||||
@"appTitle" : @"Dinect (INT)",
|
||||
@"showBonus" : @YES,
|
||||
},
|
||||
@"com.dinect.checker.autoclub.app" : @{
|
||||
@@ -74,24 +74,29 @@
|
||||
@"appTitle" : @"PIP",
|
||||
@"showBonus" : @YES,
|
||||
},
|
||||
|
||||
@"com.dinect.checker.crypto" : @{
|
||||
@"locale" : @"ru",
|
||||
@"flavor" : @"crypto",
|
||||
@"currency" : @643,
|
||||
@"supportPhone" : @"8-800-77-55-032",
|
||||
@"supportUrl" : @"http://www.dinect.com",
|
||||
@"endPoint" : @"https://pos-api-int.dinect.com/20130701/",
|
||||
@"appToken" : @"9fec83cdca38c357e6b65dbb17514cdd36bf2a08",
|
||||
@"appTitle" : @"Dinect Crypto",
|
||||
@"showBonus" : @NO,
|
||||
},
|
||||
};
|
||||
|
||||
NSDictionary *buildSettings = settings[bundleIdentifier];
|
||||
|
||||
NSLog(@"%@", bundleIdentifier);
|
||||
|
||||
if (!buildSettings) {
|
||||
NSLog(@"Settings for this bunndle id not defined (%@)", bundleIdentifier);
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
[platformChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
|
||||
NSLog(@"%@", call.method);
|
||||
|
||||
NSLog(@"%@", buildSettings[@"supportPhone"]);
|
||||
|
||||
if ([@"getLocale" isEqualToString:call.method]) {
|
||||
result(buildSettings[@"locale"]);
|
||||
} else if ([@"getFlavor" isEqualToString:call.method]) {
|
||||
@@ -116,6 +121,8 @@
|
||||
result(buildSettings[@"appTitle"]);
|
||||
} else if ([@"showBonus" isEqualToString:call.method]) {
|
||||
result(buildSettings[@"showBonus"]);
|
||||
} else if ([@"getVersionName" isEqualToString:call.method]) {
|
||||
result([[NSBundle mainBundle] objectForInfoDictionaryKey: @"CFBundleShortVersionString"]);
|
||||
} else {
|
||||
result(FlutterMethodNotImplemented);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"author" : "Iconizer",
|
||||
"version" : "1.0",
|
||||
"images" : [
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"filename" : "ios-marketing.png",
|
||||
"expected-size" : "1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "iphone-appicon@3x.png",
|
||||
"expected-size" : "180",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "iphone-spotlight@2x.png",
|
||||
"expected-size" : "80",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "iphone-spotlight@3x.png",
|
||||
"expected-size" : "120",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "iphone-appicon@2x.png",
|
||||
"expected-size" : "120",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"filename" : "iphone-oldAppicon@1x.png",
|
||||
"expected-size" : "57",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "iphone-settings@2x.png",
|
||||
"expected-size" : "58",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "iphone-settings@1x.png",
|
||||
"expected-size" : "29",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "iphone-settings@3x.png",
|
||||
"expected-size" : "87",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"filename" : "iphone-oldAppicon@2x.png",
|
||||
"expected-size" : "114",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "iphone-notification@2x.png",
|
||||
"expected-size" : "40",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "iphone-notification@3x.png",
|
||||
"expected-size" : "60",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
90
ios/Runner/Assets.xcassets/crypto.appiconset/Contents.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"author" : "Iconizer",
|
||||
"version" : "1.0",
|
||||
"images" : [
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"filename" : "ios-marketing.png",
|
||||
"expected-size" : "1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "iphone-appicon@3x.png",
|
||||
"expected-size" : "180",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "iphone-spotlight@2x.png",
|
||||
"expected-size" : "80",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"filename" : "iphone-spotlight@3x.png",
|
||||
"expected-size" : "120",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"filename" : "iphone-appicon@2x.png",
|
||||
"expected-size" : "120",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"filename" : "iphone-oldAppicon@1x.png",
|
||||
"expected-size" : "57",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "iphone-settings@2x.png",
|
||||
"expected-size" : "58",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "iphone-settings@1x.png",
|
||||
"expected-size" : "29",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"filename" : "iphone-settings@3x.png",
|
||||
"expected-size" : "87",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"filename" : "iphone-oldAppicon@2x.png",
|
||||
"expected-size" : "114",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "iphone-notification@2x.png",
|
||||
"expected-size" : "40",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"filename" : "iphone-notification@3x.png",
|
||||
"expected-size" : "60",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
ios/Runner/Assets.xcassets/crypto.appiconset/ios-marketing.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
@@ -73,6 +73,13 @@ import Flutter
|
||||
}
|
||||
}
|
||||
|
||||
func setButtonState() {
|
||||
switch self.buttonState {
|
||||
case .card: self.buttonState = .phone
|
||||
case .phone: self.buttonState = .card
|
||||
}
|
||||
}
|
||||
|
||||
let capture: ZXCapture = ZXCapture()
|
||||
|
||||
override func viewDidLoad() {
|
||||
@@ -97,7 +104,7 @@ import Flutter
|
||||
|
||||
settingButton.setImage(self.buttonState.icon, for: .normal)
|
||||
textField.placeholder = self.getInputHint()
|
||||
|
||||
textField.text = "79087654321"
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
@@ -121,35 +128,29 @@ import Flutter
|
||||
}
|
||||
|
||||
func buttonTouch(){
|
||||
|
||||
switch self.buttonState {
|
||||
case .card: self.buttonState = .phone
|
||||
case .phone: self.buttonState = .card
|
||||
}
|
||||
setButtonState()
|
||||
settingButton.setImage(self.buttonState.icon, for: .normal)
|
||||
textField.placeholder = self.getInputHint()
|
||||
}
|
||||
|
||||
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
||||
|
||||
print("User from manual input: \(textField.text)")
|
||||
sendResult(textField.text!)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func sendResult(_ str: String) {
|
||||
platformChannel?.invokeMethod("findUser", arguments: [str, buttonState.searchType], result: { (result: Any?) in
|
||||
if result is FlutterError {
|
||||
print("Result is nil (ios code)");
|
||||
self.showErrorAlert(str)
|
||||
} else {
|
||||
|
||||
print("Result is not nil (ios code)");
|
||||
self.dismiss(animated: true) {
|
||||
self.platformChannel?.invokeMethod("purchase", arguments: [result, str])
|
||||
}
|
||||
}
|
||||
print("result: \(result.debugDescription )")
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func showErrorAlert(_ str: String) {
|
||||
@@ -296,8 +297,7 @@ import Flutter
|
||||
location = "\(location) (\(transformedPoint.x), \(transformedPoint.y))"
|
||||
points.append(windowPointValue)
|
||||
}
|
||||
// We got a result. Display information about the result onscreen.
|
||||
let formatString: String = barcodeFormat(toString: result.barcodeFormat)
|
||||
print("User from scanner: \(result.text)")
|
||||
sendResult(result.text)
|
||||
print(result.text)
|
||||
self.capture.stop()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/resources.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -7,6 +9,8 @@ import 'package:checker/screens/settings.dart';
|
||||
import 'package:checker/screens/faq.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
import 'package:checker/db.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
|
||||
@@ -25,8 +29,10 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
/// Введенное пользователем значение.
|
||||
String merchantID = '';
|
||||
|
||||
BaseState(this.helper, this.app);
|
||||
|
||||
Widget getMainWidget() {
|
||||
return app == null ? getBackground() : new Scaffold(appBar: getAppBar(),
|
||||
return new Scaffold(appBar: getAppBar(),
|
||||
body: new Stack(children: <Widget>[
|
||||
getScreenContent(),
|
||||
new Center(child: loading ? new CircularProgressIndicator() : null)
|
||||
@@ -44,6 +50,8 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
/// Возвращает контейнер с всеми виджетами экрана.
|
||||
Widget getScreenContent();
|
||||
|
||||
bool isAutomaticallyImplyLeading();
|
||||
|
||||
/// Возвращает заголовок для AppBar
|
||||
String getTitle() {
|
||||
return null;
|
||||
@@ -53,6 +61,7 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
return new AppBar(title: new Container(
|
||||
margin: new EdgeInsets.only(left: 16.0),
|
||||
child: new Text(getTitle(), style: new TextStyle(fontSize: 18.0))),
|
||||
automaticallyImplyLeading: isAutomaticallyImplyLeading(),
|
||||
backgroundColor: Resources.getPrimaryColor(app), actions: getMenuButtons());
|
||||
}
|
||||
|
||||
@@ -89,11 +98,21 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
void onOptionsItemClick(int index) {
|
||||
switch (index) {
|
||||
case 0: {
|
||||
pushRoute(context, new SettingsScreen(helper, app, false));
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
var route = new MaterialPageRoute<String>(builder: (BuildContext context) => new SettingsScreen(helper, app, false), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((token) {
|
||||
if (token != null) {
|
||||
Navigator.of(context).pop(token);
|
||||
}
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
pushRoute(context, new FAQScreen(helper, app, false));
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
var route = new MaterialPageRoute<String>(builder: (BuildContext context) => new FAQScreen(helper, app), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
@@ -275,8 +294,6 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
return new Container(height: containerHeight, child: new Image.asset(Resources.getLogo(app), width: imageWidth));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Возвращает текстовое поле, с однострочным пояснением над ним.
|
||||
Widget getValueWithDescription(String title, String value) {
|
||||
return new Container(padding: new EdgeInsets.only(left: verticalMargin, right: verticalMargin, top: 18.0),
|
||||
@@ -301,3 +318,84 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
||||
return new Container(margin: margin, height: buttonHeight, child: new Row(children: <Widget>[new Expanded(child: widget)]));
|
||||
}
|
||||
}
|
||||
|
||||
class EnsureVisibleWhenFocused extends StatefulWidget {
|
||||
const EnsureVisibleWhenFocused({
|
||||
Key key,
|
||||
@required this.child,
|
||||
@required this.focusNode,
|
||||
this.curve: Curves.ease,
|
||||
this.duration: const Duration(milliseconds: 100),
|
||||
}) : super(key: key);
|
||||
|
||||
/// The node we will monitor to determine if the child is focused
|
||||
final FocusNode focusNode;
|
||||
|
||||
/// The child widget that we are wrapping
|
||||
final Widget child;
|
||||
|
||||
/// The curve we will use to scroll ourselves into view.
|
||||
///
|
||||
/// Defaults to Curves.ease.
|
||||
final Curve curve;
|
||||
|
||||
/// The duration we will use to scroll ourselves into view
|
||||
///
|
||||
/// Defaults to 100 milliseconds.
|
||||
final Duration duration;
|
||||
|
||||
EnsureVisibleWhenFocusedState createState() => new EnsureVisibleWhenFocusedState();
|
||||
}
|
||||
|
||||
class EnsureVisibleWhenFocusedState extends State<EnsureVisibleWhenFocused> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.focusNode.addListener(_ensureVisible);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
widget.focusNode.removeListener(_ensureVisible);
|
||||
}
|
||||
|
||||
Future<Null> _ensureVisible() async {
|
||||
// Wait for the keyboard to come into view
|
||||
// TODO: position doesn't seem to notify listeners when metrics change,
|
||||
// perhaps a NotificationListener around the scrollable could avoid
|
||||
// the need insert a delay here.
|
||||
await new Future.delayed(const Duration(milliseconds: 100));
|
||||
|
||||
if (!widget.focusNode.hasFocus)
|
||||
return;
|
||||
|
||||
final RenderObject object = context.findRenderObject();
|
||||
final RenderAbstractViewport viewport = RenderAbstractViewport.of(object);
|
||||
assert(viewport != null);
|
||||
|
||||
ScrollableState scrollableState = Scrollable.of(context);
|
||||
assert(scrollableState != null);
|
||||
|
||||
ScrollPosition position = scrollableState.position;
|
||||
double alignment;
|
||||
if (position.pixels > viewport.getOffsetToReveal(object, 0.0)) {
|
||||
// Move down to the top of the viewport
|
||||
alignment = 0.0;
|
||||
} else if (position.pixels < viewport.getOffsetToReveal(object, 1.0)) {
|
||||
// Move up to the bottom of the viewport
|
||||
alignment = 1.0;
|
||||
} else {
|
||||
// No scrolling is necessary to reveal the child
|
||||
return;
|
||||
}
|
||||
position.ensureVisible(
|
||||
object,
|
||||
alignment: alignment,
|
||||
duration: widget.duration,
|
||||
curve: widget.curve,
|
||||
);
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) => widget.child;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,9 @@ import 'package:checker/db.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
abstract class SettingsBaseState<T extends StatefulWidget>
|
||||
extends BaseState<T> {
|
||||
abstract class SettingsBaseState<T extends StatefulWidget> extends BaseState<T> {
|
||||
|
||||
SettingsBaseState(SqliteHelper helper, String app) {
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
}
|
||||
SettingsBaseState(SqliteHelper helper, String app) : super(helper, app);
|
||||
|
||||
int selectedItem;
|
||||
|
||||
|
||||
146
lib/common.dart
@@ -1,31 +1,18 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/screens/faq.dart';
|
||||
import 'package:checker/screens/purchase.dart';
|
||||
import 'package:checker/screens/registration.dart';
|
||||
import 'package:checker/screens/settings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
import 'db.dart';
|
||||
import 'dart:convert';
|
||||
import 'network.dart';
|
||||
import 'resources.dart';
|
||||
import 'strings.dart';
|
||||
|
||||
// Канал для взаимодействия с кодом платформы.
|
||||
const platform = const MethodChannel('com.dinect.checker/instance_id');
|
||||
|
||||
// Метод обеспечивает замену текущего объекта route новым.
|
||||
pushRouteReplacement(BuildContext context, Widget widget) {
|
||||
var route =
|
||||
new MaterialPageRoute<Null>(builder: (BuildContext context) => widget);
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
Navigator.of(context).pushReplacement(route);
|
||||
});
|
||||
}
|
||||
|
||||
// TODO: Избавиться от следующих двух методов
|
||||
pushRoute(BuildContext context, Widget widget) {
|
||||
var route =
|
||||
new MaterialPageRoute<Null>(builder: (BuildContext context) => widget, fullscreenDialog: true);
|
||||
@@ -35,137 +22,6 @@ pushRoute(BuildContext context, Widget widget) {
|
||||
});
|
||||
}
|
||||
|
||||
// Добавление route, с возможностью вернуться к предыдущему экрану.
|
||||
faq(SqliteHelper helper, String app, BuildContext context,
|
||||
bool returnToScanner) {
|
||||
pushRoute(context, new FAQScreen(helper, app, returnToScanner));
|
||||
}
|
||||
|
||||
// В методе отправляется запрос на удаление токена кассы, очищаются SharedPreferences приложения.
|
||||
logout(BuildContext context, SqliteHelper helper) async {
|
||||
String token = await helper.getToken();
|
||||
VoidCallback positiveCallback = () {
|
||||
if (token != null) {
|
||||
getDeleteTokenRequest(token).then((response) {
|
||||
helper.clear().then((result) {
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
while (Navigator.of(context).canPop()) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, flavor));
|
||||
});
|
||||
});
|
||||
}).catchError((error) {
|
||||
print(error.toString());
|
||||
});
|
||||
} else {
|
||||
while (Navigator.of(context).canPop()) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
showYesNoDialog(context, StringsLocalization.confirmation(),
|
||||
StringsLocalization.askChangeStore(), positiveCallback);
|
||||
}
|
||||
|
||||
/// Запуск спецефичной для каждой платформы части приложения - сканера.
|
||||
/// Может производиться с нескольких экранов (splash, finish_registration).
|
||||
startScanner(BuildContext context, String app, SqliteHelper helper) async {
|
||||
String token = await helper.getToken();
|
||||
// Канал ловит вызовы методов из "нативной" части приложения.
|
||||
// Могут быть вызваны либо exit либо faq, либо purchase.
|
||||
if (token != null) {
|
||||
platform.setMethodCallHandler((MethodCall call) async {
|
||||
if (call.method == 'findUser') {
|
||||
var userResponse;
|
||||
String cardPhone = call.arguments[0];
|
||||
|
||||
try {
|
||||
switch (call.arguments[1]) {
|
||||
case 'card':
|
||||
userResponse = await getUserByCard(cardPhone, token);
|
||||
break;
|
||||
case 'phone':
|
||||
userResponse = await getUserByPhone(cardPhone, token);
|
||||
break;
|
||||
}
|
||||
} catch (error) {
|
||||
print(error.toString());
|
||||
}
|
||||
|
||||
List<Map> users;
|
||||
|
||||
|
||||
try {
|
||||
users = JSON.decode(userResponse.body);
|
||||
} catch (error) {
|
||||
print(error);
|
||||
}
|
||||
|
||||
if (users.length > 0) {
|
||||
return users[0];
|
||||
} else {
|
||||
startScanner(context, app, helper);
|
||||
throw new FlutterError("Users not found");
|
||||
}
|
||||
} else if (call.method == 'faq') {
|
||||
faq(helper, app, context, true);
|
||||
} else if (call.method == 'settings') {
|
||||
pushRoute(context, new SettingsScreen(helper, app, true));
|
||||
} else {
|
||||
String userString;
|
||||
|
||||
if (call.arguments[0] is String) {
|
||||
userString = call.arguments[0];
|
||||
} else {
|
||||
userString = JSON.encode(call.arguments[0]);
|
||||
}
|
||||
|
||||
print(userString);
|
||||
|
||||
String card = call.arguments[1];
|
||||
print('$userString, $card');
|
||||
pushRouteReplacement(context, new PurchaseScreen(helper, app, userString, card));
|
||||
}
|
||||
});
|
||||
|
||||
Map<String, String> args = StringsLocalization.strings;
|
||||
args.addAll({
|
||||
'token': token,
|
||||
'url': await platform.invokeMethod('getEndpoint'),
|
||||
'appToken': await platform.invokeMethod('getAppToken'),
|
||||
'localeCode': StringsLocalization.localeCode,
|
||||
'color': Resources
|
||||
.getPrimaryColor(app)
|
||||
.value
|
||||
.toString()
|
||||
});
|
||||
|
||||
platform.invokeMethod('startScanner', args);
|
||||
}
|
||||
}
|
||||
|
||||
// Запуск диалога с двумя кнопками
|
||||
showYesNoDialog(BuildContext context, String title, String content,
|
||||
VoidCallback positiveCallback) {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: new AlertDialog(
|
||||
title: new Text(title),
|
||||
content: new Text(content),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
child: new Text(StringsLocalization.no()),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
new FlatButton(
|
||||
child: new Text(StringsLocalization.yes()),
|
||||
onPressed: positiveCallback)
|
||||
]));
|
||||
}
|
||||
|
||||
getCurrencyTitle(int code) {
|
||||
switch (code) {
|
||||
case 643:
|
||||
|
||||
17
lib/db.dart
@@ -64,28 +64,35 @@ class SqliteHelper {
|
||||
}
|
||||
|
||||
/// Создается запись в таблице, содержащая данные, которые не зависят от сессии.
|
||||
Future createAppInfo(int currency) async {
|
||||
Future createAppInfo(int currency, String locale) async {
|
||||
List<Map> appInfo = await db.query(tableSettings);
|
||||
if (appInfo.length > 0) {
|
||||
return null;
|
||||
} else {
|
||||
return db.insert(tableSettings, {
|
||||
columnCurrency: currency
|
||||
columnCurrency: currency,
|
||||
columnLocale: locale
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Future<Map> getSettings(bool withSession) async {
|
||||
|
||||
Map results = new Map();
|
||||
Map settings = await selectAll(tableSettings);
|
||||
|
||||
if (settings != null && settings.isNotEmpty) {
|
||||
results.addAll(settings);
|
||||
}
|
||||
|
||||
if (withSession) {
|
||||
Map session = await selectAll(tableSession);
|
||||
if (settings != null && session != null) {
|
||||
settings.addAll(session);
|
||||
if (session != null && session.isNotEmpty) {
|
||||
results.addAll(session);
|
||||
}
|
||||
}
|
||||
|
||||
return settings;
|
||||
return results;
|
||||
}
|
||||
|
||||
Future<String> getToken() async {
|
||||
|
||||
@@ -1,23 +1,88 @@
|
||||
import 'package:checker/db.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:checker/screens/splash.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
const platform = const MethodChannel('com.dinect.checker/instance_id');
|
||||
|
||||
void main() {
|
||||
main() {
|
||||
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
platform.invokeMethod('getAppTitle').then((title) {
|
||||
runApp(new Checker(appName: title));
|
||||
|
||||
String app = flavor; // dinect, autobonus
|
||||
String appName= title; // Dinect, Dinect (INT), Autobonus
|
||||
|
||||
SqliteHelper helper = new SqliteHelper();
|
||||
|
||||
helper.open().then((_) {
|
||||
helper.getLocale().then((locale) {
|
||||
if (locale == null) {
|
||||
initWithSystemValue(app, appName, locale, helper);
|
||||
} else {
|
||||
start(app, appName, locale, helper);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
class Checker extends StatelessWidget {
|
||||
Checker({this.appName});
|
||||
initWithSystemValue(String app, String name, String locale, SqliteHelper helper) {
|
||||
helper.getSettings(false).then((settings) {
|
||||
if (settings.isEmpty) {
|
||||
createSettingsTable(app, name, helper);
|
||||
} else {
|
||||
start(app, name, locale, helper);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
createSettingsTable(String app, String name, SqliteHelper helper) {
|
||||
platform.invokeMethod('getLocale').then((locale) {
|
||||
platform.invokeMethod('getCurrency').then((currency) {
|
||||
helper.createAppInfo(currency, locale).then((_) {
|
||||
start(app, name, locale, helper);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
start(String app, String name, String locale, SqliteHelper helper) {
|
||||
StringsLocalization.load(locale).then((_) {
|
||||
runApp(new Checker(app, name, helper));
|
||||
});
|
||||
}
|
||||
|
||||
class Checker extends StatefulWidget {
|
||||
|
||||
final SqliteHelper helper;
|
||||
final String app;
|
||||
final String appName;
|
||||
|
||||
@override Widget build (BuildContext context) {
|
||||
Checker(this.app, this.appName, this.helper);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => new CheckerState(
|
||||
this.app,
|
||||
this.appName,
|
||||
this.helper);
|
||||
}
|
||||
|
||||
class CheckerState extends State<Checker> {
|
||||
|
||||
SqliteHelper helper;
|
||||
String app;
|
||||
String appName;
|
||||
|
||||
CheckerState(this.app, this.appName, this.helper);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new MaterialApp(
|
||||
title: appName,
|
||||
home: new SplashScreen()
|
||||
home: new SplashScreen(helper, app)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class Resources {
|
||||
|
||||
static String getLogo(String app) {
|
||||
return app == null ? null : 'assets/${app}_logo.png';
|
||||
}
|
||||
static String getLogo(String app) => 'assets/${app}_logo.png';
|
||||
|
||||
static String getSplash(String app) {
|
||||
if (app == 'autobonus') {
|
||||
|
||||
@@ -17,6 +17,7 @@ class _CurrenciesState extends SettingsBaseState<CurrenciesScreen> {
|
||||
|
||||
_CurrenciesState(SqliteHelper helper, String app) : super(helper, app);
|
||||
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
@override
|
||||
List<String> getOptions() {
|
||||
|
||||
@@ -22,6 +22,8 @@ class EntryItem extends StatelessWidget {
|
||||
const EntryItem(this.entry);
|
||||
final Entry entry;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
Widget _buildTiles(BuildContext context, Entry root) {
|
||||
EdgeInsets margin = new EdgeInsets.only(left: 20.0, right: 20.0);
|
||||
TextStyle titleStyle = Theme.of(context).textTheme.button.copyWith(
|
||||
@@ -66,22 +68,14 @@ class EntryItem extends StatelessWidget {
|
||||
|
||||
class FAQScreen extends BaseScreen {
|
||||
|
||||
FAQScreen(SqliteHelper helper, String app,
|
||||
this.returnToScanner) : super(helper, app);
|
||||
FAQScreen(SqliteHelper helper, String app) : super(helper, app);
|
||||
|
||||
final bool returnToScanner;
|
||||
|
||||
@override State createState() => new FAQScreenState<FAQScreen>(returnToScanner, helper, app);
|
||||
@override State createState() => new FAQScreenState<FAQScreen>(helper, app);
|
||||
}
|
||||
|
||||
class FAQScreenState<T> extends BaseState<FAQScreen> {
|
||||
|
||||
FAQScreenState(this.returnToScanner, SqliteHelper helper, String app) {
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
bool returnToScanner;
|
||||
FAQScreenState(SqliteHelper helper, String app) : super(helper, app);
|
||||
|
||||
List<Entry> data;
|
||||
|
||||
@@ -93,16 +87,14 @@ class FAQScreenState<T> extends BaseState<FAQScreen> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
if (data == null) {
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
@override
|
||||
void initState() {
|
||||
initPhoneAndUrl().then((_) {
|
||||
setState(() {
|
||||
app = flavor;
|
||||
});
|
||||
});
|
||||
super.initState();
|
||||
});
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
return new Scaffold(appBar: getAppBar(), body: getScreenContent());
|
||||
}
|
||||
|
||||
@@ -129,18 +121,14 @@ class FAQScreenState<T> extends BaseState<FAQScreen> {
|
||||
if (data == null) {
|
||||
return getBackground();
|
||||
} else {
|
||||
return new WillPopScope(onWillPop: onWillPop, child: new ListView.builder(
|
||||
return new ListView.builder(
|
||||
itemBuilder: (BuildContext context, int index) =>
|
||||
new EntryItem(data[index]),
|
||||
itemCount: data.length));
|
||||
itemCount: data.length);
|
||||
}
|
||||
}
|
||||
|
||||
onWillPop() {
|
||||
if(returnToScanner) {
|
||||
return startScanner(context, app, helper);
|
||||
} else {
|
||||
@override bool isAutomaticallyImplyLeading() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/base/base_screen.dart';
|
||||
import 'package:checker/base/base_state.dart';
|
||||
@@ -18,14 +19,13 @@ class FinishRegistrationScreen extends BaseScreen {
|
||||
|
||||
class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
|
||||
RegistrationScreenState(SqliteHelper helper, String app) {
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
}
|
||||
RegistrationScreenState(SqliteHelper helper, String app) : super(helper, app);
|
||||
|
||||
bool _tokenActive = false;
|
||||
String _merchantID = '';
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
if (_merchantID == '') {
|
||||
helper.getMerchantID().then((result) {
|
||||
@@ -34,7 +34,13 @@ class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
});
|
||||
});
|
||||
}
|
||||
return getMainWidget();
|
||||
return new WillPopScope(onWillPop: () => onWillPop(), child: getMainWidget());
|
||||
}
|
||||
|
||||
onWillPop() {
|
||||
if (Theme.of(context).platform != TargetPlatform.iOS) {
|
||||
platform.invokeMethod('finish');
|
||||
}
|
||||
}
|
||||
|
||||
@override String getTitle() {
|
||||
@@ -59,26 +65,27 @@ class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
|
||||
|
||||
// Если токен активирован, то открывается экран со сканером,
|
||||
// Если нет, то отправляется запрос на проверку статуса токена.
|
||||
handleTap() async {
|
||||
handleTap() {
|
||||
print('tokenActive: $_tokenActive');
|
||||
if (_tokenActive) {
|
||||
Navigator.of(context).pop();
|
||||
startScanner(context, app, helper);
|
||||
} else {
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
String token = await helper.getToken();
|
||||
getCheckTokenStatusRequest(token).then((response) {
|
||||
Map parsedMap = JSON.decode(response.body);
|
||||
|
||||
// Обновить экран, заменить сообщение о необходимости активации токена, на сообщние о том, что токен активен.
|
||||
setState(() {
|
||||
_tokenActive = parsedMap['active'];
|
||||
helper.getToken().then((token) {
|
||||
Navigator.of(context).pop(token);
|
||||
});
|
||||
} else {
|
||||
platform.invokeMethod('isOnline').then((isOnline) {
|
||||
if (isOnline ) {
|
||||
helper.getToken().then((token) {
|
||||
getCheckTokenStatusRequest(token).then((response) {
|
||||
setState(() {
|
||||
_tokenActive = JSON.decode(response.body)['active'];
|
||||
});
|
||||
|
||||
}).catchError((error) {
|
||||
print(error.toString());
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ class LanguagesState extends SettingsBaseState<LanguagesScreen> {
|
||||
|
||||
List<String> languages = const ['ru', 'en', 'ua', 'es'];
|
||||
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
@override
|
||||
List<String> getOptions() {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'dart:convert';
|
||||
import 'dart:core';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/resources.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
@@ -33,30 +34,35 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
|
||||
TextEditingController bonusController = new TextEditingController();
|
||||
|
||||
PurchaseScreenState(SqliteHelper helper, String app, String userString, String card) {
|
||||
FocusNode _focusNodeSum = new FocusNode();
|
||||
FocusNode _focusNodeBonus = new FocusNode();
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
PurchaseScreenState(SqliteHelper helper, String app, String userString, String card) : super(helper, app) {
|
||||
this.user = JSON.decode(userString);
|
||||
this.card = card;
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
loading = true;
|
||||
requestAsyncData(user);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext ctx) {
|
||||
setState(() {
|
||||
requestAsyncData(user);
|
||||
});
|
||||
return new WillPopScope(onWillPop: onWillPop, child: getMainWidget());
|
||||
return getMainWidget();
|
||||
}
|
||||
|
||||
bool purchaseInProgress = false;
|
||||
Map user;
|
||||
String card = '';
|
||||
String flavor = '';
|
||||
String loyalityType = '';
|
||||
String loyalty = '';
|
||||
String bonus = '';
|
||||
List<Map> coupons = [];
|
||||
bool dataRequested = false;
|
||||
|
||||
@override
|
||||
Widget getScreenContent() {
|
||||
@@ -67,17 +73,19 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
));
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.card(), card));
|
||||
|
||||
if (app != 'crypto') {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.reward(), loyalty));
|
||||
}
|
||||
|
||||
if (bonus.length > 0) {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.bonus(), bonus));
|
||||
}
|
||||
|
||||
widgetList.add(getHintLabel());
|
||||
|
||||
widgetList.add(getInputField()); // Нельзя добавить еще одно поле таким же способом
|
||||
|
||||
if (this.flavor != 'autobonus') {
|
||||
if (app != 'autobonus') {
|
||||
|
||||
if (this.loyalityType == 'bonus') {
|
||||
widgetList.add(getBonusInputField());
|
||||
}
|
||||
@@ -109,6 +117,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
Resources.getPrimaryColor(app)
|
||||
)
|
||||
));
|
||||
|
||||
return new Column(children: <Widget>[
|
||||
new Expanded(
|
||||
child: new ListView(children: widgetList))
|
||||
@@ -116,7 +125,11 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
}
|
||||
|
||||
getBonusInputField() {
|
||||
TextField bonusTextField = new TextField(
|
||||
|
||||
var bonusTextField = new EnsureVisibleWhenFocused(
|
||||
focusNode: _focusNodeBonus,
|
||||
child: new TextField(
|
||||
focusNode: _focusNodeBonus,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: new InputDecoration.collapsed(
|
||||
hintText: StringsLocalization.bonusHint(),
|
||||
@@ -129,7 +142,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
});
|
||||
},
|
||||
textAlign: TextAlign.center,
|
||||
);
|
||||
));
|
||||
|
||||
return new Column(
|
||||
children: <Widget>[
|
||||
@@ -173,15 +186,13 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
height: buttonHeight,
|
||||
child: new FlatButton(
|
||||
child: new Text(title, style: new TextStyle(color: textColor)),
|
||||
onPressed: () => startScanner(context, app, helper)),
|
||||
onPressed: () => restartScanner()),
|
||||
decoration: new BoxDecoration(
|
||||
border: new Border.all(
|
||||
color: Resources.getButtonColor(app), width: 1.0),
|
||||
borderRadius: new BorderRadius.all(new Radius.circular(4.0))));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@override
|
||||
String getTitle() {
|
||||
return StringsLocalization.carryingPurchase();
|
||||
@@ -195,7 +206,10 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
@override
|
||||
getTextWidget() {
|
||||
// ?? TODO переделать, т.к. позволяет иметь только одно поле ввода на странице
|
||||
return new TextField(
|
||||
return new EnsureVisibleWhenFocused(
|
||||
focusNode: _focusNodeSum,
|
||||
child: new TextField(
|
||||
focusNode: _focusNodeSum,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: new InputDecoration.collapsed(
|
||||
hintText: getHintString(),
|
||||
@@ -208,14 +222,12 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
},
|
||||
textAlign: TextAlign.center,
|
||||
autofocus: true
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
requestAsyncData(Map user) async {
|
||||
bool showBonus = await platform.invokeMethod('showBonus');
|
||||
String flavor = await platform.invokeMethod('getFlavor');
|
||||
if (await platform.invokeMethod('isOnline') && !this.dataRequested) {
|
||||
this.dataRequested = true;
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
var response, couponResponse;
|
||||
print(user['coupons_url']);
|
||||
try {
|
||||
@@ -234,14 +246,12 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
coupons['results'].forEach((couponItem) {
|
||||
couponItem['isSet'] = false;
|
||||
});
|
||||
|
||||
setState(() {
|
||||
this.flavor = flavor;
|
||||
loading = false;
|
||||
this.coupons = coupons['results'];
|
||||
this.loyalityType = loyality['type'];
|
||||
setBonuses(loyality, showBonus);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +327,6 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: new AlertDialog(
|
||||
//title: new Text(StringsLocalization.()),
|
||||
content: new Text(errorText),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
@@ -332,6 +341,9 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
}
|
||||
|
||||
purchase(String sumTotal) async {
|
||||
setState(() {
|
||||
loading = true;
|
||||
});
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
if (!purchaseInProgress) {
|
||||
purchaseInProgress = true;
|
||||
@@ -352,7 +364,6 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
'curr_iso_code': currency.toString(),
|
||||
'commit': 'true',
|
||||
'sum_total': sumTotal,
|
||||
// 'coupons': []
|
||||
};
|
||||
|
||||
if (bonusController.text.length > 0) {
|
||||
@@ -375,6 +386,9 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
}
|
||||
|
||||
if (purchase.containsKey('errors')) {
|
||||
setState(() {
|
||||
loading = false;
|
||||
});
|
||||
List<String> errors = purchase['errors'];
|
||||
purchaseInProgress = false;
|
||||
apiErrorAlert(errors[0]);
|
||||
@@ -391,17 +405,20 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
|
||||
Map coupons = JSON.decode(couponsResponse.body);
|
||||
|
||||
pushRouteReplacement(
|
||||
context,
|
||||
new PurchaseSuccessScreen(
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
print('show purchase success!');
|
||||
var route = new MaterialPageRoute<String>(builder: (BuildContext context) => new PurchaseSuccessScreen(
|
||||
sumTotal,
|
||||
user['first_name'] == null ? '' : user['first_name'],
|
||||
helper,
|
||||
app,
|
||||
purchase,
|
||||
coupons['results']
|
||||
)
|
||||
);
|
||||
), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((token) {
|
||||
Navigator.of(context).pop(token);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -424,7 +441,9 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
print('bonus ' + this.bonus);
|
||||
}
|
||||
|
||||
onWillPop() {
|
||||
return startScanner(context, app, helper);
|
||||
restartScanner() {
|
||||
helper.getToken().then((token) {
|
||||
Navigator.of(context).pop(token);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,9 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
PurchaseSuccessScreenState(
|
||||
String sum, String username, SqliteHelper helper,
|
||||
String app, Map details, List<Map> coupons
|
||||
){
|
||||
) : super(helper, app) {
|
||||
this.sum = sum;
|
||||
this.username = username;
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
this.details = details;
|
||||
this.coupons = coupons;
|
||||
}
|
||||
@@ -41,8 +39,10 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
int bonusPlus = 0;
|
||||
int bonusMinus = 0;
|
||||
int currency;
|
||||
String token;
|
||||
bool showBonus;
|
||||
String flavor;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override String getTitle() {
|
||||
return StringsLocalization.carryingPurchase();
|
||||
@@ -52,18 +52,18 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
if (currency == null) {
|
||||
@override
|
||||
void initState() {
|
||||
helper.getCurrency().then((currency) {
|
||||
setState(() {
|
||||
helper.getToken().then((token) {
|
||||
this.currency = currency;
|
||||
this.token = token;
|
||||
});
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
if (this.flavor == null) {
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
setState(() {
|
||||
this.flavor = flavor;
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
|
||||
if (this.details['sum_bonus'] is String) {
|
||||
String regexString = r'(\d+) начислено, (\d+).*';
|
||||
@@ -79,9 +79,6 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
if (this.details['sum_bonus'] is int) {
|
||||
this.bonusPlus = this.details['sum_bonus'];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return getMainWidget();
|
||||
}
|
||||
@@ -99,13 +96,13 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.bonusMinus(), bonusMinus.toString()));
|
||||
}
|
||||
|
||||
if (this.flavor != 'autobonus') {
|
||||
if (app != 'autobonus') {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.discountRate(), '${details['discount']}%'));
|
||||
if (app != 'crypto') {
|
||||
widgetList.add(getValueWithDescription(StringsLocalization.discountSum(), '${details['sum_discount']}'));
|
||||
}
|
||||
|
||||
// widgetList.add( new Expanded(child: new Center()));
|
||||
if (this.coupons.length > 0) {
|
||||
}
|
||||
if (app != 'crypto' && this.coupons.length > 0) {
|
||||
widgetList.add(getItemTitle(StringsLocalization.couponsUsed()));
|
||||
this.coupons.forEach((couponItem) {
|
||||
widgetList.add(getItemToggle(
|
||||
@@ -131,7 +128,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
|
||||
getScanButton() {
|
||||
String title = StringsLocalization.scan();
|
||||
return buildRaisedButton(title, () => startScanner(context, app, helper));
|
||||
return buildRaisedButton(title, () => Navigator.of(context).pop(token));
|
||||
}
|
||||
|
||||
|
||||
@@ -141,8 +138,6 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
getSuccessMessage() {
|
||||
return new Row(
|
||||
children: <Widget>[
|
||||
@@ -159,7 +154,8 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
)
|
||||
)
|
||||
))
|
||||
]);
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
getMessageTitle() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/base/base_screen.dart';
|
||||
import 'package:checker/base/base_state.dart';
|
||||
@@ -20,14 +21,15 @@ class RegistrationScreen extends BaseScreen {
|
||||
}
|
||||
|
||||
class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
RegistrationScreenState(SqliteHelper helper, String app) {
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
RegistrationScreenState(SqliteHelper helper, String app) : super(helper, app);
|
||||
FocusNode _focusNode = new FocusNode();
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext ctx) {
|
||||
return getMainWidget();
|
||||
return new WillPopScope(onWillPop: () => onWillPop(), child: getMainWidget());
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -43,8 +45,7 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
/// Список виджетов, автоматически прокручиваемый вверх при открытии клавиатуры.
|
||||
@override
|
||||
Widget getScreenContent() {
|
||||
return new Container(
|
||||
child: new ListView(children: <Widget>[
|
||||
return new Container(child: new ListView(children: <Widget>[
|
||||
new Column(children: <Widget>[
|
||||
getLogo(),
|
||||
getHintLabel(),
|
||||
@@ -56,12 +57,15 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
|
||||
@override
|
||||
getTextWidget() {
|
||||
return new TextField(
|
||||
return new EnsureVisibleWhenFocused(
|
||||
focusNode: _focusNode,
|
||||
child: new TextField(
|
||||
focusNode: _focusNode,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: new InputDecoration.collapsed(
|
||||
hintText: getHintString(),
|
||||
hintStyle: new TextStyle(color: greyTextColor, fontSize: 16.0)),
|
||||
onChanged: (text) => handleUserInput(text));
|
||||
onChanged: (text) => handleUserInput(text)));
|
||||
}
|
||||
|
||||
/// Возвращает кнопку регистрации.
|
||||
@@ -86,12 +90,12 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
_registerShop() {
|
||||
setState(() {
|
||||
loading = true;
|
||||
_register();
|
||||
register();
|
||||
});
|
||||
}
|
||||
|
||||
/// Получение от платформы id установки, формирование запроса на получение токена, сохранение токена.
|
||||
_register() async {
|
||||
register() async {
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
String posID = await helper.getPosID();
|
||||
|
||||
@@ -108,8 +112,13 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
|
||||
if (response.statusCode == 201) {
|
||||
helper.createSession(merchantID, posID, parsedMap['token']).then((_) {
|
||||
pushRouteReplacement(
|
||||
context, new FinishRegistrationScreen(helper, app));
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
print('start finish registration!');
|
||||
var route = new MaterialPageRoute<String>(builder: (BuildContext context) => new FinishRegistrationScreen(helper, app), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((token) {
|
||||
Navigator.of(context).pop(token);
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
setState(() {
|
||||
@@ -121,4 +130,10 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onWillPop() {
|
||||
if (Theme.of(context).platform != TargetPlatform.iOS) {
|
||||
platform.invokeMethod('finish');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/base/base_screen.dart';
|
||||
import 'package:checker/base/base_state.dart';
|
||||
import 'package:checker/common.dart';
|
||||
import 'package:checker/consts.dart';
|
||||
import 'package:checker/db.dart';
|
||||
import 'package:checker/network.dart';
|
||||
import 'package:checker/screens/currencies.dart';
|
||||
import 'package:checker/screens/languages.dart';
|
||||
import 'package:checker/screens/splash.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -35,14 +39,23 @@ class SettingsState extends BaseState<SettingsScreen> {
|
||||
];
|
||||
|
||||
bool returnToScanner;
|
||||
String versionName = "";
|
||||
|
||||
SettingsState(SqliteHelper helper, String app, bool returnToScanner) {
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
bool isAutomaticallyImplyLeading() => true;
|
||||
|
||||
SettingsState(SqliteHelper helper, String app, bool returnToScanner) : super(helper, app) {
|
||||
this.returnToScanner = returnToScanner;
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext ctx) {
|
||||
if (this.versionName == "") {
|
||||
platform.invokeMethod('getVersionName').then((versionName) {
|
||||
setState(() {
|
||||
this.versionName = versionName;
|
||||
});
|
||||
});
|
||||
}
|
||||
// TODO: Перенести в initStater
|
||||
helper.getSettings(true).then((info) {
|
||||
setState(() {
|
||||
menuItems[0].title = StringsLocalization.currency();
|
||||
@@ -55,7 +68,7 @@ class SettingsState extends BaseState<SettingsScreen> {
|
||||
info['token'] == null ? '' : getTokenSuffix(info['token']);
|
||||
});
|
||||
});
|
||||
return new WillPopScope(onWillPop: onWillPop, child: getMainWidget());
|
||||
return getMainWidget();
|
||||
}
|
||||
|
||||
String getTokenSuffix(String token) {
|
||||
@@ -83,7 +96,6 @@ class SettingsState extends BaseState<SettingsScreen> {
|
||||
List<Widget> widgets = new List();
|
||||
for (int i = 0; i < menuItems.length; i++) {
|
||||
if (menuItems[i].selectedValue.toString() != '') {
|
||||
print('title : ${menuItems[i].title}');
|
||||
widgets.add(
|
||||
getSettingsItem(() => onPressed(menuItems.indexOf(menuItems[i])),
|
||||
menuItems[i].title,
|
||||
@@ -98,7 +110,6 @@ class SettingsState extends BaseState<SettingsScreen> {
|
||||
case 0 :
|
||||
return getCurrencyTitle(int.parse(menuItems[position].selectedValue));
|
||||
case 1 :
|
||||
print('val : ${menuItems[position].selectedValue}');
|
||||
return getLocaleTitle(menuItems[position].selectedValue);
|
||||
default :
|
||||
return null;
|
||||
@@ -149,6 +160,46 @@ class SettingsState extends BaseState<SettingsScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
// В методе отправляется запрос на удаление токена кассы, очищаются SharedPreferences приложения.
|
||||
logout(BuildContext context, SqliteHelper helper) {
|
||||
showYesNoDialog(context, StringsLocalization.confirmation(),
|
||||
StringsLocalization.askChangeStore());
|
||||
}
|
||||
|
||||
// Запуск диалога с двумя кнопками
|
||||
showYesNoDialog(BuildContext context, String title, String content) {
|
||||
showDialog<bool>(
|
||||
context: context,
|
||||
child: new AlertDialog(
|
||||
title: new Text(title),
|
||||
content: new Text(content),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
child: new Text(StringsLocalization.no()),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(false);
|
||||
}),
|
||||
new FlatButton(
|
||||
child: new Text(StringsLocalization.yes()),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(true);
|
||||
})
|
||||
])).then((b) {
|
||||
if (b) {
|
||||
helper.getToken().then((token) {
|
||||
getDeleteTokenRequest(token).then((response) {
|
||||
helper.clear().then((result) {
|
||||
Navigator.of(context).pop('');
|
||||
});
|
||||
}).catchError((error) {
|
||||
print(error.toString());
|
||||
Navigator.of(context).pop('');
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Widget getArrow() {
|
||||
return new Container(margin: new EdgeInsets.only(left: 8.0),
|
||||
child: new Image.asset(settings_arrow_png, height: 42.0));
|
||||
@@ -156,14 +207,6 @@ class SettingsState extends BaseState<SettingsScreen> {
|
||||
|
||||
@override
|
||||
String getTitle() {
|
||||
return StringsLocalization.settings();
|
||||
}
|
||||
|
||||
onWillPop() {
|
||||
if (returnToScanner) {
|
||||
return startScanner(context, app, helper);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return StringsLocalization.settings() + " ($versionName)";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,98 +1,57 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:checker/base/base_screen.dart';
|
||||
import 'package:checker/base/base_state.dart';
|
||||
import 'package:checker/common.dart';
|
||||
import 'package:checker/consts.dart';
|
||||
import 'package:checker/db.dart';
|
||||
import 'package:checker/network.dart';
|
||||
import 'package:checker/resources.dart';
|
||||
import 'package:checker/screens/faq.dart';
|
||||
import 'package:checker/screens/finish_registration.dart';
|
||||
import 'package:checker/screens/purchase.dart';
|
||||
import 'package:checker/screens/registration.dart';
|
||||
import 'package:checker/screens/settings.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:http/http.dart';
|
||||
|
||||
class SplashScreen extends StatefulWidget {
|
||||
// FIXME: Сделать запуск всех экранов из одной точки через метод showNextScreen()
|
||||
class SplashScreen extends BaseScreen {
|
||||
|
||||
SplashScreen(SqliteHelper helper, String app) : super(helper, app);
|
||||
|
||||
@override
|
||||
State createState() => new _SplashScreenState();
|
||||
State createState() => new _SplashScreenState(helper, app);
|
||||
}
|
||||
|
||||
class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
|
||||
_SplashScreenState(SqliteHelper helper, String app) : super(helper, app);
|
||||
bool a = true;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
init();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext ctx) {
|
||||
if (helper == null) {
|
||||
helper = new SqliteHelper();
|
||||
helper.open().then((_) {
|
||||
if (app == null) {
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
app = flavor;
|
||||
setState(() {
|
||||
onStart();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return getScreenContent();
|
||||
}
|
||||
|
||||
void onStart() {
|
||||
helper.getLocale().then((locale) {
|
||||
if (locale == null) {
|
||||
initWithSystemValue();
|
||||
} else {
|
||||
initWithSavedValue(locale);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void initWithSystemValue() {
|
||||
platform.invokeMethod('getLocale').then((locale) {
|
||||
helper.getSettings(false).then((settings) {
|
||||
if (settings == null) {
|
||||
createSettingsTable(locale);
|
||||
} else {
|
||||
initLocale(locale, () {
|
||||
showNext();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void initWithSavedValue(String locale) {
|
||||
initLocale(locale, () {
|
||||
showNext();
|
||||
});
|
||||
}
|
||||
|
||||
void createSettingsTable(String locale) {
|
||||
platform.invokeMethod('getCurrency').then((currency) {
|
||||
helper.createAppInfo(currency);
|
||||
initLocale(locale, () {
|
||||
showNext();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void initLocale<T>(String locale, Future<T> onValue()) {
|
||||
StringsLocalization.load(locale).then((_) {
|
||||
onValue();
|
||||
});
|
||||
}
|
||||
|
||||
void showNext() {
|
||||
new Future.delayed(const Duration(milliseconds: 1000), () {
|
||||
showNextScreen();
|
||||
});
|
||||
return !a ? new Container(
|
||||
decoration: new BoxDecoration(
|
||||
image: new DecorationImage(
|
||||
image: new ExactAssetImage(Resources.getSplash(null)),
|
||||
fit: BoxFit.cover))) : getScreenContent();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget getScreenContent() {
|
||||
return app == null
|
||||
? getBackground()
|
||||
: new Stack(children: <Widget>[
|
||||
return new Stack(children: <Widget>[
|
||||
getBackground(),
|
||||
getLogo(),
|
||||
new Align(
|
||||
@@ -114,14 +73,32 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
]));
|
||||
}
|
||||
|
||||
/// Запуск следующего экрана приложения.
|
||||
showNextScreen() async {
|
||||
String token = await helper.getToken();
|
||||
showNextScreen(Widget screen) {
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
var route = new MaterialPageRoute<String>(
|
||||
builder: (BuildContext context) => screen, fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((token) {
|
||||
if (token == '') {
|
||||
showNextScreen(new RegistrationScreen(helper, app));
|
||||
} else if (token != null) {
|
||||
_initAndStartScanner(context, app, token, helper);
|
||||
} else {
|
||||
print('Произошла непредусмотренная ошибка в логике приложения');
|
||||
helper.getToken().then((token) {
|
||||
_initAndStartScanner(context, app, token, helper);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/// Запуск следующего экрана приложения.
|
||||
init() async {
|
||||
String token = await helper.getToken();
|
||||
// В случае, если в приложении отсутствует токен,
|
||||
// необходимо запустить регистрацию кассы.
|
||||
if (token == null) {
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, app));
|
||||
showNextScreen(new RegistrationScreen(helper, app));
|
||||
} else {
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
getCheckTokenStatusRequest(token).then((statusResponse) {
|
||||
@@ -138,17 +115,18 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
/// Если токен не активен, попробовать создать его еще раз.
|
||||
handleStatusResponse(var statusResponse, SqliteHelper helper) async {
|
||||
int code = statusResponse.statusCode;
|
||||
|
||||
if (code == 404) {
|
||||
helper.clear().then((result) {
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, app));
|
||||
showNextScreen(new RegistrationScreen(helper, app));
|
||||
});
|
||||
} else {
|
||||
Map status = JSON.decode(statusResponse.body);
|
||||
bool active = status['active'] == null ? false : status['active'];
|
||||
|
||||
if (active) {
|
||||
startScanner(context, app, helper);
|
||||
helper.getToken().then((token) {
|
||||
_initAndStartScanner(context, app, token, helper);
|
||||
});
|
||||
} else {
|
||||
if (await platform.invokeMethod('isOnline')) {
|
||||
_createToken(helper);
|
||||
@@ -171,8 +149,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
getCreateTokenRequest({'merchant_shop': merchantID, 'pos': posID})
|
||||
.then((response) {
|
||||
if (response.statusCode == 409) {
|
||||
pushRouteReplacement(
|
||||
context, new FinishRegistrationScreen(helper, app));
|
||||
showNextScreen(new FinishRegistrationScreen(helper, app));
|
||||
} else if (response.statusCode == 201) {
|
||||
clearToken(response, helper);
|
||||
}
|
||||
@@ -186,11 +163,101 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
helper.clear().then((_) {
|
||||
Map parsedMap = JSON.decode(response.body);
|
||||
getDeleteTokenRequest(parsedMap['token']).then((_) {
|
||||
Navigator.of(context).pop();
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, app));
|
||||
showNextScreen(new RegistrationScreen(helper, app));
|
||||
}).catchError((error) {
|
||||
print(error.toString());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// Запуск спецефичной для каждой платформы части приложения - сканера.
|
||||
/// Может производиться с нескольких экранов (splash, finish_registration).
|
||||
_initAndStartScanner(BuildContext context, String app, String token,
|
||||
SqliteHelper helper) {
|
||||
// Канал ловит вызовы методов из "нативной" части приложения.
|
||||
// Могут быть вызваны либо exit либо faq, либо purchase.
|
||||
|
||||
setState(() {
|
||||
a = false;
|
||||
});
|
||||
|
||||
platform.setMethodCallHandler((MethodCall call) async {
|
||||
print(this.toString());
|
||||
if (call.method == 'findUser') {
|
||||
|
||||
try {
|
||||
|
||||
Response userResponse;
|
||||
|
||||
switch (call.arguments[1]) {
|
||||
case 'card':
|
||||
userResponse = await getUserByCard(call.arguments[0], token);
|
||||
break;
|
||||
case 'phone':
|
||||
userResponse = await getUserByPhone(call.arguments[0], token);
|
||||
break;
|
||||
}
|
||||
|
||||
if (userResponse != null) {
|
||||
print('I have user in method handler!');
|
||||
List<Map> users = JSON.decode(userResponse.body);
|
||||
if (users.length > 0) {
|
||||
return users[0];
|
||||
} else {
|
||||
throw new FlutterError("Users not found");
|
||||
}
|
||||
} else {
|
||||
throw new FlutterError("Users not found");
|
||||
}
|
||||
} catch (error) {
|
||||
print(error.toString());
|
||||
throw new FlutterError("Users not found");
|
||||
}
|
||||
|
||||
} else if (call.method == 'faq') {
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
var route = new MaterialPageRoute<Null>(
|
||||
builder: (BuildContext context) => new FAQScreen(helper, app), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((_) {
|
||||
_initAndStartScanner(context, app, token, helper);
|
||||
});
|
||||
});
|
||||
} else if (call.method == 'settings') {
|
||||
new Future.delayed(const Duration(milliseconds: 200), () {
|
||||
var route = new MaterialPageRoute<String>(
|
||||
builder: (BuildContext context) => new SettingsScreen(helper, app, true), fullscreenDialog: true);
|
||||
Navigator.of(context).push(route).then((result) {
|
||||
if (result != null) {
|
||||
showNextScreen(new RegistrationScreen(helper, app));
|
||||
} else {
|
||||
_initAndStartScanner(context, app, token, helper);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
String userString = call.arguments[0] is String
|
||||
? call.arguments[0]
|
||||
: JSON.encode(call.arguments[0]);
|
||||
print(userString);
|
||||
String card = call.arguments[1];
|
||||
showNextScreen(new PurchaseScreen(helper, app, userString, card));
|
||||
}
|
||||
});
|
||||
|
||||
platform.invokeMethod('getEndpoint').then((url) {
|
||||
platform.invokeMethod('getAppToken').then((appToken) {
|
||||
Map<String, String> args = StringsLocalization.strings;
|
||||
args['token'] = token;
|
||||
args['url'] = url;
|
||||
args['appToken'] = appToken;
|
||||
args['localeCode'] = StringsLocalization.localeCode;
|
||||
args['color'] = Resources
|
||||
.getPrimaryColor(app)
|
||||
.value
|
||||
.toString();
|
||||
platform.invokeMethod('startScanner', args);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ packages:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.7.0"
|
||||
version: "1.7.5"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
|
||||