bfs_manager 0.0.37 copy "bfs_manager: ^0.0.37" to clipboard
bfs_manager: ^0.0.37 copied to clipboard

Offline-first Flutter sync SDK for SQLite ↔ server. Simple API: init, register/login, save/edit/remove, and sync.

0.0.37 #

  • Strictly scope getPreference() to the configured user prefix (${prefix}_$key) to prevent key collisions with custom developer preferences.

0.0.36 #

  • Enhanced multi-device sync reliability and synchronization robustness.
  • Documentation and clean auth helper integrations.

0.0.35 #

  • Added forgotPassword() / apiForgotPassword() — request password reset OTP / email link.
  • Added verifyOtp() / apiVerifyOtp() — verify reset OTP.
  • Added resetPassword() / apiResetPassword() — update password with verified OTP and auto-save token if returned.
  • Added support for form-data encoding and public route handling for forgot password / verify OTP / reset password endpoints.

0.0.34 #

  • Added clearAuthToken() — clears JWT only; local DB, sync queue, profile prefs, and serverTime stay.
  • Added init(onUnauthorized: ...) — on protected API 401/403, token is cleared once and callback runs (login/register/social-login excluded).

0.0.33 #

  • Added 'data' to default userFallbacks in BfsResponseKeyMap (now defaults to ['user', 'data']).

0.0.32 #

  • Updated documentation with User Profile SharedPreferences storage examples and clean response key configuration.

0.0.31 #

  • Save user profile fields in SharedPreferences exclusively using prefix (${prefix}_$key) to prevent key collision with app developer's preferences.
  • Support dynamic user table detection from responseKeys.user / fallback candidates during pull and pull-latest sync.
  • Removed redundant userFields mapping.

0.0.30 #

  • Optional authRequired + responseKeys on init() — defaults match current API (email/password, token/users).
  • Developers can override auth required fields and response JSON key mapping without forking the SDK.
  • Removed API error toast (fluttertoast); errors still throw / reach onFail.

0.0.29 #

  • Full pull (GET /sync/get) runs only when cached serverTime is empty; otherwise skipped. Use force: true / forcePullAll: true to override.

0.0.28 #

  • Endpoints aligned with live API:
    • POST /sync/push
    • GET /sync/get?page=&limit= (full pull)
    • GET /sync/pull-latest?serverTime=
    • DELETE /delete-account

0.0.27 #

  • Social login uses raw JSON like Postman (POST /social-login); normal login stays form-data — both APIs work independently.
  • Server social-login response includes both user and users keys.

0.0.26 #

  • Pull latest matches Postman: GET /sync/pull-latest?serverTime=... (legacy POST /sync/pull-updates still on server).

0.0.25 #

  • Login always sends Postman-style multipart/form-data with flat fields (email, password).

0.0.24 #

  • Register / social-login always send Postman-style multipart/form-data: data (JSON text) + file fields (avatar).
  • Accept HTTP 201 as success for auth responses.

0.0.23 #

  • Easy DB: init(tables: {...}) auto-creates SQLite tables (uuid PK added automatically).
  • Added BfsDbHelper / BfsManager.openDatabase() and demo in example/README.md.

0.0.22 #

  • Docs: added multiple-file upload examples (List + JSON string) in README, developer guide, and example.

0.0.21 #

  • Developer-friendly API: init, register/login/logout/deleteAccount, save/edit/remove, and single sync(type:).
  • Added BfsSyncType (sync, all, push, latest) and isLoggedIn.
  • Optimization: debounced auto-push, batched push (default 10), push lock, pull write transactions, table column cache.
  • Added socialLogin helper.

0.0.20 #

  • Pull-updates: deleted rows moved to separate deleteData array (table_name + uuid); data now only contains upsert rows.

0.0.19 #

  • Breaking: Pull-all API now uses input { "page", "limit" } and flat output with current_page, limit, has_more, total_records, latest_server_time, and data[] (tb_name + uuid + columns).

