customized_video_player 0.0.1

  • Readme
  • Changelog
  • Installing
  • new36

customizedvideoplayer #

一个可定制样式的 Flutter video_player

安装(Installation) #

在你的pubspec.yaml中添加 customized_video_player 依赖
First, add customized_video_player as a dependency in your pubspec.yaml file.

实例(Example) #

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

void main() => runApp(VideoApp());

class Video extends StatefulWidget {
  @override
  _VideoState createState() => _VideoState();
}

class _VideoState extends State<Video> {
  String url = 'http://vfx.mtime.cn/Video/2019/03/18/mp4/190318231014076505.mp4';

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      home: Scaffold(
        body: Center(
          child: Video(
            url: url
          ),
        ),
      ),
    );
  }
  // 视频状态监听回调函数
  videoCallback(_chewieController) {
    if (!_chewieController.isFullScreen) {
     // 如果不是全屏情况
     print('_chewieController.isFullScreen');
   }
  }

  @override
  void dispose() {
    super.dispose();
  }
}

[0.0.1] - TODO: Add release date. #

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  customized_video_player: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:customized_video_player/customized_video_player.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
95
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
40
Overall:
Weighted score of the above. [more]
36
Learn more about scoring.

We analyzed this package on Jul 9, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:customized_video_player/customized_video_player.dart, package:customized_video_player/cupertino_controls.dart, package:video_player/video_player.dart] that declares support for platforms: android, ios, web

Package does not support Flutter platform macos

Because of import path [package:customized_video_player/customized_video_player.dart, package:customized_video_player/cupertino_controls.dart, package:video_player/video_player.dart] that declares support for platforms: android, ios, web

Package does not support Flutter platform web

Because of import path [package:customized_video_player/customized_video_player.dart, package:customized_video_player/cupertino_controls.dart, package:chewie/src/chewie_player.dart, package:wakelock/wakelock.dart] that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because of import path [package:customized_video_player/customized_video_player.dart, package:customized_video_player/cupertino_controls.dart, package:video_player/video_player.dart] that declares support for platforms: android, ios, web

Package not compatible with SDK dart

because of import path [customized_video_player] that is in a package requiring null.

Health suggestions

Fix lib/cupertino_controls.dart. (-1.99 points)

Analysis of lib/cupertino_controls.dart reported 4 hints:

line 5 col 8: Don't import implementation files from another package.

line 6 col 8: Don't import implementation files from another package.

line 7 col 8: Don't import implementation files from another package.

line 8 col 8: Don't import implementation files from another package.

Fix lib/material_controls.dart. (-1.99 points)

Analysis of lib/material_controls.dart reported 4 hints:

line 3 col 8: Don't import implementation files from another package.

line 4 col 8: Don't import implementation files from another package.

line 5 col 8: Don't import implementation files from another package.

line 6 col 8: Don't import implementation files from another package.

Fix lib/customized_video_player.dart. (-1.49 points)

Analysis of lib/customized_video_player.dart reported 3 hints:

line 2 col 8: Unused import: 'dart:async'.

line 3 col 8: Unused import: 'dart:io'.

line 36 col 7: This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: Video.url, Video.aspectRatio, Video.autoInitialize, Video.autoPlay, Video.startAt, Video.looping, Video.fullScreenByDefault, Video.showControlsOnInitialize, Video.showControls, Video.allowMuting, Video.allowFullScreen, Video.allowedScreenSleep, Video.isLive, Video.onlyMaterial, Video.playedColor, Video.handleColor, Video.backgroundColor, Video.bufferedColor

Maintenance issues and suggestions

The description contains too many non-ASCII characters. (-20 points)

The site uses English as its primary language. The value of the description field in your package's pubspec.yaml field should primarily contain characters used in English.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and customized_video_player.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
chewie ^0.9.10 0.9.10
flutter 0.0.0
open_iconic_flutter ^0.3.0 0.3.0
video_player ^0.10.11+1 0.10.11+2
Transitive dependencies
collection 1.14.12 1.14.13
flutter_web_plugins 0.0.0
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
video_player_platform_interface 2.0.2
video_player_web 0.1.3+2
wakelock 0.1.4+2
Dev dependencies
flutter_test