Line data Source code
1 : import 'package:freezed_annotation/freezed_annotation.dart';
2 :
3 : import '../../types/typedefs.dart';
4 :
5 : part 'google_sign_in_credential.freezed.dart';
6 : part 'google_sign_in_credential.g.dart';
7 :
8 : /// A freezed version of google_sign_in/GoogleSignInAuthentication
9 : ///
10 : /// Holds authentication tokens after sign in.
11 : @freezed
12 : class GoogleSignInCredential with _$GoogleSignInCredential {
13 : factory GoogleSignInCredential({
14 : /// An OpenID Connect ID token that identifies the user.
15 : String? idToken,
16 :
17 : /// The OAuth2 access token to access Google services.
18 : String? accessToken,
19 :
20 : /// Server auth code used to access Google Login
21 : String? serverAuthCode,
22 : }) = _GoogleSignInCredential;
23 :
24 0 : factory GoogleSignInCredential.fromJson(JsonMap json) =>
25 0 : _$GoogleSignInCredentialFromJson(json);
26 : }
|