mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: tweaks opt: publish page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
29 lines
725 B
Dart
29 lines
725 B
Dart
import 'package:PiliPlus/common/constants.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
Widget videoProgressIndicator(double progress) => ClipRect(
|
|
clipper: ProgressClipper(),
|
|
child: ClipRRect(
|
|
borderRadius: const BorderRadius.only(
|
|
bottomLeft: StyleString.imgRadius,
|
|
bottomRight: StyleString.imgRadius,
|
|
),
|
|
child: LinearProgressIndicator(
|
|
minHeight: 10,
|
|
value: progress,
|
|
),
|
|
),
|
|
);
|
|
|
|
class ProgressClipper extends CustomClipper<Rect> {
|
|
@override
|
|
Rect getClip(Size size) {
|
|
return Rect.fromLTWH(0, 6, size.width, size.height - 6);
|
|
}
|
|
|
|
@override
|
|
bool shouldReclip(CustomClipper<Rect> oldClipper) {
|
|
return false;
|
|
}
|
|
}
|