Skip to content

rohanjsh/flutter-cast-airplay-android-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Pitcher (Fluttercon India 2025)

A Flutter app for casting media to Chromecast and AirPlay devices. Discover devices, connect, and control playback with a simple media player UI.

Features

  • Device Discovery - Scan for Chromecast and AirPlay devices on your network
  • Chromecast Support - Full Google Cast SDK integration (Android & iOS)
  • AirPlay Support - Native AVPlayer-based AirPlay streaming (iOS)
  • Audio/Video - Toggle between audio and video casting modes
  • Transport Controls - Play, pause, seek, skip, and volume control

📋 TODOs Checklist

Complete these 11 TODOs to build a fully functional casting app:

Platform File Description
1 Flutter cast_repository.dart Register this class to receive native callbacks
2 iOS AppDelegate.swift Complete the Pigeon bridge setup
3 Android MainActivity.kt Complete the Pigeon bridge setup
4 iOS AirPlayProvider.swift Enable AirPlay route detection
5 Android GoogleCastProvider.kt Notify Flutter when Chromecast devices are discovered
6 iOS GoogleCastProvider.swift Notify Flutter when Chromecast devices are discovered
7 Android GoogleCastProvider.kt Handle successful Chromecast connection
8 iOS GoogleCastProvider.swift Handle successful Chromecast connection
9 iOS AirPlayProvider.swift Enable AirPlay on AVPlayer
10 Android GoogleCastProvider.kt Load media onto the Chromecast
11 iOS GoogleCastProvider.swift Load media onto the Chromecast

Architecture

The app uses Pigeon for type-safe Flutter ↔ Native communication with layered architecture.

Android Native Layer

android-layer

iOS Native Layer

ios-layer

Flutter & Pigeon Communication

flutter-layer

Getting Started

# Install dependencies
flutter pub get

# Run on device (requires physical device for cast)
flutter run

Project Structure

lib/
├── main.dart                    # App entry point
└── src/
    ├── cast/                    # Cast domain & data layer
    │   ├── data/                # Repository + Pigeon API
    │   └── domain/              # State models + errors
    ├── core/                    # Shared utilities
    └── presentation/            # UI + Controller

android/.../cast/                # Kotlin Cast implementation
ios/Runner/Cast/                 # Swift Cast implementation
pigeons/cast_api.dart            # Pigeon interface definition

About

Flutter app for casting media to Chromecast and AirPlay devices

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors