Skip to content

Commit

Permalink
Format documentation lists (See also & Errors) correctly (#298)
Browse files Browse the repository at this point in the history
Fix documentation list format.
  • Loading branch information
creativecreatorormaybenot authored and kroikie committed Nov 17, 2019
1 parent 61bccb3 commit d743f16
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 66 deletions.
4 changes: 4 additions & 0 deletions packages/cloud_firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.12.10+1

* Formatted method documentations.

## 0.12.10

* Added `FieldPath` class and `FieldPath.documentId` to refer to the document id in queries.
Expand Down
4 changes: 4 additions & 0 deletions packages/cloud_firestore/lib/src/query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class Query {
/// [endBefore], [endAtDocument] and [endBeforeDocument].
///
/// See also:
///
/// * [endAfterDocument] for a query that ends after a document.
/// * [startAtDocument] for a query that starts at a document.
/// * [endAtDocument] for a query that ends at a document.
Expand Down Expand Up @@ -247,6 +248,7 @@ class Query {
/// [endBefore], [endAtDocument] and [endBeforeDocument].
///
/// See also:
///
/// * [startAfterDocument] for a query that starts after a document.
/// * [endAtDocument] for a query that ends at a document.
/// * [endBeforeDocument] for a query that ends before a document.
Expand Down Expand Up @@ -315,6 +317,7 @@ class Query {
/// [startAfter], [startAtDocument] and [startAfterDocument].
///
/// See also:
///
/// * [startAfterDocument] for a query that starts after a document.
/// * [startAtDocument] for a query that starts at a document.
/// * [endBeforeDocument] for a query that ends before a document.
Expand Down Expand Up @@ -366,6 +369,7 @@ class Query {
/// [startAfter], [startAtDocument] and [startAfterDocument].
///
/// See also:
///
/// * [startAfterDocument] for a query that starts after document.
/// * [startAtDocument] for a query that starts at a document.
/// * [endAtDocument] for a query that ends at a document.
Expand Down
2 changes: 1 addition & 1 deletion packages/cloud_firestore/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Cloud Firestore, a cloud-hosted, noSQL database
live synchronization and offline support on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore
version: 0.12.10
version: 0.12.10+1

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.0.7

* Formatted `setCurrentScreen` documentation.

## 5.0.6

* Updated README instructions for contributing for consistency with other Flutterfire plugins.
Expand Down
4 changes: 2 additions & 2 deletions packages/firebase_analytics/lib/firebase_analytics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class FirebaseAnalytics {
///
/// See also:
///
/// https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#setCurrentScreen(android.app.Activity, java.lang.String, java.lang.String)
/// https://firebase.google.com/docs/reference/ios/firebaseanalytics/api/reference/Classes/FIRAnalytics#setscreennamescreenclass
/// * https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#setCurrentScreen(android.app.Activity, java.lang.String, java.lang.String)
/// * https://firebase.google.com/docs/reference/ios/firebaseanalytics/api/reference/Classes/FIRAnalytics#setscreennamescreenclass
Future<void> setCurrentScreen(
{@required String screenName,
String screenClassOverride = 'Flutter'}) async {
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Google Analytics for Firebase, an app measuremen
solution that provides insight on app usage and user engagement on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_analytics
version: 5.0.6
version: 5.0.7

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.14.0+10

* Formatted lists in member documentations for better readability.

## 0.14.0+9

* Fix the behavior of `getIdToken` to use the `refresh` parameter instead of always refreshing.
Expand Down
61 changes: 35 additions & 26 deletions packages/firebase_auth/lib/src/firebase_auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class FirebaseAuth {
/// of the Firebase console before being able to use them.
///
/// Errors:
/// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Anonymous accounts are not enabled.
///
/// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Anonymous accounts are not enabled.
Future<AuthResult> signInAnonymously() async {
final Map<String, dynamic> data = await channel
.invokeMapMethod<String, dynamic>(
Expand All @@ -85,9 +86,10 @@ class FirebaseAuth {
/// the [onAuthStateChanged] stream.
///
/// Errors:
/// • `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
/// • `ERROR_INVALID_EMAIL` - If the email address is malformed.
/// • `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
///
/// * `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
/// * `ERROR_INVALID_EMAIL` - If the email address is malformed.
/// * `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
Future<AuthResult> createUserWithEmailAndPassword({
@required String email,
@required String password,
Expand All @@ -112,7 +114,8 @@ class FirebaseAuth {
/// An empty `List` is returned if the user could not be found.
///
/// Errors:
/// • `ERROR_INVALID_CREDENTIAL` - If the [email] address is malformed.
///
/// * `ERROR_INVALID_CREDENTIAL` - If the [email] address is malformed.
Future<List<String>> fetchSignInMethodsForEmail({
@required String email,
}) async {
Expand All @@ -128,8 +131,9 @@ class FirebaseAuth {
/// user of your app.
///
/// Errors:
/// • `ERROR_INVALID_EMAIL` - If the [email] address is malformed.
/// • `ERROR_USER_NOT_FOUND` - If there is no user corresponding to the given [email] address.
///
/// * `ERROR_INVALID_EMAIL` - If the [email] address is malformed.
/// * `ERROR_USER_NOT_FOUND` - If there is no user corresponding to the given [email] address.
Future<void> sendPasswordResetEmail({
@required String email,
}) async {
Expand Down Expand Up @@ -183,11 +187,12 @@ class FirebaseAuth {
/// Signs in using an email address and email sign-in link.
///
/// Errors:
/// • `ERROR_NOT_ALLOWED` - Indicates that email and email sign-in link
///
/// * `ERROR_NOT_ALLOWED` - Indicates that email and email sign-in link
/// accounts are not enabled. Enable them in the Auth section of the
/// Firebase console.
/// `ERROR_DISABLED` - Indicates the user's account is disabled.
/// `ERROR_INVALID` - Indicates the email address is invalid.
/// * `ERROR_DISABLED` - Indicates the user's account is disabled.
/// * `ERROR_INVALID` - Indicates the email address is invalid.
Future<AuthResult> signInWithEmailAndLink({String email, String link}) async {
final Map<String, dynamic> data =
await channel.invokeMapMethod<String, dynamic>(
Expand All @@ -211,12 +216,13 @@ class FirebaseAuth {
/// section of the Firebase console before being able to use them.
///
/// Errors:
/// • `ERROR_INVALID_EMAIL` - If the [email] address is malformed.
/// • `ERROR_WRONG_PASSWORD` - If the [password] is wrong.
/// • `ERROR_USER_NOT_FOUND` - If there is no user corresponding to the given [email] address, or if the user has been deleted.
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_TOO_MANY_REQUESTS` - If there was too many attempts to sign in as this user.
/// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
///
/// * `ERROR_INVALID_EMAIL` - If the [email] address is malformed.
/// * `ERROR_WRONG_PASSWORD` - If the [password] is wrong.
/// * `ERROR_USER_NOT_FOUND` - If there is no user corresponding to the given [email] address, or if the user has been deleted.
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_TOO_MANY_REQUESTS` - If there was too many attempts to sign in as this user.
/// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
Future<AuthResult> signInWithEmailAndPassword({
@required String email,
@required String password,
Expand All @@ -243,13 +249,14 @@ class FirebaseAuth {
/// of the Firebase console before being able to use them.
///
/// Errors:
/// • `ERROR_INVALID_CREDENTIAL` - If the credential data is malformed or has expired.
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_ACCOUNT_EXISTS_WITH_DIFFERENT_CREDENTIAL` - If there already exists an account with the email address asserted by Google.
///
/// * `ERROR_INVALID_CREDENTIAL` - If the credential data is malformed or has expired.
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_ACCOUNT_EXISTS_WITH_DIFFERENT_CREDENTIAL` - If there already exists an account with the email address asserted by Google.
/// Resolve this case by calling [fetchSignInMethodsForEmail] and then asking the user to sign in using one of them.
/// This error will only be thrown if the "One account per email address" setting is enabled in the Firebase console (recommended).
/// `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Google accounts are not enabled.
/// `ERROR_INVALID_ACTION_CODE` - If the action code in the link is malformed, expired, or has already been used.
/// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Google accounts are not enabled.
/// * `ERROR_INVALID_ACTION_CODE` - If the action code in the link is malformed, expired, or has already been used.
/// This can only occur when using [EmailAuthProvider.getCredentialWithLink] to obtain the credential.
Future<AuthResult> signInWithCredential(AuthCredential credential) async {
assert(credential != null);
Expand All @@ -274,10 +281,11 @@ class FirebaseAuth {
/// No duplicated SMS will be sent out upon re-entry (before timeout).
///
/// Make sure to test all scenarios below:
/// • You directly get logged in if Google Play Services verified the phone
///
/// * You directly get logged in if Google Play Services verified the phone
/// number instantly or helped you auto-retrieve the verification code.
/// Auto-retrieve verification code timed out.
/// Error cases when you receive [verificationFailed] callback.
/// * Auto-retrieve verification code timed out.
/// * Error cases when you receive [verificationFailed] callback.
///
/// [phoneNumber] The phone number for the account the user is signing up
/// for or signing into. Make sure to pass in a phone number with country
Expand Down Expand Up @@ -352,9 +360,10 @@ class FirebaseAuth {
/// useful in [the guides](https://firebase.google.com/docs/auth/android/custom-auth).
///
/// Errors:
/// • `ERROR_INVALID_CUSTOM_TOKEN` - The custom token format is incorrect.
///
/// * `ERROR_INVALID_CUSTOM_TOKEN` - The custom token format is incorrect.
/// Please check the documentation.
/// `ERROR_CUSTOM_TOKEN_MISMATCH` - Invalid configuration.
/// * `ERROR_CUSTOM_TOKEN_MISMATCH` - Invalid configuration.
/// Ensure your app's SHA1 is correct in the Firebase console.
Future<AuthResult> signInWithCustomToken({@required String token}) async {
assert(token != null);
Expand Down
71 changes: 39 additions & 32 deletions packages/firebase_auth/lib/src/firebase_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ class FirebaseUser extends UserInfo {
/// the given account.
///
/// Errors:
/// • `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
/// • `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
/// • `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
/// • `ERROR_CREDENTIAL_ALREADY_IN_USE` - If the account is already in use by a different account, e.g. with phone auth.
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// • `ERROR_PROVIDER_ALREADY_LINKED` - If the current user already has an account of this type linked.
/// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that this type of account is not enabled.
/// • `ERROR_INVALID_ACTION_CODE` - If the action code in the link is malformed, expired, or has already been used.
///
/// * `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
/// * `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
/// * `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
/// * `ERROR_CREDENTIAL_ALREADY_IN_USE` - If the account is already in use by a different account, e.g. with phone auth.
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// * `ERROR_PROVIDER_ALREADY_LINKED` - If the current user already has an account of this type linked.
/// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that this type of account is not enabled.
/// * `ERROR_INVALID_ACTION_CODE` - If the action code in the link is malformed, expired, or has already been used.
/// This can only occur when using [EmailAuthProvider.getCredentialWithLink] to obtain the credential.
Future<AuthResult> linkWithCredential(AuthCredential credential) async {
assert(credential != null);
Expand Down Expand Up @@ -91,10 +92,11 @@ class FirebaseUser extends UserInfo {
/// Deletes the current user (also signs out the user).
///
/// Errors:
/// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// • `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
///
/// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// * `ERROR_INVALID_CREDENTIAL` - If the credential is malformed or has expired.
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
Future<void> delete() async {
await FirebaseAuth.channel
.invokeMethod<void>('delete', <String, String>{'app': _app.name});
Expand All @@ -110,12 +112,13 @@ class FirebaseUser extends UserInfo {
/// the user to have recently signed in.
///
/// Errors:
/// • `ERROR_INVALID_CREDENTIAL` - If the email address is malformed.
/// • `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
/// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
///
/// * `ERROR_INVALID_CREDENTIAL` - If the email address is malformed.
/// * `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
/// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
Future<void> updateEmail(String email) async {
assert(email != null);
return await FirebaseAuth.channel.invokeMethod<void>(
Expand Down Expand Up @@ -154,11 +157,12 @@ class FirebaseUser extends UserInfo {
/// the user to have recently signed in.
///
/// Errors:
/// • `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
/// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
///
/// * `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
/// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
/// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
Future<void> updatePassword(String password) async {
assert(password != null);
return await FirebaseAuth.channel.invokeMethod<void>(
Expand All @@ -170,8 +174,9 @@ class FirebaseUser extends UserInfo {
/// Updates the user profile information.
///
/// Errors:
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
///
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
Future<void> updateProfile(UserUpdateInfo userUpdateInfo) async {
assert(userUpdateInfo != null);
final Map<String, String> data = userUpdateInfo._updateData;
Expand All @@ -194,10 +199,11 @@ class FirebaseUser extends UserInfo {
/// error is returned and the current user remains signed in.
///
/// Errors:
/// • `ERROR_INVALID_CREDENTIAL` - If the [authToken] or [authTokenSecret] is malformed or has expired.
/// • `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// • `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
/// • `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
///
/// * `ERROR_INVALID_CREDENTIAL` - If the [authToken] or [authTokenSecret] is malformed or has expired.
/// * `ERROR_USER_DISABLED` - If the user has been disabled (for example, in the Firebase console)
/// * `ERROR_USER_NOT_FOUND` - If the user has been deleted (for example, in the Firebase console)
/// * `ERROR_OPERATION_NOT_ALLOWED` - Indicates that Email & Password accounts are not enabled.
Future<AuthResult> reauthenticateWithCredential(
AuthCredential credential) async {
assert(credential != null);
Expand All @@ -224,8 +230,9 @@ class FirebaseUser extends UserInfo {
/// Use the `providerId` method of an auth provider for [provider].
///
/// Errors:
/// • `ERROR_NO_SUCH_PROVIDER` - If the user does not have a Github Account linked to their account.
/// • `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
///
/// * `ERROR_NO_SUCH_PROVIDER` - If the user does not have a Github Account linked to their account.
/// * `ERROR_REQUIRES_RECENT_LOGIN` - If the user's last sign-in time does not meet the security threshold. Use reauthenticate methods to resolve.
Future<void> unlinkFromProvider(String provider) async {
assert(provider != null);
return await FirebaseAuth.channel.invokeMethod<void>(
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Flutter plugin for Firebase Auth, enabling Android and iOS
like Google, Facebook and Twitter.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth
version: 0.14.0+9
version: 0.14.0+10

flutter:
plugin:
Expand Down
Loading

0 comments on commit d743f16

Please sign in to comment.