flutter_tvos library

Platform detection and utilities for Flutter apps on Apple TV (tvOS).

This package provides synchronous runtime checks via dart:ffi to determine if the app is running on tvOS, along with device information and capability queries. All calls are zero-overhead — no async, no platform channels.

import 'package:flutter_tvos/flutter_tvos.dart';

if (TvOSInfo.isTvOS) {
  print('Running on tvOS ${TvOSInfo.tvOSVersion}');
  print('Device: ${TvOSInfo.deviceModel} (${TvOSInfo.machineId})');
  print('Simulator: ${TvOSInfo.isSimulator}');
  print('Resolution: ${TvOSInfo.displayResolution}');
}

Classes

FlutterTvosPlatform
Cheap, synchronous tvOS detection that mirrors the style of Platform.isIOS, Platform.isAndroid, etc.
SwipeEvent
A single swipe emitted by SwipeDetector.
TvOSInfo
Provides runtime information about the tvOS platform.
TvOSNativeBindings
FFI bindings stub for Web. No native symbols are available.
TvRemoteConfig
Runtime configuration for TvRemoteController.
TvRemoteController
Dart-side companion to the native FlutterTvRemotePlugin.
TvRemoteTouchEvent
A single raw touch event from the Siri Remote touchpad, exposed for advanced consumers via TvRemoteController.addRawListener.

Enums

SwipeDirection
Direction derived from a swipe gesture on the Siri Remote touchpad.
TvRemoteTouchPhase
Phase of a TvRemoteTouchEvent. Mirrors the native channel protocol.

Extensions

FlutterTvosPlatformExt on Platform
Extension on a Platform instance that adds tvOS-aware getters.

Typedefs

SwipeListener = void Function(SwipeEvent event)
Signature for aggregated swipe-event listeners. Receives a SwipeEvent each time accumulated touchpad motion crosses shortSwipeThreshold from TvRemoteConfig. Independent from TvRemoteTouchListener — both fire in parallel for the same gesture.
TvRemoteTouchListener = void Function(TvRemoteTouchEvent event)
Signature for raw touch event listeners.