0.6.11 - noone cares or reads this anyway, the repo is for issues, and the code so bad, it's practically obfuscated
This commit is contained in:
parent
9f850a6f30
commit
aa7f82b399
11 changed files with 111 additions and 31 deletions
|
|
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:audio_service/audio_service.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/screenutil.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:freezer/api/cache.dart';
|
||||
import 'package:freezer/api/deezer.dart';
|
||||
import 'package:freezer/api/download.dart';
|
||||
|
|
@ -379,6 +380,18 @@ class _PlayerScreenVerticalState extends State<PlayerScreenVertical> {
|
|||
updateColor();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.file_download),
|
||||
onPressed: () async {
|
||||
Track t = Track.fromMediaItem(AudioService.currentMediaItem);
|
||||
if (await downloadManager.addOfflineTrack(t, private: false, context: context, isSingleton: true) != false)
|
||||
Fluttertoast.showToast(
|
||||
msg: 'Downloads added!'.i18n,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastLength: Toast.LENGTH_SHORT
|
||||
);
|
||||
},
|
||||
),
|
||||
QualityInfoWidget(),
|
||||
RepeatButton(ScreenUtil().setWidth(46)),
|
||||
PlayerMenuButton()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue