mirror of
https://github.com/farcasclaudiu/flutter_plugin_appcenter.git
synced 2026-06-28 13:01:24 +03:00
fix Dart2 cast and gradle upgrade
This commit is contained in:
@@ -46,7 +46,7 @@ flutter {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
androidTestCompile 'com.android.support:support-annotations:25.4.0'
|
||||
androidTestCompile 'com.android.support.test:runner:0.5'
|
||||
androidTestCompile 'com.android.support.test:rules:0.5'
|
||||
androidTestImplementation 'com.android.support:support-annotations:25.4.0'
|
||||
androidTestImplementation 'com.android.support.test:runner:0.5'
|
||||
androidTestImplementation 'com.android.support.test:rules:0.5'
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
#Fri Aug 10 12:01:12 EEST 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:appcenter/appcenter.dart';
|
||||
import 'package:appcenter_analytics/appcenter_analytics.dart';
|
||||
import 'package:appcenter_crashes/appcenter_crashes.dart';
|
||||
@@ -15,13 +14,13 @@ class MyApp extends StatefulWidget {
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
|
||||
String _app_secret;
|
||||
String _appSecret;
|
||||
String _installId = 'Unknown';
|
||||
bool _areAnalyticsEnabled = false, _areCrashesEnabled = false;
|
||||
|
||||
_MyAppState() {
|
||||
final ios = defaultTargetPlatform == TargetPlatform.iOS;
|
||||
_app_secret = ios ? "a8a33033-ef2f-4911-a664-a7d118287ce7" : "3f1f3b0e-24ff-436a-b42d-3c08b117d46a";
|
||||
_appSecret = ios ? "a8a33033-ef2f-4911-a664-a7d118287ce7" : "3f1f3b0e-24ff-436a-b42d-3c08b117d46a";
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -32,7 +31,7 @@ class _MyAppState extends State<MyApp> {
|
||||
|
||||
// Platform messages are asynchronous, so we initialize in an async method.
|
||||
initPlatformState() async {
|
||||
await AppCenter.start(_app_secret, [AppCenterAnalytics.id, AppCenterCrashes.id]);
|
||||
await AppCenter.start(_appSecret, [AppCenterAnalytics.id, AppCenterCrashes.id]);
|
||||
|
||||
if (!mounted)
|
||||
return;
|
||||
@@ -69,12 +68,12 @@ class _MyAppState extends State<MyApp> {
|
||||
new IconButton(
|
||||
icon: new Icon(Icons.map),
|
||||
tooltip: 'map',
|
||||
onPressed: () { AppcenterAnalytics.trackEvent("map"); },
|
||||
onPressed: () { AppCenterAnalytics.trackEvent("map"); },
|
||||
),
|
||||
new IconButton(
|
||||
icon: new Icon(Icons.casino),
|
||||
tooltip: 'casino',
|
||||
onPressed: () { AppcenterAnalytics.trackEvent("casino", { "dollars" : "10" }); },
|
||||
onPressed: () { AppCenterAnalytics.trackEvent("casino", { "dollars" : "10" }); },
|
||||
),
|
||||
])
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user