Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b6614f482 |
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.1.15] - 2026-01-05
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Theme toggle causing auth issues due to AuthNotifier auto-dispose
|
||||||
|
- Applied `@persistentRiverpod` annotation to AuthNotifier
|
||||||
|
- AuthProvider now persists for app lifetime, preventing rebuild on theme change
|
||||||
|
|
||||||
## [1.1.14] - 2026-01-04
|
## [1.1.14] - 2026-01-04
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -447,13 +447,13 @@ Dio coreApiClient(Ref ref) { ... }
|
|||||||
|
|
||||||
**When to use `@persistentRiverpod`:**
|
**When to use `@persistentRiverpod`:**
|
||||||
|
|
||||||
| Use Case | Annotation |
|
| Use Case | Annotation | Example |
|
||||||
|----------|------------|
|
|----------|------------|---------|
|
||||||
| API clients with interceptors | `@persistentRiverpod` |
|
| API clients with interceptors | `@persistentRiverpod` | `coreApiClient`, `tatlockApiClient` |
|
||||||
| Theme/config providers | `@persistentRiverpod` |
|
| Auth state provider | `@persistentRiverpod` | `AuthNotifier` |
|
||||||
| Auth state provider | `@persistentRiverpod` |
|
| Theme/config providers | `@persistentRiverpod` | `ThemeNotifier` |
|
||||||
| Feature data providers | `@riverpod` (default) |
|
| Feature data providers | `@riverpod` (default) | `ContainersNotifier` |
|
||||||
| UI state providers | `@riverpod` (default) |
|
| UI state providers | `@riverpod` (default) | `SearchFilterNotifier` |
|
||||||
|
|
||||||
## File Naming Conventions
|
## File Naming Conventions
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
import '../config/app_config.dart';
|
import '../config/app_config.dart';
|
||||||
|
import '../providers/annotations.dart';
|
||||||
import 'auth_datasource.dart';
|
import 'auth_datasource.dart';
|
||||||
import 'auth_state.dart';
|
import 'auth_state.dart';
|
||||||
import 'oidc_service.dart';
|
import 'oidc_service.dart';
|
||||||
@@ -24,7 +25,7 @@ part 'auth_provider.g.dart';
|
|||||||
///
|
///
|
||||||
/// After OIDC authentication, syncs with core-api via POST /auth/sync
|
/// After OIDC authentication, syncs with core-api via POST /auth/sync
|
||||||
/// to get user profile, roles, and preferences.
|
/// to get user profile, roles, and preferences.
|
||||||
@riverpod
|
@persistentRiverpod
|
||||||
class AuthNotifier extends _$AuthNotifier {
|
class AuthNotifier extends _$AuthNotifier {
|
||||||
// Storage keys
|
// Storage keys
|
||||||
static const _accessTokenKey = 'auth_access_token';
|
static const _accessTokenKey = 'auth_access_token';
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.1.14+1
|
version: 1.1.15+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.10.4
|
sdk: ^3.10.4
|
||||||
|
|||||||
Reference in New Issue
Block a user