mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-02 17:18:13 +08:00
@@ -321,37 +321,27 @@ class _EagerHorizontalDragGestureRecognizer
|
||||
class RenderProgressBar extends RenderBox implements MouseTrackerAnnotation {
|
||||
RenderProgressBar({
|
||||
required Duration progress,
|
||||
required Duration total,
|
||||
required Duration buffered,
|
||||
ValueChanged<Duration>? onSeek,
|
||||
required this._total,
|
||||
required this._buffered,
|
||||
this._onSeek,
|
||||
ThumbDragStartCallback? onDragStart,
|
||||
ThumbDragUpdateCallback? onDragUpdate,
|
||||
VoidCallback? onDragEnd,
|
||||
required double barHeight,
|
||||
required Color baseBarColor,
|
||||
required Color progressBarColor,
|
||||
required Color bufferedBarColor,
|
||||
required this._barHeight,
|
||||
required this._baseBarColor,
|
||||
required this._progressBarColor,
|
||||
required this._bufferedBarColor,
|
||||
double thumbRadius = 20.0,
|
||||
required Color thumbColor,
|
||||
required Color thumbGlowColor,
|
||||
required this._thumbColor,
|
||||
required this._thumbGlowColor,
|
||||
double thumbGlowRadius = 30.0,
|
||||
bool thumbCanPaintOutsideBar = true,
|
||||
}) : _total = total,
|
||||
_buffered = buffered,
|
||||
_onSeek = onSeek,
|
||||
_onDragStartUserCallback = onDragStart,
|
||||
this._thumbCanPaintOutsideBar = true,
|
||||
}) : _onDragStartUserCallback = onDragStart,
|
||||
_onDragUpdateUserCallback = onDragUpdate,
|
||||
_onDragEndUserCallback = onDragEnd,
|
||||
_barHeight = barHeight,
|
||||
_baseBarColor = baseBarColor,
|
||||
_progressBarColor = progressBarColor,
|
||||
_bufferedBarColor = bufferedBarColor,
|
||||
_thumbRadius = thumbRadius,
|
||||
_thumbColor = thumbColor,
|
||||
_thumbGlowColor = thumbGlowColor,
|
||||
_thumbGlowRadius = thumbGlowRadius,
|
||||
_paintThumbGlow = thumbGlowRadius > thumbRadius,
|
||||
_thumbCanPaintOutsideBar = thumbCanPaintOutsideBar,
|
||||
_hitTestSelf = onDragStart != null {
|
||||
if (onDragStart != null) {
|
||||
_drag = _EagerHorizontalDragGestureRecognizer()
|
||||
|
||||
@@ -353,10 +353,9 @@ abstract class BaseSegmentProgressBar<T extends BaseSegment>
|
||||
|
||||
class BaseRenderProgressBar<T extends BaseSegment> extends RenderBox {
|
||||
BaseRenderProgressBar({
|
||||
required double height,
|
||||
required List<T> segments,
|
||||
}) : _height = height,
|
||||
_segments = segments;
|
||||
required this._height,
|
||||
required this._segments,
|
||||
});
|
||||
|
||||
double _height;
|
||||
double get height => _height;
|
||||
|
||||
@@ -60,16 +60,12 @@ class VideoProgressIndicator extends LeafRenderObjectWidget {
|
||||
|
||||
class RenderProgressBar extends RenderBox {
|
||||
RenderProgressBar({
|
||||
required Color color,
|
||||
required Color backgroundColor,
|
||||
required double radius,
|
||||
required double height,
|
||||
required double progress,
|
||||
}) : _color = color,
|
||||
_backgroundColor = backgroundColor,
|
||||
_radius = radius,
|
||||
_height = height,
|
||||
_progress = progress;
|
||||
required this._color,
|
||||
required this._backgroundColor,
|
||||
required this._radius,
|
||||
required this._height,
|
||||
required this._progress,
|
||||
});
|
||||
|
||||
Color _color;
|
||||
Color get color => _color;
|
||||
|
||||
Reference in New Issue
Block a user