Merge branch 'master' into storage-card-bug-fix

This commit is contained in:
ashilkn 2022-10-26 16:37:51 +05:30
commit 3ad41464cd
8 changed files with 31 additions and 25 deletions

View file

@ -16,11 +16,7 @@ const TextStyle brandStyleMedium = TextStyle(
fontFamily: 'Montserrat', fontFamily: 'Montserrat',
fontSize: 24, fontSize: 24,
); );
const TextStyle brandStyleLarge = TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Montserrat',
fontSize: 28,
);
const TextStyle h1 = TextStyle( const TextStyle h1 = TextStyle(
fontSize: 48, fontSize: 48,
height: 48 / 28, height: 48 / 28,
@ -87,6 +83,8 @@ class EnteTextTheme {
final TextStyle miniBold; final TextStyle miniBold;
final TextStyle tiny; final TextStyle tiny;
final TextStyle tinyBold; final TextStyle tinyBold;
final TextStyle brandSmall;
final TextStyle brandMedium;
const EnteTextTheme({ const EnteTextTheme({
required this.h1, required this.h1,
@ -105,6 +103,8 @@ class EnteTextTheme {
required this.miniBold, required this.miniBold,
required this.tiny, required this.tiny,
required this.tinyBold, required this.tinyBold,
required this.brandSmall,
required this.brandMedium,
}); });
} }
@ -129,5 +129,7 @@ EnteTextTheme _buildEnteTextStyle(Color color) {
miniBold: mini.copyWith(color: color, fontWeight: _boldWeight), miniBold: mini.copyWith(color: color, fontWeight: _boldWeight),
tiny: tiny.copyWith(color: color), tiny: tiny.copyWith(color: color),
tinyBold: tiny.copyWith(color: color, fontWeight: _boldWeight), tinyBold: tiny.copyWith(color: color, fontWeight: _boldWeight),
brandSmall: brandStyleSmall.copyWith(color: color),
brandMedium: brandStyleMedium.copyWith(color: color),
); );
} }

View file

@ -40,18 +40,22 @@ class SectionTitle extends StatelessWidget {
} }
} }
RichText onEnteSection = RichText( RichText getOnEnteSection(BuildContext context) {
text: const TextSpan( final EnteTextTheme textTheme = getEnteTextTheme(context);
children: [ return RichText(
TextSpan( text: TextSpan(
text: "On ", children: [
style: TextStyle( TextSpan(
fontWeight: FontWeight.w600, text: "On ",
fontFamily: 'Inter', style: TextStyle(
fontSize: 21, fontWeight: FontWeight.w600,
fontFamily: 'Inter',
fontSize: 21,
color: textTheme.brandSmall.color,
),
), ),
), TextSpan(text: "ente", style: textTheme.brandSmall),
TextSpan(text: "ente", style: brandStyleSmall), ],
], ),
), );
); }

View file

@ -140,7 +140,7 @@ class _CollectionsGalleryWidgetState extends State<CollectionsGalleryWidget>
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
SectionTitle(titleWithBrand: onEnteSection), SectionTitle(titleWithBrand: getOnEnteSection(context)),
_sortMenu(), _sortMenu(),
], ],
), ),

View file

@ -44,7 +44,7 @@ class SkipSubscriptionWidget extends StatelessWidget {
BillingService.instance BillingService.instance
.verifySubscription(freeProductID, "", paymentProvider: "ente"); .verifySubscription(freeProductID, "", paymentProvider: "ente");
}, },
child: const Text("Continue on free plan"), child: const Text("Continue on free trial"),
), ),
); );
} }

View file

@ -94,7 +94,7 @@ class ValidityWidget extends StatelessWidget {
); );
var message = "Renews on $endDate"; var message = "Renews on $endDate";
if (currentSubscription.productID == freeProductID) { if (currentSubscription.productID == freeProductID) {
message = "Free plan valid till $endDate"; message = "Free trial valid till $endDate";
} else if (currentSubscription.attributes?.isCancelled ?? false) { } else if (currentSubscription.attributes?.isCancelled ?? false) {
message = "Your subscription will be cancelled on $endDate"; message = "Your subscription will be cancelled on $endDate";
} }

View file

@ -368,7 +368,7 @@ class _SubscriptionPageState extends State<SubscriptionPage> {
planWidgets.add( planWidgets.add(
SubscriptionPlanWidget( SubscriptionPlanWidget(
storage: _freePlan.storage, storage: _freePlan.storage,
price: "free", price: "Free trial",
period: "", period: "",
isActive: true, isActive: true,
), ),

View file

@ -19,7 +19,7 @@ class SubscriptionPlanWidget extends StatelessWidget {
String _displayPrice() { String _displayPrice() {
final result = price + (period.isNotEmpty ? " / " + period : ""); final result = price + (period.isNotEmpty ? " / " + period : "");
return result.isNotEmpty ? result : "Trial plan"; return price.isNotEmpty ? result : "Free trial";
} }
@override @override

View file

@ -411,7 +411,7 @@ packages:
name: flutter_inappwebview name: flutter_inappwebview
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.4.3+7" version: "5.7.1"
flutter_keyboard_visibility: flutter_keyboard_visibility:
dependency: transitive dependency: transitive
description: description: