Skip to content

Commit 9ffb10d

Browse files
committed
Merge commit 'bfc666daa89698c9fdc342e7ae521ec5e4e8ec5b'
* commit 'bfc666daa89698c9fdc342e7ae521ec5e4e8ec5b': (59 commits) Fix analyze errors Make fcmSetupBackgroundChannel private Make fcmSetupBackgroundChannel top-level fix formatting fix analyze issues address comments Wrap chanel result logic in LatchResult Migration of flutter/plugins#1900 Remove emulators references from .cirrus.yaml format initial Update issue templates Update version/changelog per PR guidelines Remove duplicate example. reformat Update docs to encourage contributors to self-label PRs with the plugin they affect Manual merge of rejected diff Migrate PR Fix analyzer failures + reformat reformat ...
2 parents ccbc689 + bfc666d commit 9ffb10d

File tree

179 files changed

+3094
-268
lines changed

Some content is hidden

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

179 files changed

+3094
-268
lines changed

.cirrus.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ task:
3030
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
3131
create_device_script:
3232
echo no | avdmanager -v create avd -n test -k "system-images;android-21;default;armeabi-v7a"
33-
start_emulator_background_script:
34-
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window
35-
wait_for_emulator_script: adb wait-for-device
3633
script:
3734
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
3835
# might include non-ASCII characters which makes Gradle crash.
@@ -46,9 +43,6 @@ task:
4643
- export CIRRUS_COMMIT_MESSAGE=""
4744
- ./script/incremental_build.sh build-examples --apk
4845
- ./script/incremental_build.sh java-test # must come after apk build
49-
# TODO(jackson): Re-enable once Android emulators support Firebase
50-
# https://github.com/flutter/flutter/issues/29571
51-
# - ./script/incremental_build.sh drive-examples
5246
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
5347
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`
5448

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Bug report
3+
about: Issues identifying existing FlutterFire features that are not working as expected.
4+
title: "[<FIREBASE_PRODUCT>] <TITLE>"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. '...'
17+
4. See error or incorrect behavior
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Additional context**
23+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Issues requesting Firebase features be added to or improved.
4+
title: "[<FIREBASE_PRODUCT>] <TITLE>"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.
1212

1313
- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
14+
- [ ] If the pull request affects only one plugin, the PR title starts with the name of the plugin in brackets (e.g. [cloud_firestore])
1415
- [ ] My PR includes unit or integration tests for *all* changed/updated/fixed behaviors (See [Contributor Guide]).
1516
- [ ] All existing and new tests are passing.
1617
- [ ] I updated/added relevant documentation (doc comments with `///`).
@@ -31,7 +32,7 @@ Does your PR require plugin users to manually update their apps to accommodate y
3132

