Skip to content

Commit 043ec81

Browse files
committed
IOS review changes v1
1 parent 647dc1c commit 043ec81

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed

assets/locales/en.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,6 @@ msgstr "Select a region for your Private Server. Closer locations may improve sp
681681
msgid "gcp_location_options"
682682
msgstr "Google Cloud Platform Location Options (%d):"
683683

684-
685684
msgid "australia_sydney"
686685
msgstr "Australia - Sydney"
687686

@@ -1314,6 +1313,9 @@ msgstr "Daily data cap reached"
13141313
msgid "daily_data_cap_reached_message"
13151314
msgstr "Speed reduced to 128 kb/sec - Resets at %s."
13161315

1316+
msgid "subscription_renewal_info"
1317+
msgstr "Payment is charged to your Apple ID at purchase. Subscriptions renew automatically unless canceled at least 24 hours before the end of the current period. Manage or cancel in App Store Settings."
1318+
13171319

13181320

13191321

lib/core/widgets/base_screen.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class BaseScreen extends StatelessWidget {
88
final bool padded;
99
final AppBar? appBar;
1010
final Widget? bottomNavigationBar;
11+
final Widget? bottomSheet;
1112
final Color? backgroundColor;
1213
final bool extendBody;
1314

@@ -20,6 +21,7 @@ class BaseScreen extends StatelessWidget {
2021
this.appBar,
2122
this.backgroundColor,
2223
this.extendBody = false,
24+
this.bottomSheet,
2325
});
2426

2527
@override
@@ -34,6 +36,7 @@ class BaseScreen extends StatelessWidget {
3436
padding: padded ? defaultPadding : EdgeInsets.zero,
3537
child: body,
3638
),
39+
bottomSheet: bottomSheet,
3740
bottomNavigationBar: bottomNavigationBar,
3841
extendBody: extendBody,
3942
);

lib/features/plans/plans.dart

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import 'package:lantern/core/utils/formatter.dart';
1111
import 'package:lantern/core/utils/screen_utils.dart';
1212
import 'package:lantern/core/widgets/loading_indicator.dart';
1313
import 'package:lantern/features/auth/provider/auth_notifier.dart';
14-
import 'package:lantern/features/plans/provider/payment_notifier.dart';
1514
import 'package:lantern/features/home/provider/app_setting_notifier.dart';
1615
import 'package:lantern/features/plans/feature_list.dart';
1716
import 'package:lantern/features/plans/plans_list.dart';
17+
import 'package:lantern/features/plans/provider/payment_notifier.dart';
1818
import 'package:lantern/features/plans/provider/plans_notifier.dart';
1919
import 'package:lantern/features/plans/provider/referral_notifier.dart';
2020

@@ -34,7 +34,6 @@ class _PlansState extends ConsumerState<Plans> {
3434
@override
3535
Widget build(BuildContext context) {
3636
textTheme = Theme.of(context).textTheme;
37-
3837
return BaseScreen(
3938
backgroundColor: AppColors.white,
4039
padded: false,
@@ -74,7 +73,7 @@ class _PlansState extends ConsumerState<Plans> {
7473
padding: EdgeInsets.symmetric(horizontal: defaultSize),
7574
child: SizedBox(
7675
height:
77-
context.isSmallDevice ? size.height * 0.4 : size.height * 0.4,
76+
context.isSmallDevice ? size.height * 0.4 : size.height * 0.39,
7877
child: SingleChildScrollView(child: FeatureList()),
7978
),
8079
),
@@ -133,6 +132,47 @@ class _PlansState extends ConsumerState<Plans> {
133132
onPressed: onGetLanternProTap,
134133
),
135134
),
135+
if (PlatformUtils.isIOS) ...{
136+
SizedBox(height: defaultSize),
137+
Padding(
138+
padding: const EdgeInsets.only(left: 8.0),
139+
child: Text(
140+
'subscription_renewal_info'.i18n,
141+
style: textTheme.labelMedium!.copyWith(
142+
color: AppColors.gray7,
143+
),
144+
),
145+
),
146+
IntrinsicHeight(
147+
child: Row(
148+
mainAxisAlignment: MainAxisAlignment.spaceAround,
149+
children: <Widget>[
150+
AppTextButton(
151+
label: 'privacy_policy'.i18n,
152+
fontSize: 12,
153+
textColor: AppColors.gray7,
154+
onPressed: () {
155+
UrlUtils.openWithSystemBrowser(
156+
AppUrls.privacyPolicy);
157+
},
158+
),
159+
VerticalDivider(
160+
indent: 10,
161+
endIndent: 10,
162+
),
163+
AppTextButton(
164+
label: 'terms_of_service'.i18n,
165+
fontSize: 12,
166+
textColor: AppColors.gray7,
167+
onPressed: () {
168+
UrlUtils.openWithSystemBrowser(
169+
AppUrls.termsOfService);
170+
},
171+
)
172+
],
173+
),
174+
),
175+
},
136176
SizedBox(height: size24),
137177
],
138178
),

0 commit comments

Comments
 (0)