Skip to content

Commit

Permalink
add promotional button to more page
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Jan 26, 2025
1 parent 2d41796 commit 29b7871
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/Frontend/pages/more.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ class _MoreState extends ConsumerState<More> {
const CustomAudioRoute().push(context);
},
),
Builder(builder: (context) {
String couponCode = "APPCOV25";
return ListTile(
title: Text(morePageCoverPromoTitle()),
subtitle: Text(morePageCoverPromoDescription(couponCode: couponCode)),
leading: const Icon(Icons.store),
trailing: const Icon(Icons.open_in_browser),
onTap: () async {
await launchUrl(Uri.parse('https://thetailcompany.com/product/tail-and-ear-covers/${getOutboundUtm()}&coupon=$couponCode'));
},
);
}),
ListTile(
title: Text(settingsPage()),
subtitle: Text(settingsDescription()),
Expand Down
7 changes: 6 additions & 1 deletion lib/Frontend/translation_string_definitions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ String homeWelcomeMessage() => Intl.message('You can control, explore and update

String joyStickPage() => Intl.message('Joystick', name: 'joyStickPage', desc: 'The label and title of the joystick page');

String joyStickPageDescription() => Intl.message("Directly control your gears' position." , name: 'joyStickPageDescription', desc: 'The description of the joystick page on the more page');
String joyStickPageDescription() => Intl.message("Directly control your gears' position.", name: 'joyStickPageDescription', desc: 'The description of the joystick page on the more page');

String feedbackPage() => Intl.message('Send Feedback', name: 'feedbackPage', desc: 'The label and title of the feedback page');

Expand Down Expand Up @@ -433,3 +433,8 @@ String manageGearConModePincodeEnableDescription() =>
String manageGearConModePincodeCopy() => Intl.message('Copy to Clipboard', name: 'manageGearConModePincodeCopy', desc: 'The description for copy to clipboard button on the pin code dialog');

String manageGearConModeToggleTitle() => Intl.message('Enable Convention Mode', name: 'manageGearConModeToggleTitle', desc: 'The description for the convention mode enabled button on the gear page');

String morePageCoverPromoTitle() => Intl.message('Change the look of your gear!', name: 'morePageCoverPromoTitle', desc: 'The title for the button on the More page to push users to buy a new cover');

String morePageCoverPromoDescription({required String couponCode}) =>
Intl.message('Use code $couponCode to get 10% off a new MiTail or EarGear sleeve', args: [couponCode], name: 'morePageCoverPromoDescription', desc: 'The description & promo code for the button on the More page to push users to buy a new cover');

0 comments on commit 29b7871

Please sign in to comment.