0.0.18 #

  • Breaking: Pull-updates API now uses input { "serverTime" } and flat output { "latest_server_time", "data": [ { "tb_name", "uuid", ...columns } ] }.
  • Deleted rows in pull-updates are returned as { "tb_name", "uuid", "action": "delete" } inside the same data array.

0.0.17 #

  • Breaking: Push API payload changed from nested changes[table][insert|update|delete] to flat data[] items with fixed keys tb_name, action, uuid plus table columns.
  • Push API response now returns { "data": [ { "tb_name", "action", "uuid" } ] } for successfully synced rows.
  • File multipart keys remain unchanged: files[table][uuid][column].

0.0.16 #

  • Added local sync queue optimization/compaction rules in insertLocal to merge redundant pending insert, update, and delete tasks.
  • Added getTaskByUuid, updateTask, and deleteById to SyncTaskDb.

0.0.15 #

  • Added a shared checkFileExists helper utility.
  • Converted file checking and extraction to asynchronous await file.exists() validation.

0.0.14 #

  • Updated _extractSyncFiles in ApiService to support extracting multiple file paths represented as a List or JSON array of strings in sync payload.

0.0.13 #

  • Made _parseResponse asynchronous and await all SharedPreferences write operations for users profile data to guarantee profile fields are fully updated and readable before API resolution.

0.0.12 #

  • Added logoutLocal method to clear all sqlite tables, reset API tokens/sync state, and wipe cached SharedPreferences keys.
  • Automatically invoke logoutLocal on successful apiLogout and apiDeleteAccount responses.
  • Added generic typed preferences setters and getters (setBool/getBool, setString/getString, setDouble/getDouble, setInt/getInt, setStringList/getStringList, setMap/getMap) with dynamic fallback default parameter options.

0.0.11 #

  • Added getPreference method to BfsManager to directly retrieve cached user profile preferences by column name or key.

0.0.10 #

  • Automatically cache dynamic users table columns (user profile data) as key/value format in SharedPreferences from register, login, socialLogin, pull, and pullAll API responses.

0.0.9 #

  • Added token check in ApiService.post to throw an Exception immediately if a protected API endpoint is called when the Bearer token is null or empty.
  • Added validation checks in BfsManager.pushChanges and BfsManager.pullUpdates to return early without calling the server if the Bearer token is missing.

0.0.8 #

  • Added apiLogout method to call the /logout endpoint, clear cached auth tokens, and clear the local sync task queue and database tables.
  • Added apiDeleteAccount method to call the /delete-account endpoint, clear cached auth tokens, and wipe local database tables for user privacy.
  • Added clearLocalDatabase helper method to dynamically find and truncate all user database tables.
  • Added clearAllTasks to SyncTaskDb.

0.0.7 #

  • Removed the UNIQUE constraint from the uuid column in the tb_sync_task table and added database upgrade support to version 2.
  • Updated the insertLocal method to extract and use the record's actual uuid from the data payload map.

0.0.6 #

  • Added serverTime response tracking in pullAll initial sync to cache the lastSyncTime correctly for subsequent pullUpdates.

0.0.5 #

  • Updated package home page README.md with the latest step-by-step Gujarati integration guide.

0.0.4 #

  • Added support for dynamic column file detection on nested push sync payloads.
  • Scoped sync status responses to boolean true/false.
  • Added PRAGMA table_info verification checks on insertions to ignore missing server columns dynamically.
  • Added native support for JWT Register, Login, and Social Login tokens caching.

0.0.3 #

  • Restructured step-by-step Gujarati integration guide in README.md.

0.0.2 #

  • Added complete Gujarati integration and usage documentation to README.md.

0.0.1 #

  • Initial release of the bfs_manager SQLite-to-Server synchronization package.
0
likes
150
points
475
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Offline-first Flutter sync SDK for SQLite ↔ server. Simple API: init, register/login, save/edit/remove, and sync.

Homepage
Repository (GitHub)
View/report issues

Topics

#sync #sqlite #offline #flutter #laravel

License

MIT (license)

Dependencies

flutter, http, path, shared_preferences, sqflite, uuid

More

Packages that depend on bfs_manager