Skip to content

Conversation

@Crdzbird
Copy link

DETAILS

  • Added sealed pattern and recognition following Dart 3 guidelines.
  • Unified models into a single class.
  • Refactored client class.
  • Integrated ObjectBox.
  • Added flexibility to choose between Sqlite and ObjectBox based on the implementations.
  • Updated test classes.
  • Added documentation.
  • Unified imports into a single set.
  • Removed rules from analysis that are no longer valid.
  • Optimize sqlite to have a better performance and a single instance check.

*** IMPORTANT ***
Since this module was already migrated into the main project, this PR is for the sake of keeping track of the new changes with more order.

This commit refactors core SDK files for improved null safety, device info caching, and session management. It introduces bulk event logging, updates event buffer logic for concurrency, and adds resource cleanup via dispose methods. Test coverage is expanded with new and updated tests, and analysis/linter rules are streamlined. The changes improve reliability, performance, and maintainability of the SDK.
Fixed issues that were disabling executing the example app.
Optimizes event processing by pre-fetching device info and session IDs, reducing redundant asynchronous calls.

Disables advertising ID retrieval due to instability issues.

Improves event buffering by scheduling flush timer only when needed and optimizing event timestamping.

Uses a single UUID generator instance to improve performance.
Reduce number of async awaits for db init.
Improves the performance of event posting by using isolate computation for large payloads.

This change introduces asynchronous posting and resource cleanup.

It also addresses potential timeout issues with a configurable timeout duration and error handling.
Reorganized source files into feature-based directories, introduced ObjectBox for data storage, and updated exports in amplitude_flutter.dart. Removed obsolete files and tests, added new models and storage implementations, and migrated existing code to the new structure for improved maintainability.
@Crdzbird Crdzbird self-assigned this Oct 24, 2025
Added missing comments on classes/functions/variables
@Crdzbird Crdzbird added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 24, 2025
Introduced new public getters: 'properties' in Event and Metric, and 'data' in Log, to provide direct access to their respective internal maps. This improves encapsulation and allows external code to access these fields more explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants