0.6.7 - shows in search, album art resolution
This commit is contained in:
parent
babd12bae2
commit
c3a26b0e3b
18 changed files with 369 additions and 28 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue