Android analytics done, camera instructions added.
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
import 'dart:core';
|
||||
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');
|
||||
import 'package:checker/common.dart';
|
||||
|
||||
main() {
|
||||
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
platform.invokeMethod('getAppTitle').then((title) {
|
||||
|
||||
String app = flavor; // dinect, autobonus
|
||||
String appName= title; // Dinect, Dinect (INT), Autobonus
|
||||
|
||||
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) {
|
||||
@@ -23,13 +18,22 @@ main() {
|
||||
} else {
|
||||
start(app, appName, locale, helper);
|
||||
}
|
||||
}, onError: (e) {
|
||||
platform.invokeMethod('logError', {"message":e.toString()});
|
||||
});
|
||||
}, onError: (e) {
|
||||
platform.invokeMethod('logError', {"message":e.toString()});
|
||||
});
|
||||
}, onError: (e) {
|
||||
platform.invokeMethod('logError', {"message":e.toString()});
|
||||
});
|
||||
}, onError: (e) {
|
||||
platform.invokeMethod('logError', {"message":e.toString()});
|
||||
});
|
||||
}
|
||||
|
||||
initWithSystemValue(String app, String name, String locale, SqliteHelper helper) {
|
||||
initWithSystemValue(String app, String name, String locale,
|
||||
SqliteHelper helper) {
|
||||
helper.getSettings(false).then((settings) {
|
||||
if (settings.isEmpty) {
|
||||
createSettingsTable(app, name, helper);
|
||||
@@ -44,7 +48,11 @@ createSettingsTable(String app, String name, SqliteHelper helper) {
|
||||
platform.invokeMethod('getCurrency').then((currency) {
|
||||
helper.createAppInfo(currency, locale).then((_) {
|
||||
start(app, name, locale, helper);
|
||||
}, onError: (e) {
|
||||
platform.invokeMethod('logError', {"message":e.toString()});
|
||||
});
|
||||
}, onError: (e) {
|
||||
platform.invokeMethod('logError', {"message":e.toString()});
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -64,10 +72,11 @@ class Checker extends StatefulWidget {
|
||||
Checker(this.app, this.appName, this.helper);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() => new CheckerState(
|
||||
this.app,
|
||||
this.appName,
|
||||
this.helper);
|
||||
State<StatefulWidget> createState() =>
|
||||
new CheckerState(
|
||||
this.app,
|
||||
this.appName,
|
||||
this.helper);
|
||||
}
|
||||
|
||||
class CheckerState extends State<Checker> {
|
||||
@@ -81,8 +90,8 @@ class CheckerState extends State<Checker> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new MaterialApp(
|
||||
title: appName,
|
||||
home: new SplashScreen(helper, app)
|
||||
title: appName,
|
||||
home: new SplashScreen(helper, app)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user