changed "get pro" tile colors

This commit is contained in:
Vadim 2024-07-23 21:32:50 +02:00
parent 0780e9b02f
commit 63f5d8c377
9 changed files with 55 additions and 43 deletions

View file

@ -103,8 +103,8 @@
} }
} }
}, },
"unlock": "Unlock",
"proFeaturesTitle": "Lightmeter Pro", "proFeaturesTitle": "Lightmeter Pro",
"getPro": "Get Pro now",
"featuresFree": "Free", "featuresFree": "Free",
"featuresPro": "Pro", "featuresPro": "Pro",
"proFeaturesPromoText": "Lightmeter Pro delivers everything you need to get the best shots!", "proFeaturesPromoText": "Lightmeter Pro delivers everything you need to get the best shots!",
@ -120,8 +120,8 @@
"featureTimer": "Built-in timer for long exposure", "featureTimer": "Built-in timer for long exposure",
"featureMeteringScreenLayout": "Customizable main screen", "featureMeteringScreenLayout": "Customizable main screen",
"proFeaturesSupportText": "By purchasing Lightmeter Pro you support the development and make it possible to add new features to the app.", "proFeaturesSupportText": "By purchasing Lightmeter Pro you support the development and make it possible to add new features to the app.",
"unlockFor": "Unlock for {price}", "getNowFor": "Get now for {price}",
"@unlockFor": { "@getNowFor": {
"price": { "price": {
"version": { "version": {
"type": "String" "type": "String"

View file

@ -103,8 +103,8 @@
} }
} }
}, },
"proFeatures": "Fonctionnalités professionnelles",
"proFeaturesTitle": "Lightmeter Pro", "proFeaturesTitle": "Lightmeter Pro",
"getPro": "Acheter Pro",
"unlock": "Déverrouiller", "unlock": "Déverrouiller",
"featuresFree": "Gratuit", "featuresFree": "Gratuit",
"featuresPro": "Pro", "featuresPro": "Pro",
@ -121,8 +121,8 @@
"featureTimer": "Minuteur intégré pour longues expositions", "featureTimer": "Minuteur intégré pour longues expositions",
"featureMeteringScreenLayout": "Écran principal personnalisable", "featureMeteringScreenLayout": "Écran principal personnalisable",
"proFeaturesSupportText": "En achetant Lightmeter Pro, vous soutenez le développement et permettez l'ajout de nouvelles fonctionnalités à l'application.", "proFeaturesSupportText": "En achetant Lightmeter Pro, vous soutenez le développement et permettez l'ajout de nouvelles fonctionnalités à l'application.",
"unlockFor": "Déverrouiller pour {price}", "getNowFor": "Acheter maintenant {price}",
"@unlockFor": { "@getNowFor": {
"price": { "price": {
"version": { "version": {
"type": "String" "type": "String"

View file

@ -67,8 +67,8 @@
"equipmentProfile": "Оборудование", "equipmentProfile": "Оборудование",
"equipmentProfiles": "Профили оборудования", "equipmentProfiles": "Профили оборудования",
"tapToAdd": "Нажмите, чтобы добавить", "tapToAdd": "Нажмите, чтобы добавить",
"filmsInUse": "Используемые пленки", "filmsInUse": "Используемые плёнки",
"filmsInUseDescription": "Выберите пленки, которыми вы пользуетесь.", "filmsInUseDescription": "Выберите плёнки, которыми вы пользуетесь.",
"general": "Общие", "general": "Общие",
"keepScreenOn": "Запрет блокировки", "keepScreenOn": "Запрет блокировки",
"haptics": "Вибрация", "haptics": "Вибрация",
@ -103,9 +103,8 @@
} }
} }
}, },
"proFeatures": "Профессиональные настройки",
"proFeaturesTitle": "Lightmeter Pro", "proFeaturesTitle": "Lightmeter Pro",
"unlock": "Разблокировать", "getPro": "Купить Pro",
"featuresFree": "Бесплатно", "featuresFree": "Бесплатно",
"featuresPro": "Pro", "featuresPro": "Pro",
"proFeaturesPromoText": "Lightmeter Pro предоставляет все необходимое для получения лучших снимков!", "proFeaturesPromoText": "Lightmeter Pro предоставляет все необходимое для получения лучших снимков!",
@ -116,13 +115,13 @@
"featureTheme": "Настройка темы", "featureTheme": "Настройка темы",
"featureSpotMetering": "Точечный замер", "featureSpotMetering": "Точечный замер",
"featureHistogram": "Гистограмма", "featureHistogram": "Гистограмма",
"featureListOfFilms": "Список из 20+ фильмов с формулами коррекции", "featureListOfFilms": "Список из 20+ плёнок с формулами коррекции",
"featureEquipmentProfiles": "Профили оборудования", "featureEquipmentProfiles": "Профили оборудования",
"featureTimer": "Встроенный таймер для длинных выдержек", "featureTimer": "Встроенный таймер для длинных выдержек",
"featureMeteringScreenLayout": "Настраиваемый главный экран", "featureMeteringScreenLayout": "Настраиваемый главный экран",
"proFeaturesSupportText": "Покупая Lightmeter Pro, вы поддерживаете разработку и делаете возможным добавление новых функций в приложение.", "proFeaturesSupportText": "Покупая Lightmeter Pro, вы поддерживаете разработку и делаете возможным добавление новых функций в приложение.",
"unlockFor": "Разблокировать за {price}", "getNowFor": "Купить за {price}",
"@unlockFor": { "@getNowFor": {
"price": { "price": {
"version": { "version": {
"type": "String" "type": "String"

View file

@ -104,7 +104,7 @@
} }
}, },
"proFeatures": "专业功能", "proFeatures": "专业功能",
"unlock": "解锁", "getPro": "购买专业版",
"featuresFree": "免费", "featuresFree": "免费",
"featuresPro": "专业版", "featuresPro": "专业版",
"proFeaturesPromoText": "Lightmeter Pro 提供您需要的一切,助您拍出最佳照片!", "proFeaturesPromoText": "Lightmeter Pro 提供您需要的一切,助您拍出最佳照片!",
@ -120,8 +120,8 @@
"featureTimer": "内置长曝光计时器", "featureTimer": "内置长曝光计时器",
"featureMeteringScreenLayout": "可自定义的主屏幕", "featureMeteringScreenLayout": "可自定义的主屏幕",
"proFeaturesSupportText": "通过购买Lightmeter Pro您支持开发工作并使添加新功能成为可能。", "proFeaturesSupportText": "通过购买Lightmeter Pro您支持开发工作并使添加新功能成为可能。",
"unlockFor": "解锁价格 {price}", "getNowFor": "立即获取 {price}",
"@unlockFor": { "@getNowFor": {
"price": { "price": {
"version": { "version": {
"type": "String" "type": "String"

View file

@ -12,12 +12,12 @@ class LightmeterProAnimatedDialog extends StatelessWidget {
Navigator.of(context).pushNamed('proFeatures'); Navigator.of(context).pushNamed('proFeatures');
}, },
child: ReadingValueContainer( child: ReadingValueContainer(
color: Theme.of(context).colorScheme.errorContainer, color: Theme.of(context).colorScheme.secondary,
textColor: Theme.of(context).colorScheme.onErrorContainer, textColor: Theme.of(context).colorScheme.onSecondary,
values: [ values: [
ReadingValue( ReadingValue(
label: S.of(context).proFeaturesTitle, label: S.of(context).proFeaturesTitle,
value: S.of(context).unlock, value: S.of(context).getPro,
), ),
], ],
), ),

View file

@ -25,10 +25,7 @@ class ProFeaturesScreen extends StatelessWidget {
slivers: [ slivers: [
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.all(Dimens.paddingM),
horizontal: Dimens.paddingM,
vertical: Dimens.paddingS,
),
child: Text( child: Text(
S.of(context).proFeaturesPromoText, S.of(context).proFeaturesPromoText,
style: Theme.of(context).textTheme.bodyLarge, style: Theme.of(context).textTheme.bodyLarge,
@ -38,10 +35,10 @@ class ProFeaturesScreen extends StatelessWidget {
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(
Dimens.paddingM,
Dimens.paddingM,
Dimens.paddingM, Dimens.paddingM,
0, 0,
Dimens.paddingM,
Dimens.paddingM,
), ),
child: Text( child: Text(
S.of(context).proFeaturesWhatsIncluded, S.of(context).proFeaturesWhatsIncluded,
@ -82,8 +79,9 @@ class ProFeaturesScreen extends StatelessWidget {
?.analytics ?.analytics
.setCustomKey('iap_product_type', IAPProductType.paidFeatures.storeId); .setCustomKey('iap_product_type', IAPProductType.paidFeatures.storeId);
IAPProductsProvider.maybeOf(context)?.buy(IAPProductType.paidFeatures); IAPProductsProvider.maybeOf(context)?.buy(IAPProductType.paidFeatures);
Navigator.of(context).pop();
}, },
child: Text(S.of(context).unlockFor(IAPProducts.productOf(context, IAPProductType.paidFeatures)!.price)), child: Text(S.of(context).getNowFor(IAPProducts.productOf(context, IAPProductType.paidFeatures)!.price)),
), ),
), ),
], ],

View file

@ -11,8 +11,8 @@ class BuyProListTile extends StatelessWidget {
final status = IAPProducts.productOf(context, IAPProductType.paidFeatures)?.status; final status = IAPProducts.productOf(context, IAPProductType.paidFeatures)?.status;
final isPending = status == IAPProductStatus.purchased || status == null; final isPending = status == IAPProductStatus.purchased || status == null;
return ListTile( return ListTile(
leading: const Icon(Icons.star_outlined), leading: const Icon(Icons.bolt),
title: Text(S.of(context).unlock), title: Text(S.of(context).getPro),
onTap: !isPending onTap: !isPending
? () { ? () {
Navigator.of(context).pushNamed('proFeatures'); Navigator.of(context).pushNamed('proFeatures');

View file

@ -9,6 +9,8 @@ class LightmeterProSettingsSection extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SettingsSection( return SettingsSection(
backgroundColor: Theme.of(context).colorScheme.secondary,
foregroundColor: Theme.of(context).colorScheme.onSecondary,
title: S.of(context).proFeaturesTitle, title: S.of(context).proFeaturesTitle,
children: const [BuyProListTile()], children: const [BuyProListTile()],
); );

View file

@ -4,10 +4,14 @@ import 'package:lightmeter/res/dimens.dart';
class SettingsSection extends StatelessWidget { class SettingsSection extends StatelessWidget {
final String title; final String title;
final List<Widget> children; final List<Widget> children;
final Color? backgroundColor;
final Color? foregroundColor;
const SettingsSection({ const SettingsSection({
required this.title, required this.title,
required this.children, required this.children,
this.backgroundColor,
this.foregroundColor,
super.key, super.key,
}); });
@ -21,24 +25,33 @@ class SettingsSection extends StatelessWidget {
Dimens.paddingM, Dimens.paddingM,
), ),
child: Card( child: Card(
color: backgroundColor,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: Dimens.paddingM), padding: const EdgeInsets.symmetric(vertical: Dimens.paddingM),
child: Column( child: Theme(
crossAxisAlignment: CrossAxisAlignment.start, data: Theme.of(context).copyWith(
mainAxisSize: MainAxisSize.min, listTileTheme: Theme.of(context).listTileTheme.copyWith(
children: [ iconColor: foregroundColor,
Padding( textColor: foregroundColor,
padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM), ),
child: Text( ),
title, child: Column(
style: Theme.of(context) crossAxisAlignment: CrossAxisAlignment.start,
.textTheme mainAxisSize: MainAxisSize.min,
.labelLarge children: [
?.copyWith(color: Theme.of(context).colorScheme.onSurface), Padding(
padding: const EdgeInsets.symmetric(horizontal: Dimens.paddingM),
child: Text(
title,
style: Theme.of(context)
.textTheme
.labelLarge
?.copyWith(color: foregroundColor ?? Theme.of(context).colorScheme.onSurface),
),
), ),
), ...children,
...children, ],
], ),
), ),
), ),
), ),