vk_video 0.0.5 copy "vk_video: ^0.0.5" to clipboard
vk_video: ^0.0.5 copied to clipboard

The vk_video package simplifies the integration of VK video playback into your Flutter apps. It supports the VK Video API, allowing easy embedding and control for a seamless media experience.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'vk_video Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  VKVideoController? _controller;

  @override
  void initState() {
    _controller = VKVideoController();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: ListView(
          children: <Widget>[
            VKVideo(
              controller: _controller,
              videoOId: '-22822305',
              videoId: '456241864',
              isAutoPlay: false,
              videoResolutionEnum: VideoResolutionEnum.p480,
            ),
            TextButton(
              onPressed: () {
                _controller?.onPlay.call();
              },
              child: Text("play"),
            ),

            TextButton(
              onPressed: () {
                _controller?.onPause.call();
              },
              child: Text("pause"),
            ),
          ],
        ),
      ),
    );
  }
}
4
likes
0
points
74
downloads

Publisher

verified publisherrony.fun

Weekly Downloads

The vk_video package simplifies the integration of VK video playback into your Flutter apps. It supports the VK Video API, allowing easy embedding and control for a seamless media experience.

Homepage
Repository (GitHub)
View/report issues

Topics

#vk #vk-video #player #video

License

unknown (license)

Dependencies

flutter, flutter_inappwebview

More

Packages that depend on vk_video