kraken_video_player 1.0.0 copy "kraken_video_player: ^1.0.0" to clipboard
kraken_video_player: ^1.0.0 copied to clipboard

outdated

Kraken video player plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:kraken_video_player/kraken_video_player.dart';
import 'package:kraken/kraken.dart';

void main() {
  KrakenVideoPlayer.initialize();
  runApp(MaterialApp(
    title: 'Navigation Basics',
    home: FirstRoute(),
  ));
}

class FirstRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('First Route'),
      ),
      body: Center(
        child: RaisedButton(
          child: Text('Open route'),
          onPressed: () {
            Navigator.push(
              context,
              MaterialPageRoute(builder: (context) => SecondRoute()),
            );
          },
        ),
      ),
    );
  }
}

class SecondRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("Second Route"),
        ),
        body: Wrap(
          children: <Widget>[
            MyHomePage(
              title: 'Flutter Demo Page',
            )
          ],
        ));
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Kraken(
      bundlePath: 'assets/bundle.js',
    );
  }
}
1
likes
0
pub points
0%
popularity

Publisher

verified publisheropenkraken.com

Kraken video player plugin.

Homepage

License

unknown (license)

Dependencies

flutter, kraken, meta

More

Packages that depend on kraken_video_player