A whole lot of stuff

This commit is contained in:
Courtney Arnold 2026-08-18 11:04:58 -05:00
parent faf319322a
commit ad850d2be6
50 changed files with 3013 additions and 213 deletions

View file

@ -5,7 +5,9 @@ import 'package:provider/provider.dart';
import '../services/app_state.dart';
import '../services/onboarding_keys.dart';
import 'data_settings_screen.dart';
import 'faq_screen.dart';
import 'ui_settings_screen.dart';
import 'user_agreement_screen.dart';
/// The "Settings" tab: a landing menu into submenus — [UiSettingsScreen]
/// (appearance) and [DataSettingsScreen] (cloud storage, photo handling,
@ -18,7 +20,10 @@ class SettingsScreen extends StatelessWidget {
final appState = context.watch<AppState>();
return Scaffold(
appBar: AppBar(title: const Text('Settings')),
appBar: AppBar(
title: const Text('Settings'),
actions: const [FaqActionButton()],
),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
@ -47,6 +52,30 @@ class SettingsScreen extends StatelessWidget {
),
),
const SizedBox(height: 16),
Card(
child: ListTile(
leading: const Icon(Icons.help_outline),
title: const Text('FAQ'),
subtitle: const Text('Common questions about the app and the refund program'),
trailing: const Icon(Icons.chevron_right),
onTap: () => Navigator.of(context).push(
MaterialPageRoute(builder: (_) => const FaqScreen()),
),
),
),
const SizedBox(height: 16),
Card(
child: ListTile(
leading: const Icon(Icons.description_outlined),
title: const Text('User Agreement'),
subtitle: const Text('Data liability, privacy, and the tax-advice disclaimer'),
trailing: const Icon(Icons.chevron_right),
onTap: () => Navigator.of(context).push(
MaterialPageRoute(builder: (_) => const UserAgreementScreen(isReview: true)),
),
),
),
const SizedBox(height: 16),
Card(
child: Padding(
padding: const EdgeInsets.all(16),
@ -63,8 +92,8 @@ class SettingsScreen extends StatelessWidget {
),
] else ...[
Text(
'This app shows a single ad, at most once per app session, right '
'before syncing your data to the cloud.',
'Syncing your data to the cloud requires watching a short ad — '
'at most once every 5 minutes.',
style: Theme.of(context).textTheme.bodyMedium,
),
const SizedBox(height: 12),
@ -84,6 +113,19 @@ class SettingsScreen extends StatelessWidget {
: 'Remove Ads for a Year — ${appState.adFreeYearPriceLabel}',
),
),
TextButton(
onPressed: () {
context.read<AppState>().restoreAdFreeYear();
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
"Checking for a previous purchase on this Google account…",
),
),
);
},
child: const Text('Restore Purchase'),
),
],
],
),