Skip to content

Commit

Permalink
prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
iampawan committed May 6, 2018
1 parent db65b23 commit c85d7c3
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 4 deletions.
15 changes: 14 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ if (flutterRoot == null) {
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"


def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
compileSdkVersion 27

Expand All @@ -31,11 +36,19 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

signingConfigs{
release{
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="flutfire"
android:label="Wallfy"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions android/key.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
storePassword=abcd1234
keyPassword=abcd1234
keyAlias=wallfy
storeFile=/Users/pawankumar/Documents/wallfy.jks
20 changes: 20 additions & 0 deletions lib/WallpaperApp/wall_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ import 'package:cloud_firestore/cloud_firestore.dart';
import 'dart:async';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:firebase_admob/firebase_admob.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';

const String testDevice = '';

class WallScreen extends StatefulWidget {
final FirebaseAnalytics analytics;
final FirebaseAnalyticsObserver observer;

WallScreen({this.analytics, this.observer});

@override
_WallScreenState createState() => new _WallScreenState();
}
Expand Down Expand Up @@ -47,6 +54,16 @@ class _WallScreenState extends State<WallScreen> {
});
}

Future<Null> _currentScreen() async {
await widget.analytics.setCurrentScreen(
screenName: 'Wall Screen', screenClassOverride: 'WallScreen');
}

Future<Null> _sendAnalytics() async {
await widget.analytics
.logEvent(name: 'full_screen_tapped', parameters: <String, dynamic>{});
}

@override
void initState() {
// TODO: implement initState
Expand All @@ -61,6 +78,8 @@ class _WallScreenState extends State<WallScreen> {
wallpapersList = datasnapshot.documents;
});
});

// _currentScreen();
}

@override
Expand Down Expand Up @@ -90,6 +109,7 @@ class _WallScreenState extends State<WallScreen> {
new BorderRadius.all(new Radius.circular(8.0)),
child: new InkWell(
onTap: () {
_sendAnalytics();
createInterstitialAd()
..load()
..show();
Expand Down
10 changes: 8 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import 'package:flutfire/CrudApp/crud_sample.dart';
import 'package:flutfire/WallpaperApp/wall_screen.dart';
import 'package:flutter/material.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
static FirebaseAnalytics analytics = new FirebaseAnalytics();
static FirebaseAnalyticsObserver observer =
new FirebaseAnalyticsObserver(analytics: analytics);

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
Expand All @@ -14,7 +19,8 @@ class MyApp extends StatelessWidget {
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new WallScreen(),
navigatorObservers: <NavigatorObserver>[observer],
home: new WallScreen(analytics: analytics, observer: observer),
);
}
}
7 changes: 7 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.2"
firebase_analytics:
dependency: "direct main"
description:
name: firebase_analytics
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.3"
firebase_auth:
dependency: "direct main"
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
cloud_firestore:
flutter_staggered_grid_view:
firebase_admob: ^0.5.2
firebase_analytics: ^0.2.3


dev_dependencies:
Expand Down

0 comments on commit c85d7c3

Please sign in to comment.