flutter_localization_updater 1.0.7 copy "flutter_localization_updater: ^1.0.7" to clipboard
flutter_localization_updater: ^1.0.7 copied to clipboard

unlisted

A Flutter package that automatically updates localizations from Google Sheets and integrates with easy_localization.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.2.0 2024-01-XX #

Added #

  • Efficient Change Detection: Uses Google Sheets API metadata (lastModifiedTime, etag) for fast change detection
  • Metadata-based optimization: Only downloads full content when metadata indicates changes
  • Debug methods: getCurrentMetadata() and getStoredMetadata() for monitoring and debugging
  • Force update method: forceUpdateLocalizations() for manual updates regardless of changes

Changed #

  • Performance improvement: Significantly reduced API usage by checking metadata before downloading content
  • Better logging: More detailed logs for change detection process
  • Optimized network requests: Separate metadata and content fetching for better efficiency

Technical Details #

  • Replaced content hash comparison with Google Sheets API metadata comparison
  • Uses lastModifiedTime and etag fields from Google Sheets API response
  • Metadata requests are much faster and use less bandwidth than full content requests
  • Fallback to content download if metadata check fails

1.1.0 2024-01-XX #

Added #

  • Timeout functionality to prevent app hanging during translation updates
  • Background update method (startBackgroundUpdate()) for non-blocking updates
  • Configurable timeout duration in LocalizationConfig
  • Network request timeouts for Dio HTTP requests
  • Return values for update methods to indicate success/failure

Changed #

  • updateLocalizations() now returns Future<bool> instead of Future<void>
  • checkAndUpdateLocalizations() now returns Future<bool> instead of Future<void>
  • Default timeout of 5 seconds for translation updates
  • Better error handling and logging for timeout scenarios

Features #

  • App continues with cached translations if update times out
  • Background updates continue even after timeout
  • Network requests are properly timed out to prevent hanging connections
  • Failed updates are logged but don't crash the app

1.0.0 2024-01-XX #

Added #

  • Initial release of flutter_localization_updater
  • LocalizationService class for managing localization updates
  • LocalizationConfig class for configuration
  • CustomAssetLoader for easy_localization integration
  • Support for Google Sheets API integration
  • Automatic translation fetching and caching
  • Multi-language support
  • Configurable update intervals
  • Fallback to bundled assets when dynamic files are unavailable

Features #

  • Fetch translations from Google Sheets automatically
  • Save translations to local JSON files
  • Integrate seamlessly with easy_localization
  • Smart caching to avoid unnecessary API calls
  • Support for nested translation keys
  • Error handling and fallback mechanisms
2
likes
0
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that automatically updates localizations from Google Sheets and integrates with easy_localization.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, dotenv, easy_localization, flutter, path, path_provider, shared_preferences

More

Packages that depend on flutter_localization_updater