flutter_to_airplay 2.0.5 copy "flutter_to_airplay: ^2.0.5" to clipboard
flutter_to_airplay: ^2.0.5 copied to clipboard

PlatformiOS

Flutter plugin that offers two widgets, one to play a video for given url or file path using native AVPlayer and second with an option to airplay it on available Apple devices.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_to_airplay_example/customIcon/custom_icon_view.dart';
import 'package:flutter_to_airplay_example/pickFromFile/pick_from_file_view.dart';
import 'package:flutter_to_airplay_example/pickFromURL/pick_from_url_view.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter 2 Airplay'),
        ),
        body: SafeArea(
          child: Container(
            // height: MediaQuery.of(context).size.height,
            // width: MediaQuery.of(context).size.width,
            child: ListView.builder(
              itemCount: 3,
              itemBuilder: (context, index) {
                switch (index) {
                  case 0:
                    return ListTile(
                      onTap: () => Navigator.push(
                        context,
                        MaterialPageRoute(
                          builder: (context) => PickFromFileView(),
                        ),
                      ),
                      title: Text('Video from File'),
                      trailing: Icon(Icons.chevron_right),
                    );
                  case 1:
                    return ListTile(
                      onTap: () => Navigator.push(
                        context,
                        MaterialPageRoute(
                          builder: (context) => PickFromURLView(),
                        ),
                      ),
                      title: Text('Video from URL'),
                      trailing: Icon(Icons.chevron_right),
                    );
                  case 2:
                    return ListTile(
                      onTap: () => Navigator.push(
                        context,
                        MaterialPageRoute(
                          builder: (context) => CustomIconView(),
                        ),
                      ),
                      title: Text('Custom Icon'),
                      trailing: Icon(Icons.chevron_right),
                    );
                  default:
                    return null;
                }
              },
            ),
          ),
        ),
      ),
    );
  }
}
37
likes
150
pub points
92%
popularity

Publisher

unverified uploader

Flutter plugin that offers two widgets, one to play a video for given url or file path using native AVPlayer and second with an option to airplay it on available Apple devices.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_to_airplay