dynamic_cached_fonts 2.0.0-dev.0
dynamic_cached_fonts: ^2.0.0-dev.0 copied to clipboard
A font loader to download, cache and load web fonts in flutter with support for Firebase Cloud Storage.
2.0.0-dev.0 #
Breaking Changes and Migration Guide #
-
If you have been using the package without modifying
cacheStalePeriodormaxCacheObjects, no changes are required. However, any previously cached font files will be ignored and should be deleted by running the migration tool. -
If you have modified
cacheStalePeriodormaxCacheObjects, you'll have to pass the same values to any method that downloads, caches or loads fonts, otherwise the provided configuration will be ignored. Any previously cached font files will continue to remain in their respective cache folders and will be used by the package. Running the migration tool will have no effect on these font files. -
A migration tool has been provided ->
DynamicCachedFonts.runMigrationTool()
For more details, see #247
1.2.0 #
Dependency Updates
- Added support for v12.x of
firebase_storage. Minimum supported version continues to be v8.0.0
1.1.0 #
Dependency Updates
- Added support for v11.x of
firebase_storage. Minimum supported version continues to be v8.0.0 - Added support for the v3.x of dart sdk. Minimum supported version continues to be v2.12.0
Internal Updates
- Add
DynamicCachedFontsCacheManager.unsetCustomCacheManagermethod to unset custom cache managers used for testing
1.0.0 #
Features/Updates
- Add
DynamicCachedFonts.cacheFontStreamandDynamicCachedFonts.loadCachedFamilyStreamstatic methods to cache and load font and return the font files asStreams - Add
loadStreaminstance method toDynamicCachedFontsto load font files asStreams
Internal Updates
- Update
loadCachedFamily's implementation - Remove all reserved characters from the url to generate safer cache keys
0.4.0 #
BREAKING CHANGE: verboseLog, which was deprecated in v0.2.0, has been removed. DynamicCachedFonts.toggleVerboseLogging should be used instead
The online demo (i.e, the hosted example app) is now available. Check it out here!!
0.3.1 #
Dependency Updates
- Added support for the latest version of
firebase_storage. Minimum supported version continues to be v8.0.0
0.3.0 #
Stable Null safety release
0.2.0 #
Dependency Updates
- Minimum version constraint for
flutter_cache_manageris now v3.1.2
Features/Updates
-
verboseLogis now deprecated in all APIs.DynamicCachedFonts.toggleVerboseLoggingshould be used instead to toggle verbose logging -
loadCachedFontandloadCachedFamilynow throws aStateErrorif the font has not been cached -
UnsupportedErroris thrown if the downloaded file is not a .ttf or .otf font file -
DynamicCachedFonts.loadandloadCachedFamilynow returnFuture<Iterable<FileInfo>>instead ofvoid -
cacheFontandloadCachedFontnow returnFuture<FileInfo>instead ofvoid
No migration is required for the above 2 changes since a method/variable that expects
voidallows any other type as well.
DynamicCachedFonts.loadnow exits and throws immediately if font has already been loaded- Add
DynamicCachedFonts.customandRawDynamicCachedFonts.custommethods to make the API testable cacheKeyFromUrlis now exported for testing. It generates the cache key, used by the cache manager, from a given url
Internal Updates
- Improve file format verification logic
- Update
DynamicCachedFonts.loadlogic
0.1.0 #
- Add complete web cache support
- Update documentation for some public and private APIs
- Disable RawDynamicCachedFonts' default constructor
- Improve logging in
RawDynamicCachedFonts.loadCachedFontand font extension verification
0.0.1 #
Initial Release