2021-11-26 18:14:50 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:nc_photos/app_localizations.dart';
|
2023-07-17 09:35:45 +02:00
|
|
|
import 'package:nc_photos/entity/pref.dart';
|
2021-11-26 18:14:50 +01:00
|
|
|
import 'package:nc_photos/help_utils.dart' as help_utils;
|
2022-07-08 11:38:24 +02:00
|
|
|
import 'package:nc_photos/url_launcher_util.dart';
|
2021-11-26 18:14:50 +01:00
|
|
|
|
|
|
|
class SharedAlbumInfoDialog extends StatefulWidget {
|
2024-05-28 17:10:33 +02:00
|
|
|
const SharedAlbumInfoDialog({super.key});
|
2021-11-26 18:14:50 +01:00
|
|
|
|
|
|
|
@override
|
|
|
|
createState() => _SharedAlbumInfoDialogState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _SharedAlbumInfoDialogState extends State<SharedAlbumInfoDialog> {
|
|
|
|
@override
|
|
|
|
dispose() {
|
|
|
|
super.dispose();
|
|
|
|
Pref().setHasShownSharedAlbumInfo(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
build(BuildContext context) {
|
|
|
|
return AlertDialog(
|
|
|
|
title: Text(L10n.global().sharedAlbumInfoDialogTitle),
|
|
|
|
content: Text(L10n.global().sharedAlbumInfoDialogContent),
|
|
|
|
actions: [
|
|
|
|
TextButton(
|
|
|
|
onPressed: () => _onSkipPressed(context),
|
|
|
|
child: Text(L10n.global().skipButtonLabel),
|
|
|
|
),
|
|
|
|
TextButton(
|
|
|
|
onPressed: _onLearnMorePressed,
|
|
|
|
child: Text(L10n.global().learnMoreButtonLabel),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void _onSkipPressed(BuildContext context) {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
}
|
|
|
|
|
|
|
|
void _onLearnMorePressed() {
|
|
|
|
launch(help_utils.sharedAlbumLimitationsUrl);
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
}
|
|
|
|
}
|