Skip to content

Commit 5a09413

Browse files
Firebase Database example (flutter#53)
* Firebase Database example * Include FirebaseAnimatedList example * Add license to main.dart and fix travis failure
1 parent 09df0cc commit 5a09413

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2023
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
.atom/
3+
.idea
4+
.packages
5+
.pub/
6+
build/
7+
ios/.generated/
8+
packages
9+
pubspec.lock
10+
.flutter-plugins
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# firebase_storage_example
2+
3+
Demonstrates how to use the firebase_database plugin.
4+
5+
## Getting Started
6+
7+
For help getting started with Flutter, view our online
8+
[documentation](http://flutter.io/).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$/android">
6+
<sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" />
7+
</content>
8+
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
<orderEntry type="library" name="Flutter for Android" level="project" />
11+
</component>
12+
</module>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
GeneratedPluginRegistrant.java
10+
11+
/gradle
12+
/gradlew
13+
/gradlew.bat
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withInputStream { stream ->
5+
localProperties.load(stream)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
apply plugin: 'com.android.application'
15+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
16+
17+
android {
18+
compileSdkVersion 25
19+
buildToolsVersion '25.0.3'
20+
21+
lintOptions {
22+
disable 'InvalidPackage'
23+
}
24+
25+
defaultConfig {
26+
applicationId 'io.flutter.plugins.firebase_database_example'
27+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
28+
}
29+
30+
buildTypes {
31+
release {
32+
// TODO: Add your own signing config for the release build.
33+
// Signing with the debug keys for now, so `flutter run --release` works.
34+
signingConfig signingConfigs.debug
35+
}
36+
}
37+
}
38+
39+
flutter {
40+
source '../..'
41+
}
42+
43+
dependencies {
44+
androidTestCompile 'com.android.support:support-annotations:25.0.0'
45+
androidTestCompile 'com.android.support.test:runner:0.5'
46+
androidTestCompile 'com.android.support.test:rules:0.5'
47+
}
48+
49+
apply plugin: 'com.google.gms.google-services'
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"project_info": {
3+
"project_number": "297855924061",
4+
"firebase_url": "https://flutterfire-cd2f7.firebaseio.com",
5+
"project_id": "flutterfire-cd2f7",
6+
"storage_bucket": "flutterfire-cd2f7.appspot.com"
7+
},
8+
"client": [
9+
{
10+
"client_info": {
11+
"mobilesdk_app_id": "1:297855924061:android:669871c998cc21bd",
12+
"android_client_info": {
13+
"package_name": "com.yourcompany.firebaseauth.example"
14+
}
15+
},
16+
"oauth_client": [
17+
{
18+
"client_id": "297855924061-r1u58cnh4p6l1ghpkteil46erlkfll62.apps.googleusercontent.com",
19+
"client_type": 1,
20+
"android_info": {
21+
"package_name": "com.yourcompany.firebaseauth.example",
22+
"certificate_hash": "c3adef7e7773e40e777d5c236dbba7461cbea5f0"
23+
}
24+
},
25+
{
26+
"client_id": "297855924061-col4in4uubarifm60nbq8id01ec3ss4c.apps.googleusercontent.com",
27+
"client_type": 1,
28+
"android_info": {
29+
"package_name": "com.yourcompany.firebaseauth.example",
30+
"certificate_hash": "8a4e194f5bfc3fb1075e7daae8dcddd526fde207"
31+
}
32+
},
33+
{
34+
"client_id": "297855924061-f68m5v860ms5faiotn5mv9f50cmpacdq.apps.googleusercontent.com",
35+
"client_type": 3
36+
}
37+
],
38+
"api_key": [
39+
{
40+
"current_key": "AIzaSyD_shO5mfO9lhy2TVWhfo1VUmARKlG4suk"
41+
}
42+
],
43+
"services": {
44+
"analytics_service": {
45+
"status": 1
46+
},
47+
"appinvite_service": {
48+
"status": 2,
49+
"other_platform_oauth_client": [
50+
{
51+
"client_id": "297855924061-48k2m6hl6pa4q9hukijjd0c20ev4qans.apps.googleusercontent.com",
52+
"client_type": 2,
53+
"ios_info": {
54+
"bundle_id": "com.yourcompany.firebaseAuthExample"
55+
}
56+
},
57+
{
58+
"client_id": "297855924061-f68m5v860ms5faiotn5mv9f50cmpacdq.apps.googleusercontent.com",
59+
"client_type": 3
60+
}
61+
]
62+
},
63+
"ads_service": {
64+
"status": 2
65+
}
66+
}
67+
},
68+
{
69+
"client_info": {
70+
"mobilesdk_app_id": "1:297855924061:android:92efa9a0df6f077f",
71+
"android_client_info": {
72+
"package_name": "io.flutter.plugins.firebase_storage_example"
73+
}
74+
},
75+
"oauth_client": [
76+
{
77+
"client_id": "297855924061-f68m5v860ms5faiotn5mv9f50cmpacdq.apps.googleusercontent.com",
78+
"client_type": 3
79+
}
80+
],
81+
"api_key": [
82+
{
83+
"current_key": "AIzaSyD_shO5mfO9lhy2TVWhfo1VUmARKlG4suk"
84+
}
85+
],
86+
"services": {
87+
"analytics_service": {
88+
"status": 1
89+
},
90+
"appinvite_service": {
91+
"status": 1,
92+
"other_platform_oauth_client": []
93+
},
94+
"ads_service": {
95+
"status": 2
96+
}
97+
}
98+
},
99+
{
100+
"client_info": {
101+
"mobilesdk_app_id": "1:297855924061:android:db912bec12847bd9",
102+
"android_client_info": {
103+
"package_name": "io.flutter.plugins.firebase_database_example"
104+
}
105+
},
106+
"oauth_client": [
107+
{
108+
"client_id": "297855924061-f68m5v860ms5faiotn5mv9f50cmpacdq.apps.googleusercontent.com",
109+
"client_type": 3
110+
}
111+
],
112+
"api_key": [
113+
{
114+
"current_key": "AIzaSyD_shO5mfO9lhy2TVWhfo1VUmARKlG4suk"
115+
}
116+
],
117+
"services": {
118+
"analytics_service": {
119+
"status": 1
120+
},
121+
"appinvite_service": {
122+
"status": 1,
123+
"other_platform_oauth_client": []
124+
},
125+
"ads_service": {
126+
"status": 2
127+
}
128+
}
129+
}
130+
],
131+
"configuration_version": "1"
132+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="io.flutter.plugins.firebase_database_example"
3+
android:versionCode="1"
4+
android:versionName="0.0.1">
5+
6+
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
7+
8+
<!-- The INTERNET permission is required for development. Specifically,
9+
flutter needs it to communicate with the running application
10+
to allow setting breakpoints, to provide hot reload, etc.
11+
-->
12+
<uses-permission android:name="android.permission.INTERNET"/>
13+
14+
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
15+
calls FlutterMain.startInitialization(this); in its onCreate method.
16+
In most cases you can leave this as-is, but you if you want to provide
17+
additional functionality it is fine to subclass or reimplement
18+
FlutterApplication and put your custom class here. -->
19+
<application android:name="io.flutter.app.FlutterApplication" android:label="firebase_database_example" android:icon="@mipmap/ic_launcher">
20+
<activity android:name=".MainActivity"
21+
android:launchMode="singleTop"
22+
android:theme="@android:style/Theme.Black.NoTitleBar"
23+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
24+
android:hardwareAccelerated="true"
25+
android:windowSoftInputMode="adjustResize">
26+
<intent-filter>
27+
<action android:name="android.intent.action.MAIN"/>
28+
<category android:name="android.intent.category.LAUNCHER"/>
29+
</intent-filter>
30+
</activity>
31+
</application>
32+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.flutter.plugins.firebase_database_example;
2+
3+
import android.os.Bundle;
4+
import io.flutter.app.FlutterActivity;
5+
import io.flutter.plugins.GeneratedPluginRegistrant;
6+
7+
public class MainActivity extends FlutterActivity {
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
GeneratedPluginRegistrant.registerWith(this);
12+
}
13+
}
544 Bytes
Loading
442 Bytes
Loading

0 commit comments

Comments
 (0)