flutube 0.5.2 copy "flutube: ^0.5.2" to clipboard
flutube: ^0.5.2 copied to clipboard

discontinued
outdated

Flutter plugin that facilitates the embed of YT videos without using the official YT API.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutube/flutube.dart';

void main() => runApp(MaterialApp(
  home: MyApp(),
));

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  final _ytURL = 'https://www.youtube.com/watch?v=fq4N0hgOWzU';
  String stateText;

  @override
  void initState() {
    stateText = "Video not started";
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('FluTube Test'),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Text('Youtube video URL: $_ytURL', style: TextStyle(fontSize: 16.0),),
            FluTube(
              _ytURL,
              autoInitialize: true,
              aspectRatio: 16 / 9,
              onVideoStart: () {
                setState(() {
                  stateText = 'Video started playing!';
                });
              },
              onVideoEnd: () {
                setState(() {
                  stateText = 'Video ended playing!';
                });
              },
            ),
            Text(stateText),
          ],
        ),
      ),
    );
  }
}
11
likes
0
pub points
50%
popularity

Publisher

unverified uploader

Flutter plugin that facilitates the embed of YT videos without using the official YT API.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

chewie, flutter, http, open_iconic_flutter

More

Packages that depend on flutube