Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 6caa5e6

Browse files
committed
Fix documentation
1 parent 5c5ac55 commit 6caa5e6

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

packages/google_sign_in/lib/src/fife.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
/// image, and "`c`" indicates we want the image cropped.
66
final RegExp sizeDirective = RegExp(r'^s[0-9]{1,5}(-c)?$');
77

8-
/// Adds sizing information to [photoUrl], inserted as the last path segment
9-
/// before the image filename. The format is described in [sizeDirective].
8+
/// Adds [size] directive to [photoUrl].
109
///
11-
/// Falls back to the default profile photo if [photoUrl] is [null].
10+
/// Depending on the format of photoUrl, this might:
11+
/// * Insert information as the last path segment (old style URLs), before
12+
/// the image filename. The format is described in [sizeDirective].
13+
/// * Insert information at the end of the URL, after an = sign. The format
14+
/// is described within this method.
1215
String addSizeDirectiveToUrl(String photoUrl, double size) {
13-
if (photoUrl == null) {
14-
// If the user has no profile photo and no display name, fall back to
15-
// the default profile photo as a last resort.
16-
return 'https://lh3.googleusercontent.com/a/default-user=s${size.round()}-c';
17-
}
1816
final Uri profileUri = Uri.parse(photoUrl);
1917
final List<String> pathSegments = List<String>.from(profileUri.pathSegments);
2018
if (pathSegments.length <= 2) {

0 commit comments

Comments
 (0)