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

The vk_video package provides a simple and efficient way to integrate VK Video playback into your Flutter applications. With support for the VK Video API, this package allows you to easily embed and c [...]

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 provides a simple and efficient way to integrate VK Video playback into your Flutter applications. With support for the VK Video API, this package allows you to easily embed and control VK videos, enabling seamless media experiences within your app.

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