Skip to content

Commit

Permalink
EULA + Privacy Policy links in purchase dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
LezdCS committed Oct 9, 2024
1 parent 06a06af commit 7426262
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/core/services/store_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class StoreService extends GetxService {

//Function isSubscribed
bool isSubscribed() {
return purchases.any((p) => kIds.contains(p.productID)) || kDebugMode;
return purchases.any((p) => kIds.contains(p.productID));
}

// Function get subscription price
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:irllink/src/core/services/store_service.dart';
import 'package:irllink/src/presentation/controllers/settings_view_controller.dart';
import 'package:url_launcher/url_launcher_string.dart';

Widget inAppPurchaseDialog(
BuildContext context,
Expand Down Expand Up @@ -129,6 +130,58 @@ Widget inAppPurchaseDialog(
style: const TextStyle(fontSize: 13, color: Colors.grey),
textAlign: TextAlign.center,
),
Platform.isIOS
? Text.rich(
style: const TextStyle(fontSize: 13, color: Colors.grey),
textAlign: TextAlign.center,
TextSpan(
children: [
const TextSpan(
text: 'To learn more, visit our ',
),
WidgetSpan(
child: InkWell(
onTap: () {
launchUrlString(
"https://www.apple.com/legal/internet-services/itunes/dev/stdeula/",
mode: LaunchMode.externalApplication,
);
},
child: Text(
"Terms",
textAlign: TextAlign.end,
style: TextStyle(
color: Theme.of(context).colorScheme.tertiary,
),
),
),
),
const TextSpan(
text: ' and ',
),
WidgetSpan(
child: InkWell(
onTap: () {
launchUrlString(
"https://github.com/LezdCS/irl-link/blob/master/PRIVACY_POLICY.md",
mode: LaunchMode.externalApplication,
);
},
child: Text(
"Privacy Policy",
style: TextStyle(
color: Theme.of(context).colorScheme.tertiary,
),
),
),
),
const TextSpan(
text: '.',
),
],
),
)
: Container(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expand Down

0 comments on commit 7426262

Please sign in to comment.