Lightmeter app inspired by Material 3 design system.
Find a file
Vadim 3bb3f12641
ML-62 Utils tests (#133)
* removed redundant `UserPreferencesService` from `MeteringBloc`

* wip

* post-merge fixes

* `MeasureEvent` tests

* `MeasureEvent` tests revision

* `MeasureEvent` tests added timeout

* added stubs for other `MeteringBloc` events

* rewritten `MeteringBloc` logic

* wip

* `IsoChangedEvent` tests

* refined `IsoChangedEvent` tests

* `NdChangedEvent` tests

* `FilmChangedEvent` tests

* `MeteringCommunicationBloc` tests

* added test run to ci

* overriden `==` for `MeasuredState`

* `LuxMeteringEvent` tests

* refined `LuxMeteringEvent` tests

* rename

* wip

* wip

* `InitializeEvent`/`DeinitializeEvent` tests

* clamp minZoomLevel

* fixed `MeteringCommunicationBloc` tests

* wip

* `ZoomChangedEvent` tests

* `ExposureOffsetChangedEvent`/`ExposureOffsetResetEvent` tests

* renamed test groups

* added test coverage script

* improved `CameraContainerBloc` test coverage

* `EquipmentProfileChangedEvent` tests

* verify response vibration

* fixed running all tests

* `MeteringCommunicationBloc` equality tests

* `CameraContainerBloc` equality tests

* removed generated code from coverage

* `MeteringScreenLayoutFeature` tests

* `SupportedLocale` tests

* `Film` tests

* `CaffeineService` tests

* `UserPreferencesService` tests (wip)

* `LightSensorService` tests (wip)

* `migrateOldKeys()` tests

* ignore currently unused getters & setters

* gradle upgrade

* `reset(sharedPreferences);` calls count

* typo

* `MeteringInteractor` tests

* `SettingsInteractor` tests (wip)

* `MeteringInteractor` tests (wip)

* `SettingsInteractor` tests

* AnimatedDialog picker standalone tests

* Moved Animated dialog picker to widget tests

* `ExtremeExposurePairsContainer` widget test

* dialog picker test

* Match extreme exposure pairs & pairs list edge values

* `FilmPicker` widget tests

* fixed animated dialog picker tests

* add not hit files to coverage percentage

* Moved `EquipmentProfileProvider` & `FilmsProvider` to the main repo

* Synced _iap_ stub with repo

* `FilmsProvider` tests

* `EquipmentProfileProvider` tests

* Pass `availableFilms` to `FilmsProvider`

* `FilmPicker` tests

* removed unnecessary imports

* Metering layout features tests

* split integration tests by screens

* Films in use test

* mock light meter lux stream

* removed mockito mocks for integration tests

From no on these are the only mocks in use:
- Mock shared prefs initial values
- Mock platform responses (camera/light sensor)

* set sharedprefs mock without redundant group

* unified granting camera permission on Android

* fixed metering screen tests

* extracted common values

* `FilmPicker` integration tests

* fixed light sensor platform mocks

* wip

* removed integration tests for now

* moved screenshots generator to screenshots folder

* typo

* removed `MockIAPProductsProvider`

* implemented platform mocks for unit tests

* data/models/ 100% coverage

* `IsoValuePicker` tests

* `EquipmentProfileProvider` tests

* extended PR check timeout

* typo

* added storage action verification for `FilmsProvider` tests

* `UserPreferencesProvider` tests

* Update README.md

* added //coverage:ignore to `ServicesProvider`

* typo

* typo

* `toStringSignedAsFixed` tests

* `SelectableInheritedModel` tests

* removed unused `TextLineHeight` util

* `VolumeKeysNotifier` tests

* import

* `EquipmentProfileListener` tests

* typo

* split `EquipmentProfileListener` tests

* `showBuyProDialog` tests

* added `maybeOf` getter for iap stub
2023-11-02 17:40:47 +01:00
.github ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00
.vscode ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00
android Added Firebase Analytics 2023-08-28 11:39:20 +02:00
assets ML-126 Automate screenshots creation (#127) 2023-09-28 23:29:33 +02:00
doc Added GP resources 2023-04-08 17:27:04 +03:00
iap ML-62 Utils tests (#133) 2023-11-02 17:40:47 +01:00
integration_test ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00
ios Implemented IAP & Equipment profiles (#89) 2023-09-02 10:32:08 +02:00
lib ML-62 Utils tests (#133) 2023-11-02 17:40:47 +01:00
resources ML-11 Implement volume buttons actions (#86) 2023-07-09 13:39:33 +02:00
screenshots ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00
test ML-62 Utils tests (#133) 2023-11-02 17:40:47 +01:00
test_driver ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00
.gitignore ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00
.metadata init project 2022-10-15 19:35:35 +03:00
analysis_options.yaml ML-62 Interactors tests (#87) 2023-07-10 17:49:34 +02:00
crowdin.yml Push new localization strings to Crowdin (#30) 2023-02-12 13:09:55 +03:00
LICENSE Initial commit 2022-10-15 16:00:14 +03:00
m3_lightmeter.code-workspace ML-107 Films filter (#118) 2023-09-14 16:59:16 +02:00
PRIVACY_POLICY.md Update PRIVACY_POLICY.md 2023-02-24 10:22:56 +03:00
pubspec.yaml ML-62 Utils tests (#133) 2023-11-02 17:40:47 +01:00
README.md ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00
test_coverage.sh ML-62 Providers tests + Platform & Application mocks (#131) 2023-10-20 16:12:43 +02:00

Table of contents

Backstory

Some time ago I've started developing the Material Lightmeter app. Unfortunately, the last update of this app was almost a year prior to creation of this repo. So after reading some positive review on Google Play saying that "this is an excellent app, too bad it is no longer updated", I've decided to make an update and also make this app open source. Maybe someone sometime will decide to contribute to this project.

But as the existing repo contained some sensitive data, that I've pushed due to lack of experience, I had to make a new one. And if creating a new repo, why not rewrite the app from scratch?

Without further delay behold my new Lightmeter app inspired by Material You (a.k.a. M3)

Screenshots

Development

1. Install Flutter

To build this app you need to install Flutter 3.10.0 stable. How to install.

3. Project setup

As part of the app's functionallity is in the private repo, you have to replace these lines in pubspec.yaml:

m3_lightmeter_iap:
  git:
    url: "https://github.com/vodemn/m3_lightmeter_iap"
    ref: main

with these:

m3_lightmeter_iap:
  path: iap

You can do it simply by running the script:

sh .github/scripts/stub_iap.sh

If you are using VSCode, you can open the workspace like so: File -> Open Workspace from File -> m3_lightmeter.code-workspace. Otherwise you have to run flutter pub get command from the iap folder.

Then you can fetch all the neccessary dependencies and generate translation files by running the following commands:

flutter pub get
flutter pub run intl_utils:generate

4. (Optional) Install Firebase

Out of the box Firebase Crashlytics won't work. If you want to add Crashlytics to your local build please follow this guide.

5. Build

Android

You can build an apk by running the following command from the root of the repository:

flutter build apk --release --flavor dev --dart-define cameraPreviewAspectRatio=240/320 -t lib/main_dev.dart

iOS

TBD

Contribution

To report a bug or suggest a new feature open a new issue.

In case you want to help develop this project feel free to open a Pull Request, but you need to follow this style guide.

iOS Limitations

A list of features, that Android version of the app has and that iOS does not.

Incident light metering

Apple does not provide API for reading Lux stream form the ambient light sensor. Lux can be calculated based on front camera image stream, but this would be a reflected light. So there is no way incident light metering can be implemented on iOS.

Volume buttons action

This can be implemented but the app will be rejected due to 2.5.9