Features/Updates
- Add
DynamicCachedFonts.cacheFontStream
andDynamicCachedFonts.loadCachedFamilyStream
static methods to cache and load font and return the font files asStream
s - Add
loadStream
instance method toDynamicCachedFonts
to load font files asStream
s
Internal Updates
- Update
loadCachedFamily
's implementation - Remove all reserved characters from the url to generate safer cache keys
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!!
Dependency Updates
- Added support for the latest version of
firebase_storage
. Minimum supported version continues to be v8.0.0
Stable Null safety release
Dependency Updates
- Minimum version constraint for
flutter_cache_manager
is now v3.1.2
Features/Updates
-
verboseLog
is now deprecated in all APIs.DynamicCachedFonts.toggleVerboseLogging
should be used instead to toggle verbose logging -
loadCachedFont
andloadCachedFamily
now throws aStateError
if the font has not been cached -
UnsupportedError
is thrown if the downloaded file is not a .ttf or .otf font file -
DynamicCachedFonts.load
andloadCachedFamily
now returnFuture<Iterable<FileInfo>>
instead ofvoid
-
cacheFont
andloadCachedFont
now returnFuture<FileInfo>
instead ofvoid
No migration is required for the above 2 changes since a method/variable that expects
void
allows any other type as well.
DynamicCachedFonts.load
now exits and throws immediately if font has already been loaded- Add
DynamicCachedFonts.custom
andRawDynamicCachedFonts.custom
methods to make the API testable cacheKeyFromUrl
is 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.load
logic
- Add complete web cache support
- Update documentation for some public and private APIs
- Disable RawDynamicCachedFonts' default constructor
- Improve logging in
RawDynamicCachedFonts.loadCachedFont
and font extension verification
Initial Release