utils/crdt_sync_flutter/lib/src/google_platform_io.dart
Krzysztof kuhy Rudnicki 0f332c9057
Some checks are pending
crdt_sync_flutter tests / test (push) Waiting to run
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
crdt_sync_flutter 0.4.0: AccountManager sign-in
Android now uses google_account_token (no googleid or
play-services-auth). Desktop PKCE sends client_secret.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWY1k4muZfdVJfb7YGJ
2026-11-02 10:42:52 +01:00

20 lines
843 B
Dart

/// Whether the programmatic Google sign-in flow exists on this platform.
///
/// The io half. The flow is the `google_account_token` plugin, which wraps the
/// framework AccountManager and therefore exists on Android only. Every other
/// `dart:io` platform (Linux, Windows, macOS) reaches Google through the
/// loopback flow instead.
library;
import 'package:google_account_token/google_account_token.dart';
/// True where the one-tap AccountManager flow exists: Android.
///
/// Asks the plugin rather than `Platform.isAndroid` so the two can never
/// disagree about where a token can be produced.
bool get googleSignInSupported => googleAccountTokenSupported;
/// Whether the loopback sign-in flow can run: it needs a bindable socket and
/// a system browser, which every `dart:io` platform has.
bool get hasLoopbackBrowser => true;