Commit Graph

81 Commits

Author SHA1 Message Date
hans 599ade3981 Check for empty interfaces before initializing them in the logger
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 6fb304a4a1 Only send log messages to the LoggingInterfaces if the logging service has been initialized
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 9f1b26e097 Extra log messages will not longer be added to the log stream if more than one LoggingInterface is registered
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans cb224560dc Remove invalid test
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans b7c55913e9 Made ArcaneServiceProvider.of(context) nullable
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 1510ded49d Rename onEnvironmentChanged to switchEnvironment
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 7fdd8ef58a Added environment logging
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans e79f163ff5 Center text
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 012e8f6107 Added environment example
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans c162e8b294 Added examples for feature flags
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 2a7829a2d0 Updated theme example to set color of theme
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 6764d8074a Setting a theme style now automatically switches to that theme
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 3fd38d3b26 Added logStream to logger. Updated example code.
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 6a28b8d90e Update example
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 68595f0a20 Re-add getters on ArcaneTheme
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans bfa5c646d7 Fixes bug with following/unfollowing system theme
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans e402308f7b Fixes broken tests
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 23f0387389 Fixes tests and updates reactive theme
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans cfd9052442 Fixes the reactive theme service to properly follow the system brightness
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 58817b349d Fixed late initialized value in logging service 2025-04-29 14:16:17 +02:00
hans 39160c223e Removed arcane theme from service provider
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 2c8596d517 Fixed theme
- fixed: currentMode, dark, light now actually emit new values when changed
- added: getters for lightTheme, darkTheme, and systemTheme
- breaking: currentMode -> systemTheme
- added: currentTheme
- breaking: currentMode => currentTheme
- change: Arcane.theme.followSystemTheme(context) required to follow system theme
- change: After following the system theme, calling Arcane.theme.switchTheme() cancels following the system theme
- added: ArcaneReactiveTheme is now registered in ArcaneServiceProvider when using ArcaneApp

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans e9ba80bcc2 Minor change
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 253f2914be Remove debug logging
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans ab880a2f5b Minor fix to fileAndLineParts calculation
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans cf4cf1306b Fix module/method/fileAndLineNumber calculations in logging service
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans 0c5b947809 Logging service:
- added: reset()
- added: `skipAutodetection` option for module, method, and metadata
- added: unregisterInterface()
- Created FileAndLineNumber mixin

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
Hans Kokx 5d5970c1ee Updated changelog 2025-04-29 14:16:17 +02:00
Hans Kokx e901da8080 Added of(context) extension to ArcaneService 2025-04-29 14:16:17 +02:00
hans d4dc176356 ArcaneReactiveTheme now optionally takes a ThemeMode parameter when calling switchTheme
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans ac82e93b9d [UNTESTED] Fixes notifiers and adds some additional methods. Adds tests.
Changes:
// ArcaneEnvironment
breaking: context.read<ArcaneEnvironment>() -> ArcaneEnvironment.of(context)
breaking: context.read<ArcaneEnvironment>().state -> ArcaneEnvironment.of(context).environment;

// Feature flag service
added: reset()

// Logging service
added: registerInterface()
added: unregisterInterfaces()
added: unregisterAllInterfaces()

// ArcaneReactiveTheme
fixed: currentMode, dark, light now actually emit new values when changed
added: getters for lightTheme, darkTheme, and systemTheme
TODO: test systemTheme

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00
hans b129639f1f Formatted files 2025-02-11 14:39:02 +01:00
hans beee74e49a v1.2.5
- Improved automatic metadata detection in `ArcaneLogger`

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-01-23 13:59:40 +01:00
hans 6ffb83e59d v1.2.4
- Update package dependencies

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-01-16 11:10:23 +01:00
hans 552398bcc5 v1.2.3
- Added `ValueNotifier`s to both the `ArcaneAuthenticationService` and
  `ArcaneFeatureFlags`. This enables the possibility of listening for changes to
  either service.

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-01-14 11:48:25 +01:00
hans 47ce767fb6 v1.2.2
- Lowered minimum required collection dependency version to prevent forcing
  users into the latest Flutter release

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2024-12-16 14:35:02 +01:00
hans f028c1e5ba v1.2.1
- Lowered minimum required SDK version to prevent forcing users into the latest
  Flutter release

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2024-12-16 14:29:59 +01:00
Hans Kokx 129801a0dc v1.2.0
- Removed flutter_secure_storage dependency as it was unused
- BREAKING: several methods were moved from the ArcaneAuthInterface base class into their own mixins

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-12-12 15:09:10 +01:00
Hans Kokx adef2e01dd v1.1.7
- Fixed an issue with the `ArcaneAuthenticationService` where an exception would
  be thrown when attempting to access an authentication token while no
  `ArcaneAuthInterface` was registered.

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-12-11 11:02:58 +01:00
hans bc0972cf32 v1.1.6
- Updated logging feature to indicate the feature which was enabled or disabled within the log message, instead of only in the metadata

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2024-12-02 13:58:12 +01:00
Hans Kokx 3c16b32648 v1.1.5
- Updated dependencies

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-11-04 17:05:00 +01:00
Hans Kokx a26ced6a24 v1.1.4
- Updated dependencies

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-11-04 17:04:14 +01:00
Hans Kokx 1749214dd3 v1.1.4
- Update out-of-date packages

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-10-30 10:34:45 +01:00
Hans Kokx 606404b4d3 v1.1.3
- Auth logout no longer throws exceptions, preferring a Result return value instead.

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-10-25 12:17:10 +02:00
Hans Kokx a29da7c090 v1.1.2
- Removes default error catching from ArcaneLoggingService

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-10-18 16:37:10 +02:00
Hans Kokx a04a8b1f2a Bump version number
Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-10-11 14:17:11 +02:00
Hans Kokx 2c4ca4e78e v1.1.1+2
- Updated example in readme

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-10-11 14:16:51 +02:00
Hans Kokx 23e2bcb4b7 v1.1.1+1
- Updated README

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-10-11 14:08:37 +02:00
Hans Kokx 9f00ed205b v1.1.1
Breaking changes:
- Updated ArcaneAuthInterface to make the `resendVerificationCode`, `confirmSignup`, and `resetPassword` methods more versatile

Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
2024-10-11 14:04:53 +02:00
hans a67e4adfa2 v1.1.0
Breaking changes:
- (ArcaneAuthInterface) Migrated `loginWithEmailAndPassword` to `login`
- (ArcaneAuthInterface) Migrated `signup` to `register`

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2024-10-10 15:56:38 +02:00