kashi_core 1.6.0
kashi_core: ^1.6.0 copied to clipboard
Flutter client foundation for kashi APIs, a Dio client with typed failures, single-flight token refresh, secure storage, and a Riverpod auth controller.
kashi_core #
Flutter client foundation for APIs built with @softwareseva/core and @softwareseva/auth.
KashiApiClient: Dio with the bearer token attached, one shared refresh for concurrent 401s, and every response unwrapped from{ data }or thrown as a typedKashiFailure(ApiFailurewithcode,fields,requestId;NetworkFailure;SessionExpiredFailure).TokenStore: rotating refresh token and last user in the keychain (first_unlockon iOS); access token in memory.AuthController(Riverpod): restores the session on launch, stays signed in offline with the stored user, signs out when refresh fails.authRedirect+AuthRefreshListenablefor go_router.KPage<T>for@softwareseva/listkeyset pages;newId()matching the server.
ProviderScope(
overrides: [kashiConfigProvider.overrideWithValue(const KashiConfig(baseUrl: 'https://api.example.com/v1'))],
child: const App(),
);
See the flutter-api-client and flutter-auth skills.