mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
47 lines
1.3 KiB
Dart
47 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:nc_photos/app_localizations.dart';
|
|
import 'package:nc_photos/entity/pref.dart';
|
|
import 'package:nc_photos/help_utils.dart' as help_utils;
|
|
import 'package:nc_photos/url_launcher_util.dart';
|
|
|
|
class SharedAlbumInfoDialog extends StatefulWidget {
|
|
const SharedAlbumInfoDialog({super.key});
|
|
|
|
@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();
|
|
}
|
|
}
|