simple_player 1.0.3 copy "simple_player: ^1.0.3" to clipboard
simple_player: ^1.0.3 copied to clipboard

outdated

Package for simplified video playback.

example/lib/main.dart

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

void main() {
  runApp(const MaterialApp(
    debugShowCheckedModeBanner: false,
    home: MyHomePage(),
  ));
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String url =
      'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4';

  @override
  Widget build(BuildContext context) {
    double width = MediaQuery.of(context).size.width;
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: const Text('Simple Example'),
        backgroundColor: Colors.grey,
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Container(
              color: Colors.blue,
              height: 200,
            ),
            SizedBox(
              width: width * 1,
              child: SimplePlayer.build(
                simplePlayerSettings: SimplePlayerSettings(
                    simplePathType: SimplePathType.network(url: url),
                    label: 'Bee',
                    aspectRatio: 16 / 9,
                    autoPlay: false,
                    loopMode: false,
                    colorAccent: Colors.amber[600]),
              ),
            ),
            Container(
              color: Colors.amber,
              height: 200,
            ),
            Container(
              color: Colors.red,
              height: 200,
            ),
            Container(
              color: Colors.purple,
              height: 200,
            ),
            Container(
              color: Colors.blue,
              height: 200,
            ),
          ],
        ),
      ),
    );
  }
}
6
likes
0
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

Package for simplified video playback.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, screen_brightness, snapping_sheet, video_player

More

Packages that depend on simple_player