3233
<!-- Links -->
3334
[issue database]: https://github.com/flutter/flutter/issues
34-
[Contributor Guide]: https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md
35+
[Contributor Guide]: https://github.com/FirebaseExtended/flutterfire/blob/master/CONTRIBUTING.md
3536
[Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
3637
[pub versioning philosophy]: https://www.dartlang.org/tools/pub/versioning
3738
[CLA]: https://cla.developers.google.com/

CONTRIBUTING.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Contributing to FlutterFire
22

3-
[![Build Status](https://api.cirrus-ci.com/github/flutter/plugins.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)
3+
[![Build Status](https://api.cirrus-ci.com/github/FirebaseExtended/flutterfire.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)
44

55
_See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_
66

77
## Things you will need
88

9-
109
* Linux, Mac OS X, or Windows.
1110
* git (used for source version control).
1211
* An ssh client (used to authenticate with GitHub).
@@ -22,9 +21,9 @@ _See also: [Flutter's code of conduct](https://flutter.io/design-principles/#cod
2221
* If you haven't configured your machine with an SSH key that's known to github, then
2322
follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/)
2423
to generate an SSH key.
25-
* `git clone git@github.com:<your_name_here>/plugins.git`
24+
* `git clone git@github.com:<your_name_here>/flutterfire.git`
2625
* `cd plugins`
27-
* `git remote add upstream git@github.com:flutter/plugins.git` (So that you
26+
* `git remote add upstream git@github.com:FirebaseExtended/flutterfire.git` (So that you
2827
fetch from the master repository, not your clone, when running `git fetch`
2928
et al.)
3029

@@ -89,6 +88,9 @@ To send us a pull request:
8988

9089
Please make sure all your checkins have detailed commit messages explaining the patch.
9190

91+
For pull requests that affect only one Flutterfire plugin, use a title that starts
92+
with the name of the plugin in brackets (e.g. [cloud_firestore]).
93+
9294
Plugins tests are run automatically on contributions using Cirrus CI. However, due to
9395
cost constraints, pull requests from non-committers may not run all the tests
9496
automatically.

README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# FlutterFire
22

3-
[![Build Status](https://api.cirrus-ci.com/github/flutter/plugins.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)
3+
[![Build Status](https://api.cirrus-ci.com/github/FirebaseExtended/flutterfire.svg)](https://cirrus-ci.com/github/FirebaseExtended/flutterfire/master)
44

55
FlutterFire is a set of [Flutter plugins](https://flutter.io/platform-plugins/)
66
that enable Flutter apps to use one or more [Firebase](https://firebase.google.com/) services. You can follow an example that shows how to use these plugins in the [Firebase for Flutter](https://codelabs.developers.google.com/codelabs/flutter-firebase/index.html#0) codelab.
77

8-
[Flutter](https://flutter.io) is a new mobile app SDK to help developers and
9-
designers build modern mobile apps for iOS and Android.
8+
[Flutter](https://flutter.dev) is Google's mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
109

11-
*Note*: The plugins are still under development, and some APIs might not be available yet.
12-
[Feedback](https://github.com/flutter/flutter/issues) and [Pull Requests](https://github.com/flutter/plugins/pulls) are most welcome!
10+
*Note*: FlutterFire plugins are still under development, and some APIs might not be available yet.
11+
[Feedback](https://github.com/FirebaseExtended/flutterfire/issues) and [Pull Requests](https://github.com/FirebaseExtended/flutterfire/pulls) are most welcome!
1312

1413
## Available FlutterFire plugins
1514

@@ -24,7 +23,7 @@ designers build modern mobile apps for iOS and Android.
2423
| [firebase_crashlytics][crash_pub] | ![pub package][crash_badge] | [Firebase Crashlytics][crash_product] | [`packages/firebase_crashlytics`][crash_code] |
2524
| [firebase_database][database_pub] | ![pub package][database_badge] | [Firebase Realtime Database][database_product] | [`packages/firebase_database`][database_code] |
2625
| [firebase_dynamic_links][dynamic_links_pub] | ![pub package][dynamic_links_badge] | [Firebase Dynamic Links][dynamic_links_product] | [`packages/firebase_dynamic_links`][dynamic_links_code] |
27-
| [in_app_messaging][in_app_messaging_pub] | ![pub package][in_app_messaging_badge] | [Firebase In-App Messaging][in_app_messaging_product] | [`packages/firebase_in_app_messaging`][in_app_messaging_code] |
26+
| [firebase_in_app_messaging][in_app_messaging_pub] | ![pub package][in_app_messaging_badge] | [Firebase In-App Messaging][in_app_messaging_product] | [`packages/firebase_in_app_messaging`][in_app_messaging_code] |
2827
| [firebase_messaging][messaging_pub] | ![pub package][messaging_badge] | [Firebase Cloud Messaging][messaging_product] | [`packages/firebase_messaging`][messaging_code] |
2928
| [firebase_ml_vision][ml_vision_pub] | ![pub package][ml_vision_badge] | [Firebase ML Kit][ml_vision_product] | [`packages/firebase_ml_vision`][ml_vision_code] |
3029
| [firebase_performance][performance_pub] | ![pub package][performance_badge] | [Firebase Performance Monitoring][performance_product] | [`packages/firebase_performance`][performance_code] |
@@ -33,77 +32,77 @@ designers build modern mobile apps for iOS and Android.
3332

3433
[admob_pub]: https://pub.dartlang.org/packages/firebase_admob
3534
[admob_product]: https://firebase.google.com/docs/admob/
36-
[admob_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_admob
35+
[admob_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_admob
3736
[admob_badge]: https://img.shields.io/pub/v/firebase_admob.svg
3837

3938
[analytics_pub]: https://pub.dartlang.org/packages/firebase_analytics
4039
[analytics_product]: https://firebase.google.com/products/analytics/
41-
[analytics_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_analytics
40+
[analytics_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_analytics
4241
[analytics_badge]: https://img.shields.io/pub/v/firebase_analytics.svg
4342

4443
[auth_pub]: https://pub.dartlang.org/packages/firebase_auth
4544
[auth_product]: https://firebase.google.com/products/auth/
46-
[auth_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_auth
45+
[auth_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth
4746
[auth_badge]: https://img.shields.io/pub/v/firebase_auth.svg
4847

4948
[core_pub]: https://pub.dartlang.org/packages/firebase_core
5049
[core_product]: https://firebase.google.com/
51-
[core_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_core
50+
[core_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_core
5251
[core_badge]: https://img.shields.io/pub/v/firebase_core.svg
5352

5453
[crash_pub]: https://pub.dartlang.org/packages/firebase_crashlytics
5554
[crash_product]: https://firebase.google.com/products/crashlytics/
56-
[crash_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_crashlytics
55+
[crash_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_crashlytics
5756
[crash_badge]: https://img.shields.io/pub/v/firebase_crashlytics.svg
5857

5958
[database_pub]: https://pub.dartlang.org/packages/firebase_database
6059
[database_product]: https://firebase.google.com/products/database/
61-
[database_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_database
60+
[database_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_database
6261
[database_badge]: https://img.shields.io/pub/v/firebase_database.svg
6362

6463
[dynamic_links_pub]: https://pub.dartlang.org/packages/firebase_dynamic_links
6564
[dynamic_links_product]: https://firebase.google.com/products/dynamic-links/
66-
[dynamic_links_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_dynamic_links
65+
[dynamic_links_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_dynamic_links
6766
[dynamic_links_badge]: https://img.shields.io/pub/v/firebase_dynamic_links.svg
6867

6968
[firestore_pub]: https://pub.dartlang.org/packages/cloud_firestore
7069
[firestore_product]: https://firebase.google.com/products/firestore/
71-
[firestore_code]: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore
70+
[firestore_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore
7271
[firestore_badge]: https://img.shields.io/pub/v/cloud_firestore.svg
7372

7473
[functions_pub]: https://pub.dartlang.org/packages/cloud_functions
7574
[functions_product]: https://firebase.google.com/products/functions/
76-
[functions_code]: https://github.com/flutter/plugins/tree/master/packages/cloud_functions
75+
[functions_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_functions
7776
[functions_badge]: https://img.shields.io/pub/v/cloud_functions.svg
7877

7978
[in_app_messaging_pub]: https://pub.dartlang.org/packages/firebase_in_app_messaging
8079
[in_app_messaging_product]: https://firebase.google.com/products/in-app-messaging/
81-
[in_app_messaging_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_in_app_messaging
80+
[in_app_messaging_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_in_app_messaging
8281
[in_app_messaging_badge]: https://img.shields.io/pub/v/firebase_in_app_messaging.svg
8382

8483
[messaging_pub]: https://pub.dartlang.org/packages/firebase_messaging
8584
[messaging_product]: https://firebase.google.com/products/cloud-messaging/
86-
[messaging_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_messaging
85+
[messaging_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging
8786
[messaging_badge]: https://img.shields.io/pub/v/firebase_messaging.svg
8887

8988
[ml_vision_pub]: https://pub.dartlang.org/packages/firebase_ml_vision
9089
[ml_vision_product]: https://firebase.google.com/products/ml-kit/
91-
[ml_vision_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_ml_vision
90+
[ml_vision_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_ml_vision
9291
[ml_vision_badge]: https://img.shields.io/pub/v/firebase_ml_vision.svg
9392

9493
[performance_pub]: https://pub.dartlang.org/packages/firebase_performance
9594
[performance_product]: https://firebase.google.com/products/performance/
96-
[performance_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_performance
95+
[performance_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_performance
9796
[performance_badge]: https://img.shields.io/pub/v/firebase_performance.svg
9897

9998
[remote_config_pub]: https://pub.dartlang.org/packages/firebase_remote_config
10099
[remote_config_product]: https://firebase.google.com/products/remote-config/
101-
[remote_config_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_remote_config
100+
[remote_config_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_remote_config
102101
[remote_config_badge]: https://img.shields.io/pub/v/firebase_remote_config.svg
103102

104103
[storage_pub]: https://pub.dartlang.org/packages/firebase_storage
105104
[storage_product]: https://firebase.google.com/products/storage/
106-
[storage_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_storage
105+
[storage_code]: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_storage
107106
[storage_badge]: https://img.shields.io/pub/v/firebase_storage.svg
108107

109108
## Issues
@@ -115,6 +114,6 @@ Plugin issues that are not specific to Flutterfire can be filed in the [Flutter
115114
## Contributing
116115

117116
If you wish to contribute a change to any of the existing plugins in this repo,
118-
please review our [contribution guide](https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md),
117+
please review our [contribution guide](https://github.com/FirebaseExtended/flutterfire/blob/master/CONTRIBUTING.md),
119118
and send a [pull request](https://github.com/FirebaseExtended/flutterfire/pulls).
120119

packages/cloud_firestore/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 0.12.9+3
2+
3+
* Updated error handling on Android for transactions to prevent crashes.
4+
5+
## 0.12.9+2
6+
7+
* Fix flaky integration test for `includeMetadataChanges`.
8+
9+
## 0.12.9+1
10+
11+
* Update documentation to reflect new repository location.
12+
* Update unit tests to call `TestWidgetsFlutterBinding.ensureInitialized`.
13+
* Remove executable bit on LICENSE file.
14+
115
## 0.12.9
216

317
* New optional `includeMetadataChanges` parameter added to `DocumentReference.snapshots()`

packages/cloud_firestore/LICENSE

100755100644
File mode changed.

packages/cloud_firestore/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ A Flutter plugin to use the [Cloud Firestore API](https://firebase.google.com/do
44

55
[![pub package](https://img.shields.io/pub/v/cloud_firestore.svg)](https://pub.dartlang.org/packages/cloud_firestore)
66

7-
For Flutter plugins for other Firebase products, see [FlutterFire.md](https://github.com/flutter/plugins/blob/master/FlutterFire.md).
7+
For Flutter plugins for other Firebase products, see [README.md](https://github.com/FirebaseExtended/flutterfire/blob/master/README.md).
88

9-
*Note*: This plugin is still under development, and some APIs might not be available yet. [Feedback](https://github.com/flutter/flutter/issues) and [Pull Requests](https://github.com/flutter/plugins/pulls) are most welcome!
9+
*Note*: This plugin is still under development, and some APIs might not be available yet. [Feedback](https://github.com/FirebaseExtended/flutterfire/issues) and [Pull Requests](https://github.com/FirebaseExtended/flutterfire/pulls) are most welcome!
1010

1111
## Setup
1212

packages/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ public void run() {
474474
result.success(snapshotMap);
475475
}
476476
});
477-
} catch (final FirebaseFirestoreException e) {
477+
} catch (final Exception e) {
478478
activity.runOnUiThread(
479479
new Runnable() {
480480
@Override
@@ -506,7 +506,7 @@ public void run() {
506506
result.success(null);
507507
}
508508
});
509-
} catch (final IllegalStateException e) {
509+
} catch (final Exception e) {
510510
activity.runOnUiThread(
511511
new Runnable() {
512512
@Override
@@ -529,14 +529,24 @@ public void run() {
529529
@Override
530530
protected Void doInBackground(Void... voids) {
531531
Map<String, Object> data = (Map<String, Object>) arguments.get("data");
532-
transaction.set(getDocumentReference(arguments), data);
533-
activity.runOnUiThread(
534-
new Runnable() {
535-
@Override
536-
public void run() {
537-
result.success(null);
538-
}
539-
});
532+
try {
533+
transaction.set(getDocumentReference(arguments), data);
534+
activity.runOnUiThread(
535+
new Runnable() {
536+
@Override
537+
public void run() {
538+
result.success(null);
539+
}
540+
});
541+
} catch (final Exception e) {
542+
activity.runOnUiThread(
543+
new Runnable() {
544+
@Override
545+
public void run() {
546+
result.error("Error performing Transaction#set", e.getMessage(), null);
547+
}
548+
});
549+
}
540550
return null;
541551
}
542552
}.execute();
@@ -549,14 +559,24 @@ public void run() {
549559
new AsyncTask<Void, Void, Void>() {
550560
@Override
551561
protected Void doInBackground(Void... voids) {
552-
transaction.delete(getDocumentReference(arguments));
553-
activity.runOnUiThread(
554-
new Runnable() {
555-
@Override
556-
public void run() {
557-
result.success(null);
558-
}
559-
});
562+
try {
563+
transaction.delete(getDocumentReference(arguments));
564+
activity.runOnUiThread(
565+
new Runnable() {
566+
@Override
567+
public void run() {
568+
result.success(null);
569+
}
570+
});
571+
} catch (final Exception e) {
572+
activity.runOnUiThread(
573+
new Runnable() {
574+
@Override
575+
public void run() {
576+
result.error("Error performing Transaction#delete", e.getMessage(), null);
577+
}
578+
});
579+
}
560580
return null;
561581
}
562582
}.execute();

0 commit comments

Comments
 (0)