Skip to main content

fl_video 2.0.0 copy "fl_video: ^2.0.0" to clipboard
fl_video: ^2.0.0 copied to clipboard

Adds Material and Cupertino style control panels for the video_player package, with subtitles, playback speed, live and fullscreen support.

example/lib/main.dart

import 'package:app/src/home_page.dart';
import 'package:material_ui/material_ui.dart';

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

/// 示例应用入口:配置 Material 3 明暗主题并管理主题切换。
class FlVideoExampleApp extends StatefulWidget {
  const FlVideoExampleApp({super.key});

  @override
  State<FlVideoExampleApp> createState() => _FlVideoExampleAppState();
}

class _FlVideoExampleAppState extends State<FlVideoExampleApp> {
  /// 主题种子色
  static const Color _seedColor = Color(0xFF4F46E5);

  ThemeMode themeMode = ThemeMode.dark;

  void toggleThemeMode() {
    setState(() {
      themeMode = themeMode == ThemeMode.dark ? ThemeMode.light : ThemeMode.dark;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'fl_video',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: _seedColor)),
      darkTheme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: _seedColor, brightness: Brightness.dark),
      ),
      themeMode: themeMode,
      home: HomePage(onToggleThemeMode: toggleThemeMode),
    );
  }
}
9
likes
140
points
427
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Adds Material and Cupertino style control panels for the video_player package, with subtitles, playback speed, live and fullscreen support.

Repository (GitHub)
View/report issues

Topics

#video #video-player #media #player #ui

License

MIT (license)

Dependencies

cupertino_icons, cupertino_ui, flutter, material_ui, video_player, wakelock_plus

More

Packages that depend on fl_video