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

outdated

SimplePlayer offers all the essential tools for viewing videos in your mobile applications in a simplified way!

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,
            ),
            SimplePlayer.build(
              simplePlayerSettings: SimplePlayerSettings.network(
                path: url,
                label: 'Bee',
                aspectRatio: 16 / 9,
                autoPlay: false,
                loopMode: false,
                forceAspectRatio: false,
                colorAccent: Colors.red,
              ),
            ),
            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

SimplePlayer offers all the essential tools for viewing videos in your mobile applications in a simplified way!

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, screen_brightness, snapping_sheet, video_player

More

Packages that depend on simple_player