mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
Compare commits
9 commits
cabc50d2aa
...
88a726b1e2
Author | SHA1 | Date | |
---|---|---|---|
|
88a726b1e2 | ||
|
c99a172d66 | ||
|
62833e79bf | ||
|
9e16b68ae6 | ||
|
60e3cc6e40 | ||
|
d364de4486 | ||
|
e1c320b804 | ||
|
a9f8223e4a | ||
|
aee527dcca |
7 changed files with 22 additions and 11 deletions
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: [vodemn]
|
4
.github/workflows/build_apk.yml
vendored
4
.github/workflows/build_apk.yml
vendored
|
@ -19,7 +19,7 @@ on:
|
|||
include-iap:
|
||||
type: boolean
|
||||
description: Include IAP package
|
||||
default: false # TODO(@vodemn) when Google fixes their api
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -36,7 +36,7 @@ jobs:
|
|||
- name: Override iap package with stub
|
||||
if: ${{ !inputs.include-iap }}
|
||||
run: |
|
||||
echo "\ndependecies_override:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
|
||||
echo "\ndependency_overrides:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
|
8
.github/workflows/create_release.yml
vendored
8
.github/workflows/create_release.yml
vendored
|
@ -34,7 +34,7 @@ on:
|
|||
include-iap:
|
||||
type: boolean
|
||||
description: Include IAP package
|
||||
default: false # TODO(@vodemn) when Google fixes their api
|
||||
default: true
|
||||
|
||||
env:
|
||||
BUILD_ARGS: --release --flavor prod --dart-define cameraPreviewAspectRatio=240/320 -t lib/main_prod.dart
|
||||
|
@ -55,7 +55,7 @@ jobs:
|
|||
- name: Override iap package with stub
|
||||
if: ${{ !inputs.include-iap }}
|
||||
run: |
|
||||
echo "\ndependecies_override:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
|
||||
echo "\ndependency_overrides:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -164,8 +164,8 @@ jobs:
|
|||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --global user.name "vodemn"
|
||||
git config --global user.email "vadim.turko@gmail.com"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add -A
|
||||
git commit -m "Version bump"
|
||||
|
||||
|
|
2
.github/workflows/pr_check.yml
vendored
2
.github/workflows/pr_check.yml
vendored
|
@ -30,7 +30,7 @@ jobs:
|
|||
- name: Override iap package with stub
|
||||
if: env.STUB_IAP
|
||||
run: |
|
||||
echo "\ndependecies_override:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
|
||||
echo "\ndependency_overrides:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
|
|
@ -109,4 +109,5 @@ flutter {
|
|||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "com.android.billingclient:billing-ktx:6.0.0"
|
||||
implementation "com.google.firebase:firebase-analytics:17.4.1"
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:developer';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart';
|
||||
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
||||
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
||||
|
@ -11,7 +12,8 @@ class EquipmentProfilesListTile extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final paidStatus = IAPProducts.productOf(context, IAPProductType.paidFeatures)?.status;
|
||||
final paidStatus = IAPProducts.productOf(context, IAPProductType.paidFeatures)?.status ??
|
||||
IAPProductStatus.pending;
|
||||
log(paidStatus.toString());
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.camera),
|
||||
|
@ -22,13 +24,18 @@ class EquipmentProfilesListTile extends StatelessWidget {
|
|||
MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()),
|
||||
);
|
||||
},
|
||||
IAPProductStatus.purchasable => () {
|
||||
IAPProductStatus.pending => null,
|
||||
_ => () {
|
||||
IAPProductsProvider.of(context).buy(IAPProductType.paidFeatures);
|
||||
},
|
||||
_ => null,
|
||||
},
|
||||
trailing: switch (paidStatus) {
|
||||
IAPProductStatus.purchasable => const Icon(Icons.lock),
|
||||
IAPProductStatus.pending => const SizedBox(
|
||||
height: Dimens.grid24,
|
||||
width: Dimens.grid24,
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
_ => null,
|
||||
},
|
||||
);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: lightmeter
|
||||
description: Lightmeter app inspired by Material 3 design system.
|
||||
publish_to: "none"
|
||||
version: 0.13.1+37
|
||||
version: 0.13.2+38
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
|
Loading…
Reference in a new issue