Add foregroundColor plumbing to GoogleUserCircleAvatar (#245) * Add foregroundColor plumbing to GoogleUserCircleAvatar * review comments
diff --git a/packages/google_sign_in/CHANGELOG.md b/packages/google_sign_in/CHANGELOG.md index 7be4d2e..681e829 100644 --- a/packages/google_sign_in/CHANGELOG.md +++ b/packages/google_sign_in/CHANGELOG.md
@@ -1,3 +1,7 @@ +## 1.0.2 + +* Support setting foregroundColor in the avatar. + ## 1.0.1 * Change GMS dependency to 11.+
diff --git a/packages/google_sign_in/lib/widgets.dart b/packages/google_sign_in/lib/widgets.dart index 04a43b5..513e5e8 100644 --- a/packages/google_sign_in/lib/widgets.dart +++ b/packages/google_sign_in/lib/widgets.dart
@@ -24,6 +24,7 @@ const GoogleUserCircleAvatar({ @required this.identity, this.placeholderPhotoUrl, + this.foregroundColor, this.backgroundColor, }) : assert(identity != null); @@ -38,6 +39,11 @@ /// The Google user's identity; guaranteed to be non-null. final GoogleIdentity identity; + /// The color of the text to be displayed if photo is not available. + /// + /// If a foreground color is not specified, the theme's text color is used. + final Color foregroundColor; + /// The color with which to fill the circle. Changing the background color /// will cause the avatar to animate to the new color. /// @@ -57,6 +63,7 @@ Widget build(BuildContext context) { return new CircleAvatar( backgroundColor: backgroundColor, + foregroundColor: foregroundColor, child: new LayoutBuilder(builder: _buildClippedImage), ); }
diff --git a/packages/google_sign_in/pubspec.yaml b/packages/google_sign_in/pubspec.yaml index 24c6a45..4208550 100755 --- a/packages/google_sign_in/pubspec.yaml +++ b/packages/google_sign_in/pubspec.yaml
@@ -3,7 +3,7 @@ description: Google Sign-In plugin for Flutter. author: Flutter Team <flutter-dev@googlegroups.com> homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in -version: 1.0.1 +version: 1.0.2 flutter: plugin: