isAlreadySignInWithGameService method
Checks whether the user is already signed in with the platform's native game service.
Returns a Future that resolves with true if the user is already signed in,
or false if not.
Logs any platform exceptions that occur during the check.
Implementation
@override
Future<bool> isAlreadySignInWithGameService() async {
final bool result;
try {
// Invoke the native method to check if the user is already signed in.
result = await methodChannel
.invokeMethod<bool>('isAlreadySignInWithGameService') ??
false;
} on PlatformException catch (e) {
// Log the error if the platform throws an exception.
_log.severe(
'Failed to check if user is already signed in with Game Service: ${e.message}');
return false;
}
_log.fine('Checked Game Service sign-in status successfully');
return result;
}