mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 17:26:18 +01:00
d5de52a789
This is typically used to set wallpaper or contact photos
44 lines
1.1 KiB
Dart
44 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:nc_photos/app_localizations.dart';
|
|
|
|
enum SetAsMethod {
|
|
file,
|
|
preview,
|
|
}
|
|
|
|
class SetAsMethodDialog extends StatelessWidget {
|
|
const SetAsMethodDialog({
|
|
super.key,
|
|
this.isSupportPerview = true,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SimpleDialog(
|
|
title: Text(L10n.global().setAsTooltip),
|
|
children: [
|
|
if (isSupportPerview)
|
|
SimpleDialogOption(
|
|
child: ListTile(
|
|
title: Text(L10n.global().shareMethodPreviewTitle),
|
|
subtitle: Text(L10n.global().shareMethodPreviewDescription),
|
|
),
|
|
onPressed: () {
|
|
Navigator.of(context).pop(SetAsMethod.preview);
|
|
},
|
|
),
|
|
SimpleDialogOption(
|
|
child: ListTile(
|
|
title: Text(L10n.global().shareMethodOriginalFileTitle),
|
|
subtitle: Text(L10n.global().shareMethodOriginalFileDescription),
|
|
),
|
|
onPressed: () {
|
|
Navigator.of(context).pop(SetAsMethod.file);
|
|
},
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
final bool isSupportPerview;
|
|
}
|