kashi_core 1.6.0 copy "kashi_core: ^1.6.0" to clipboard
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 typed KashiFailure (ApiFailure with code, fields, requestId; NetworkFailure; SessionExpiredFailure).
  • TokenStore: rotating refresh token and last user in the keychain (first_unlock on 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 + AuthRefreshListenable for go_router.
  • KPage<T> for @softwareseva/list keyset 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.

0
likes
160
points
125
downloads

Documentation

API reference

Publisher

verified publishersoftwareseva.org

Weekly Downloads

Flutter client foundation for kashi APIs, a Dio client with typed failures, single-flight token refresh, secure storage, and a Riverpod auth controller.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

dio, flutter, flutter_riverpod, flutter_secure_storage, go_router

More

Packages that depend on kashi_core