minor fixes
This commit is contained in:
parent
9cfa76c253
commit
1a997be925
3 changed files with 7 additions and 5 deletions
|
@ -217,6 +217,8 @@ class ImageEntry {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get canPrint => !isVideo;
|
||||||
|
|
||||||
bool get canRotate => mimeType == MimeTypes.MIME_JPEG || mimeType == MimeTypes.MIME_PNG;
|
bool get canRotate => mimeType == MimeTypes.MIME_JPEG || mimeType == MimeTypes.MIME_PNG;
|
||||||
|
|
||||||
Future<bool> rotate({@required bool clockwise}) async {
|
Future<bool> rotate({@required bool clockwise}) async {
|
||||||
|
|
|
@ -12,7 +12,6 @@ class AChangeNotifier implements Listenable {
|
||||||
|
|
||||||
void dispose() => _listeners = null;
|
void dispose() => _listeners = null;
|
||||||
|
|
||||||
@protected
|
|
||||||
void notifyListeners() {
|
void notifyListeners() {
|
||||||
if (_listeners == null) return;
|
if (_listeners == null) return;
|
||||||
final localListeners = List<VoidCallback>.from(_listeners);
|
final localListeners = List<VoidCallback>.from(_listeners);
|
||||||
|
|
|
@ -76,6 +76,7 @@ class FullscreenTopOverlay extends StatelessWidget {
|
||||||
value: FullscreenAction.rotateCW,
|
value: FullscreenAction.rotateCW,
|
||||||
child: MenuRow(text: 'Rotate right', icon: Icons.rotate_right),
|
child: MenuRow(text: 'Rotate right', icon: Icons.rotate_right),
|
||||||
),
|
),
|
||||||
|
if (entry.canPrint)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
value: FullscreenAction.print,
|
value: FullscreenAction.print,
|
||||||
child: MenuRow(text: 'Print', icon: Icons.print),
|
child: MenuRow(text: 'Print', icon: Icons.print),
|
||||||
|
|
Loading…
Reference in a new issue