From 304bd7c506859483335c133cb4f87aa1a88eda75 Mon Sep 17 00:00:00 2001 From: suragch Date: Fri, 3 Feb 2023 15:45:29 +0800 Subject: [PATCH] update to --- CHANGELOG.md | 1 + example/lib/main.dart | 2 +- lib/audio_video_progress_bar.dart | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2da66c9..f8368eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Bump to stable release versioning - Draw progress bar to match thumb drag location (@navaronbracke) (#34) - Update current progress label while dragging thumb +- Rename `textTheme.bodyText1` to `textTheme.bodyLarge` ## [0.11.0] - October 7, 2022 diff --git a/example/lib/main.dart b/example/lib/main.dart index fc968c0..181bbe3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -255,7 +255,7 @@ class _FullExampleState extends State { } Wrap _labelSizeButtons() { - final fontColor = Theme.of(context).textTheme.bodyText1?.color; + final fontColor = Theme.of(context).textTheme.bodyLarge?.color; return Wrap(children: [ OutlinedButton( child: const Text('standard font size'), diff --git a/lib/audio_video_progress_bar.dart b/lib/audio_video_progress_bar.dart index 334b225..07225a0 100644 --- a/lib/audio_video_progress_bar.dart +++ b/lib/audio_video_progress_bar.dart @@ -243,7 +243,7 @@ class ProgressBar extends LeafRenderObjectWidget { /// The [TextStyle] used by the time labels. /// - /// By default it is [TextTheme.bodyText1]. + /// By default it is [TextTheme.bodyLarge]. final TextStyle? timeLabelTextStyle; /// The extra space between the time labels and the progress bar. @@ -256,7 +256,7 @@ class ProgressBar extends LeafRenderObjectWidget { RenderObject createRenderObject(BuildContext context) { final theme = Theme.of(context); final primaryColor = theme.colorScheme.primary; - final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyText1; + final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge; return _RenderProgressBar( progress: progress, total: total, @@ -287,7 +287,7 @@ class ProgressBar extends LeafRenderObjectWidget { void updateRenderObject(BuildContext context, RenderObject renderObject) { final theme = Theme.of(context); final primaryColor = theme.colorScheme.primary; - final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyText1; + final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyLarge; (renderObject as _RenderProgressBar) ..progress = progress ..total = total