moved "Restore purchases" to the Pro section

This commit is contained in:
Vadim 2024-07-28 14:05:50 +02:00
parent e53eca1831
commit c166f5d4d5
3 changed files with 10 additions and 9 deletions

View file

@ -1,12 +1,10 @@
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';
import 'package:lightmeter/screens/settings/components/shared/settings_section/widget_settings_section.dart';
import 'package:lightmeter/utils/context_utils.dart';
class AboutSettingsSection extends StatelessWidget {
const AboutSettingsSection({super.key});
@ -15,12 +13,11 @@ class AboutSettingsSection extends StatelessWidget {
Widget build(BuildContext context) {
return SettingsSection(
title: S.of(context).about,
children: [
const SourceCodeListTile(),
if (!context.isPro) const RestorePurchasesListTile(),
const ReportIssueListTile(),
const WriteEmailListTile(),
const VersionListTile(),
children: const [
SourceCodeListTile(),
ReportIssueListTile(),
WriteEmailListTile(),
VersionListTile(),
],
);
}

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/screens/settings/components/lightmeter_pro/components/buy_pro/widget_list_tile_buy_pro.dart';
import 'package:lightmeter/screens/settings/components/lightmeter_pro/components/restore_purchases/widget_list_tile_restore_purchases.dart';
import 'package:lightmeter/screens/settings/components/shared/settings_section/widget_settings_section.dart';
class LightmeterProSettingsSection extends StatelessWidget {
@ -12,7 +13,10 @@ class LightmeterProSettingsSection extends StatelessWidget {
backgroundColor: Theme.of(context).colorScheme.secondary,
foregroundColor: Theme.of(context).colorScheme.onSecondary,
title: S.of(context).proFeaturesTitle,
children: const [BuyProListTile()],
children: const [
BuyProListTile(),
RestorePurchasesListTile(),
],
);
}
}