0.6.7 - shows in search, album art resolution

This commit is contained in:
exttex 2020-12-14 18:29:28 +01:00
parent babd12bae2
commit c3a26b0e3b
18 changed files with 369 additions and 28 deletions

View file

@ -1,6 +1,7 @@
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:wakelock/wakelock.dart';
import 'package:flutter/material.dart';
import 'package:audio_service/audio_service.dart';
import 'package:fluttertoast/fluttertoast.dart';
@ -585,6 +586,33 @@ class MenuSheet {
},
);
Widget wakelock() => ListTile(
title: Text('Keep the screen on'.i18n),
leading: Icon(Icons.screen_lock_portrait),
onTap: () async {
_close();
if (cache.wakelock == null)
cache.wakelock = false;
//Enable
if (!cache.wakelock) {
Wakelock.enable();
Fluttertoast.showToast(
msg: 'Wakelock enabled!'.i18n,
gravity: ToastGravity.BOTTOM
);
cache.wakelock = true;
return;
}
//Disable
Wakelock.disable();
Fluttertoast.showToast(
msg: 'Wakelock disabled!'.i18n,
gravity: ToastGravity.BOTTOM
);
cache.wakelock = false;
},
);
void _close() => Navigator.of(context).pop();
}