Text styling, download fix, small bugs
This commit is contained in:
parent
109fc6f54b
commit
6f250df004
8 changed files with 110 additions and 48 deletions
|
@ -543,6 +543,10 @@ class Download {
|
|||
'cover': _cover,
|
||||
'trackNumber': track.trackNumber
|
||||
});
|
||||
//Rescan android library
|
||||
await platformChannel.invokeMethod('rescanLibrary', {
|
||||
'path': path
|
||||
});
|
||||
}
|
||||
//Remove encrypted
|
||||
await File(path + '.ENC').delete();
|
||||
|
|
|
@ -78,6 +78,7 @@ class Settings {
|
|||
accentColor: primaryColor,
|
||||
sliderTheme: _sliderTheme,
|
||||
toggleableActiveColor: primaryColor,
|
||||
bottomAppBarColor: Color(0xfff7f7f7)
|
||||
);
|
||||
case Themes.Dark:
|
||||
return ThemeData(
|
||||
|
|
|
@ -129,7 +129,7 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||
"Please login using your Deezer account.",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
fontSize: 16.0
|
||||
),
|
||||
),
|
||||
Container(height: 16.0,),
|
||||
|
@ -183,7 +183,7 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||
"If you don't have account, you can register on deezer.com for free.",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
fontSize: 16.0
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
@ -202,7 +202,7 @@ class _LoginWidgetState extends State<LoginWidget> {
|
|||
"By using this app, you don't agree with the Deezer ToS",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0
|
||||
fontSize: 16.0
|
||||
),
|
||||
)
|
||||
],
|
||||
|
|
|
@ -25,31 +25,34 @@ class PlayerBar extends StatelessWidget {
|
|||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
onTap: () => Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => PlayerScreen())),
|
||||
leading: CachedImage(
|
||||
width: 50,
|
||||
height: 50,
|
||||
url: AudioService.currentMediaItem.artUri,
|
||||
),
|
||||
title: Text(
|
||||
AudioService.currentMediaItem.displayTitle,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1,
|
||||
),
|
||||
subtitle: Text(
|
||||
AudioService.currentMediaItem.displaySubtitle,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1,
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
PrevNextButton(iconSize, prev: true, hidePrev: true,),
|
||||
PlayPauseButton(iconSize),
|
||||
PrevNextButton(iconSize)
|
||||
],
|
||||
)
|
||||
Container(
|
||||
color: Theme.of(context).bottomAppBarColor,
|
||||
child: ListTile(
|
||||
onTap: () => Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => PlayerScreen())),
|
||||
leading: CachedImage(
|
||||
width: 50,
|
||||
height: 50,
|
||||
url: AudioService.currentMediaItem.artUri,
|
||||
),
|
||||
title: Text(
|
||||
AudioService.currentMediaItem.displayTitle,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1,
|
||||
),
|
||||
subtitle: Text(
|
||||
AudioService.currentMediaItem.displaySubtitle,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1,
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
PrevNextButton(iconSize, prev: true, hidePrev: true,),
|
||||
PlayPauseButton(iconSize),
|
||||
PrevNextButton(iconSize)
|
||||
],
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 3.0,
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:freezer/ui/menu.dart';
|
|||
import 'package:freezer/ui/settings_screen.dart';
|
||||
import 'package:freezer/ui/tiles.dart';
|
||||
import 'package:async/async.dart';
|
||||
import 'package:marquee/marquee.dart';
|
||||
|
||||
import 'cached_image.dart';
|
||||
import '../api/definitions.dart';
|
||||
|
@ -115,15 +116,29 @@ class _PlayerScreenHorizontalState extends State<PlayerScreenHorizontal> {
|
|||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
AudioService.currentMediaItem.displayTitle,
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.center,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
fontSize: ScreenUtil().setSp(40),
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
Container(
|
||||
height: ScreenUtil().setSp(40),
|
||||
child: AudioService.currentMediaItem.displayTitle.length >= 22 ?
|
||||
Marquee(
|
||||
text: AudioService.currentMediaItem.displayTitle,
|
||||
style: TextStyle(
|
||||
fontSize: ScreenUtil().setSp(40),
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
blankSpace: 32.0,
|
||||
startPadding: 10.0,
|
||||
accelerationDuration: Duration(seconds: 1),
|
||||
pauseAfterRound: Duration(seconds: 2),
|
||||
):
|
||||
Text(
|
||||
AudioService.currentMediaItem.displayTitle,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: ScreenUtil().setSp(40),
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
)
|
||||
),
|
||||
Container(height: 4,),
|
||||
Text(
|
||||
|
@ -241,15 +256,29 @@ class _PlayerScreenVerticalState extends State<PlayerScreenVertical> {
|
|||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
AudioService.currentMediaItem.displayTitle,
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.center,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
Container(
|
||||
height: ScreenUtil().setSp(64),
|
||||
child: AudioService.currentMediaItem.displayTitle.length >= 24 ?
|
||||
Marquee(
|
||||
text: AudioService.currentMediaItem.displayTitle,
|
||||
style: TextStyle(
|
||||
fontSize: ScreenUtil().setSp(64),
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
),
|
||||
blankSpace: 32.0,
|
||||
startPadding: 10.0,
|
||||
accelerationDuration: Duration(seconds: 1),
|
||||
pauseAfterRound: Duration(seconds: 2),
|
||||
):
|
||||
Text(
|
||||
AudioService.currentMediaItem.displayTitle,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: ScreenUtil().setSp(64),
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
)
|
||||
),
|
||||
Container(height: 4,),
|
||||
Text(
|
||||
|
@ -338,6 +367,7 @@ class _LyricsWidgetState extends State<LyricsWidget> {
|
|||
Timer _timer;
|
||||
int _currentIndex;
|
||||
double _boxHeight;
|
||||
double _lyricHeight = 128;
|
||||
String _trackId;
|
||||
|
||||
Future _load() async {
|
||||
|
@ -380,7 +410,7 @@ class _LyricsWidgetState extends State<LyricsWidget> {
|
|||
//Scroll to current lyric
|
||||
if (_currentIndex <= 0) return;
|
||||
_scrollController.animateTo(
|
||||
(_boxHeight * _currentIndex),
|
||||
(_lyricHeight * _currentIndex) + (_lyricHeight / 2) - (_boxHeight / 2),
|
||||
duration: Duration(milliseconds: 250),
|
||||
curve: Curves.ease
|
||||
);
|
||||
|
@ -425,7 +455,7 @@ class _LyricsWidgetState extends State<LyricsWidget> {
|
|||
child: Column(
|
||||
children: List.generate(_l.lyrics.length, (i) {
|
||||
return Container(
|
||||
height: _boxHeight,
|
||||
height: _lyricHeight,
|
||||
child: Center(
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
|
@ -433,7 +463,7 @@ class _LyricsWidgetState extends State<LyricsWidget> {
|
|||
_l.lyrics[i].text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 36.0,
|
||||
fontSize: 28.0,
|
||||
fontWeight: (_currentIndex == i)?FontWeight.bold:FontWeight.normal,
|
||||
foreground: Paint()
|
||||
..strokeWidth = 6
|
||||
|
@ -446,7 +476,7 @@ class _LyricsWidgetState extends State<LyricsWidget> {
|
|||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: _textColor,
|
||||
fontSize: 36.0,
|
||||
fontSize: 28.0,
|
||||
fontWeight: (_currentIndex == i)?FontWeight.bold:FontWeight.normal
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue