Перейти к содержимому

freedome_flutter

Это содержимое пока не доступно на вашем языке.

Flutter glue for freedome_client: the platform pieces a Flutter app needs to keep a dome connection healthy.

Piece Port it implements Backed by
SecureTokenStore, SecurePinStore TokenStore, PinStore flutter_secure_storage (Keychain / Keystore / libsecret)
PrefsCacheStore, PrefsOutboxStore CacheStore, OutboxStore shared_preferences (small JSON only)
BonsoirDomeDiscovery DomeDiscovery (_freedome._tcp) bonsoir (Bonjour / NSD)
FreedomeLifecycleBinding network + foreground / background → networkAvailable / networkLost / enterBackground / resume connectivity_plus, WidgetsBindingObserver
import 'package:flutter/widgets.dart' hide ConnectionState; // freedome_client has its own ConnectionState
import 'package:freedome_client/freedome_client.dart';
import 'package:freedome_flutter/freedome_flutter.dart';
final domes = await BonsoirDomeDiscovery().scan();
final client = FreedomeClient(
endpoint: domes.first.endpoint,
credentials: const PairingCredentials(app: 'net.nativemind.myapp', deviceName: 'Phone'),
tokenStore: SecureTokenStore(),
pinStore: SecurePinStore(),
cache: PrefsCacheStore(),
outbox: PrefsOutboxStore(),
);
final lifecycle = FreedomeLifecycleBinding(client);
await client.open();

iOS (ios/Runner/Info.plist) — local network permission and the Bonjour type:

<key>NSLocalNetworkUsageDescription</key>
<string>Finds Freedome domes on your network.</string>
<key>NSBonjourServices</key>
<array>
<string>_freedome._tcp</string>
</array>

macOS (macos/Runner/*.entitlements): com.apple.security.network.client = true (and the same Info.plist keys).

Android (android/app/src/main/AndroidManifest.xml):

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Bonsoir uses NsdManager, which needs no multicast lock. Domes on a plain-HTTP LAN endpoint additionally need a network-security config that allows cleartext to the dome’s address (or TLS with a pinned certificate, preferred).

Linux: libsecret-1-dev for the secure store; Avahi for discovery.

Licence: NativeMindNONC (see LICENSE); commercial use → NativeMind sales. Support: [email protected].