mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
53 lines
1.5 KiB
Dart
53 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:nc_photos/app_localizations.dart';
|
|
import 'package:nc_photos/platform/k.dart' as platform_k;
|
|
|
|
enum ShareMethod {
|
|
file,
|
|
publicLink,
|
|
passwordLink,
|
|
}
|
|
|
|
class ShareMethodDialog extends StatelessWidget {
|
|
const ShareMethodDialog({
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
build(BuildContext context) {
|
|
return SimpleDialog(
|
|
title: Text(L10n.global().shareMethodDialogTitle),
|
|
children: [
|
|
if (platform_k.isAndroid)
|
|
SimpleDialogOption(
|
|
child: ListTile(
|
|
title: Text(L10n.global().shareMethodFileTitle),
|
|
subtitle: Text(L10n.global().shareMethodFileDescription),
|
|
),
|
|
onPressed: () {
|
|
Navigator.of(context).pop(ShareMethod.file);
|
|
},
|
|
),
|
|
SimpleDialogOption(
|
|
child: ListTile(
|
|
title: Text(L10n.global().shareMethodPublicLinkTitle),
|
|
subtitle: Text(L10n.global().shareMethodPublicLinkDescription),
|
|
),
|
|
onPressed: () {
|
|
Navigator.of(context).pop(ShareMethod.publicLink);
|
|
},
|
|
),
|
|
SimpleDialogOption(
|
|
child: ListTile(
|
|
title: Text(L10n.global().shareMethodPasswordLinkTitle),
|
|
subtitle: Text(L10n.global().shareMethodPasswordLinkDescription),
|
|
),
|
|
onPressed: () {
|
|
Navigator.of(context).pop(ShareMethod.passwordLink);
|
|
},
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|