isValid method

bool isValid()

Returns boolean indicates whether or not the credentials is valid.

This method might return false when a pub-tokens.json file created by future SDK used by pub tool from old SDK.

Implementation

// Either [token] or [env] should be defined to be valid.
bool isValid() => (token == null) ^ (env == null);