diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index ba429c9..46b8ad8 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -82,6 +82,7 @@ "primaryColor": "Primary color", "choosePrimaryColor": "Choose primary color", "about": "About", + "restorePurchases": "Restore purchases", "sourceCode": "Source code", "reportIssue": "Report an issue", "writeEmail": "Write an email", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index fe0f831..fd661a3 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -82,6 +82,7 @@ "primaryColor": "Couleur primaire", "choosePrimaryColor": "Choisir la couleur primaire", "about": "À propos de l'application", + "restorePurchases": "Restaurer les achats", "sourceCode": "Code source", "reportIssue": "Rapporter un problème", "writeEmail": "Écrire un email", diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 9e4784c..4543e1f 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -82,6 +82,7 @@ "primaryColor": "Основной цвет", "choosePrimaryColor": "Выберите основной цвет", "about": "О приложении", + "restorePurchases": "Восстановить покупки", "sourceCode": "Исходный код", "reportIssue": "Сообщить о проблеме", "writeEmail": "Написать на почту", diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb index e389eaa..8994e91 100644 --- a/lib/l10n/intl_zh.arb +++ b/lib/l10n/intl_zh.arb @@ -82,6 +82,7 @@ "primaryColor": "主题颜色", "choosePrimaryColor": "选择主题颜色", "about": "关于", + "restorePurchases": "恢复购买", "sourceCode": "源代码", "reportIssue": "报告问题", "writeEmail": "Email", diff --git a/lib/screens/settings/components/about/components/restore_purchases/widget_list_tile_restore_purchases.dart b/lib/screens/settings/components/about/components/restore_purchases/widget_list_tile_restore_purchases.dart new file mode 100644 index 0000000..8bbbdea --- /dev/null +++ b/lib/screens/settings/components/about/components/restore_purchases/widget_list_tile_restore_purchases.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; +import 'package:lightmeter/generated/l10n.dart'; +import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart'; + +class RestorePurchasesListTile extends StatelessWidget { + const RestorePurchasesListTile({super.key}); + + @override + Widget build(BuildContext context) { + return ListTile( + leading: const Icon(Icons.restore), + title: Text(S.of(context).restorePurchases), + onTap: IAPProductsProvider.of(context).restorePurchases, + ); + } +} diff --git a/lib/screens/settings/components/about/widget_settings_section_about.dart b/lib/screens/settings/components/about/widget_settings_section_about.dart index d911ae8..0c3edbf 100644 --- a/lib/screens/settings/components/about/widget_settings_section_about.dart +++ b/lib/screens/settings/components/about/widget_settings_section_about.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:lightmeter/generated/l10n.dart'; import 'package:lightmeter/screens/settings/components/about/components/report_issue/widget_list_tile_report_issue.dart'; +import 'package:lightmeter/screens/settings/components/about/components/restore_purchases/widget_list_tile_restore_purchases.dart'; import 'package:lightmeter/screens/settings/components/about/components/source_code/widget_list_tile_source_code.dart'; import 'package:lightmeter/screens/settings/components/about/components/version/widget_list_tile_version.dart'; import 'package:lightmeter/screens/settings/components/about/components/write_email/widget_list_tile_write_email.dart'; @@ -14,6 +15,7 @@ class AboutSettingsSection extends StatelessWidget { return SettingsSection( title: S.of(context).about, children: const [ + RestorePurchasesListTile(), SourceCodeListTile(), ReportIssueListTile(), WriteEmailListTile(),