OpenIdIdentity constructor Null safety

OpenIdIdentity(
  1. {required String accessToken,
  2. required DateTime expiresAt,
  3. required String idToken,
  4. required String tokenType,
  5. String? refreshToken,
  6. String? state}
)

Implementation

OpenIdIdentity({
  required String accessToken,
  required DateTime expiresAt,
  required String idToken,
  required String tokenType,
  String? refreshToken,
  String? state,
}) : super(
        expiresAt: expiresAt,
        tokenType: tokenType,
        accessToken: accessToken,
        idToken: idToken,
        refreshToken: refreshToken,
        state: state,
      ) {
  this.claims = JwtDecoder.decode(idToken);

  this.sub = claims["sub"].toString();
}