mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -96,6 +96,7 @@ class ProgressBar extends LeafRenderObjectWidget {
|
||||
this.timeLabelType,
|
||||
this.timeLabelTextStyle,
|
||||
this.timeLabelPadding = 0.0,
|
||||
this.textScaleFactor = 1.0,
|
||||
});
|
||||
|
||||
/// The elapsed playing time of the media.
|
||||
@@ -252,12 +253,13 @@ class ProgressBar extends LeafRenderObjectWidget {
|
||||
/// the progress bar and a negative number will move them closer.
|
||||
final double timeLabelPadding;
|
||||
|
||||
final double textScaleFactor;
|
||||
|
||||
@override
|
||||
RenderObject createRenderObject(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final primaryColor = theme.colorScheme.primary;
|
||||
final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge;
|
||||
final textScaleFactor = MediaQuery.textScalerOf(context).scale(1);
|
||||
return _RenderProgressBar(
|
||||
progress: progress,
|
||||
total: total,
|
||||
@@ -291,7 +293,6 @@ class ProgressBar extends LeafRenderObjectWidget {
|
||||
final theme = Theme.of(context);
|
||||
final primaryColor = theme.colorScheme.primary;
|
||||
final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge;
|
||||
final textScaleFactor = MediaQuery.textScalerOf(context).scale(1);
|
||||
(renderObject as _RenderProgressBar)
|
||||
..total = total
|
||||
..progress = progress
|
||||
|
||||
Reference in New Issue
Block a user