Skip to content

Commit

Permalink
Merge pull request #610 from bannzai/fix/view/trial
Browse files Browse the repository at this point in the history
Change premium trial communication
  • Loading branch information
bannzai authored Jun 5, 2022
2 parents 026bc07 + e67f1aa commit 85d28f9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class IntiialSettingPremiumTrialStartPage extends HookConsumerWidget {
child: Column(
children: [
const Spacer(),
SvgPicture.asset("images/premium_trial_ribbon.svg"),
Column(
children: [
Container(
Expand All @@ -37,20 +36,11 @@ class IntiialSettingPremiumTrialStartPage extends HookConsumerWidget {
color: PilllColors.mat,
child: Column(
children: [
const Text(
"PRESENT",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: TextColor.primaryDarkBlue,
fontFamily: FontFamily.alphabet,
),
),
const SizedBox(height: 1),
Column(
children: [
const Text(
"プレミアム体験プレゼント中",
"\\ 通知から服用記録ができます /",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
Expand Down Expand Up @@ -114,12 +104,11 @@ class IntiialSettingPremiumTrialStartPage extends HookConsumerWidget {
const SizedBox(height: 16),
const Text(
'''
自動課金はされません。安心してお使いください
30日後、自動で無料版に移行します
30日間すべての機能が使えます!
''',
style: TextStyle(
color: TextColor.main,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w700,
fontFamily: FontFamily.japanese,
fontSize: 12,
),
Expand Down
2 changes: 1 addition & 1 deletion lib/domain/premium_trial/premium_trial_modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class PremiumTrialModal extends HookConsumerWidget {
onPressed: () async {
analytics.logEvent(name: "pressed_trial_start");
try {
await store.trial();
store.trial();
Navigator.of(context).pop();
didEndTrial();
} catch (exception) {
Expand Down
8 changes: 4 additions & 4 deletions lib/domain/premium_trial/premium_trial_modal_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ class PremiumTrialModalStateStore
super.dispose();
}

handleException(Object exception) {
void handleException(Object exception) {
state = state.copyWith(exception: exception);
}

showHUD() {
void showHUD() {
state = state.copyWith(isLoading: true);
}

hideHUD() {
void hideHUD() {
state = state.copyWith(isLoading: false);
}

trial() async {
void trial() async {
if (state.isTrial && state.beginTrialDate != null) {
state = state.copyWith(
exception: "すでにトライアル中になっています。もし解決しない場合は設定>お問い合わせよりご連絡ください");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ class DiscountPriceDeadline extends HookConsumerWidget {
Align(
alignment: Alignment.center,
child: Text(
"プレミアムお試し終了\n$countdown内の購入で48%OFFで購入できます",
"""
プレミアム登録で引き続きすべての機能が利用できます
$countdown内の購入で48%OFF!
""",
style: FontType.assistingBold.merge(TextColorStyle.white),
textAlign: TextAlign.center,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class PremiumTrialBegin extends HookConsumerWidget {
),
const Spacer(),
Text(
"プレミアムお試し体験中(残り$latestDay日)",
"$latestDay日後まですべての機能を使えます",
style: TextColorStyle.white.merge(FontType.descriptionBold),
textAlign: TextAlign.center,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ class NotificationBarState with _$NotificationBarState {
if (diff > 10) {
return null;
}
return "プレミアムお試し体験中(残り$diff日)";
return "$diff日後まですべての機能を使えます";
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:pilll/analytics.dart';
import 'package:pilll/components/organisms/pill_mark/pill_mark.dart';
import 'package:pilll/components/organisms/pill_mark/pill_mark_line.dart';
Expand Down

0 comments on commit 85d28f9

Please sign in to comment.