mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
custom video aspectRatio
Closes #1040 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
22
lib/plugin/pl_player/models/video_fit_type.dart
Normal file
22
lib/plugin/pl_player/models/video_fit_type.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:flutter/material.dart' show BoxFit;
|
||||
|
||||
enum VideoFitType {
|
||||
fill('拉伸', boxFit: BoxFit.fill),
|
||||
contain('自动', boxFit: BoxFit.contain),
|
||||
cover('裁剪', boxFit: BoxFit.cover),
|
||||
fitWidth('等宽', boxFit: BoxFit.fitWidth),
|
||||
fitHeight('等高', boxFit: BoxFit.fitHeight),
|
||||
none('原始', boxFit: BoxFit.none),
|
||||
scaleDown('限制', boxFit: BoxFit.scaleDown),
|
||||
ratio_4x3('4:3', aspectRatio: 4 / 3),
|
||||
ratio_16x9('16:9', aspectRatio: 16 / 9);
|
||||
|
||||
final String desc;
|
||||
final BoxFit boxFit;
|
||||
final double? aspectRatio;
|
||||
const VideoFitType(
|
||||
this.desc, {
|
||||
this.boxFit = BoxFit.contain,
|
||||
this.aspectRatio,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user