From 267e898e0c6455292ea759278f2df95d146ad9d1 Mon Sep 17 00:00:00 2001 From: kilowatt Date: Sun, 25 Oct 2020 12:47:56 +0300 Subject: [PATCH] Fix player UI for uploaded MP3s --- lib/ui/player_bar.dart | 2 +- lib/ui/player_screen.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/player_bar.dart b/lib/ui/player_bar.dart index e10e6b1..61cf65b 100644 --- a/lib/ui/player_bar.dart +++ b/lib/ui/player_bar.dart @@ -70,7 +70,7 @@ class PlayerBar extends StatelessWidget { maxLines: 1, ), subtitle: Text( - AudioService.currentMediaItem.displaySubtitle, + AudioService.currentMediaItem.displaySubtitle ?? '', overflow: TextOverflow.clip, maxLines: 1, ), diff --git a/lib/ui/player_screen.dart b/lib/ui/player_screen.dart index 53e16fb..dfb016e 100644 --- a/lib/ui/player_screen.dart +++ b/lib/ui/player_screen.dart @@ -152,7 +152,7 @@ class _PlayerScreenHorizontalState extends State { ), Container(height: 4,), Text( - AudioService.currentMediaItem.displaySubtitle, + AudioService.currentMediaItem.displaySubtitle ?? '', maxLines: 1, textAlign: TextAlign.center, overflow: TextOverflow.clip, @@ -280,7 +280,7 @@ class _PlayerScreenVerticalState extends State { ), Container(height: 4,), Text( - AudioService.currentMediaItem.displaySubtitle, + AudioService.currentMediaItem.displaySubtitle ?? '', maxLines: 1, textAlign: TextAlign.center, overflow: TextOverflow.clip,