SvgFileLoader class
A BytesLoader that resolves an SVG from a file.
- Inheritance
-
- Object
- BytesLoader
- SvgLoader<
void> - SvgFileLoader
Constructors
- SvgFileLoader(File file, {SvgTheme? theme, ColorMapper? colorMapper})
-
See class doc.
const
Properties
- colorMapper → ColorMapper?
-
The ColorMapper used to substitute colors in the SVG, if any.
finalinherited
- file → File
-
The file containing the SVG data to decode and render.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → SvgTheme?
-
The theme controlling
currentColorand font-relative units.finalinherited
Methods
-
cacheKey(
BuildContext? context) → SvgCacheKey -
An object that uniquely identifies the SVG resolved by this loader.
inherited
-
getTheme(
BuildContext? context) → SvgTheme -
Resolves the effective SvgTheme for this loader.
inherited
-
loadBytes(
BuildContext? context) → Future< ByteData> -
This method intentionally avoids using
awaitto avoid unnecessary event loop turns. This helps tests in particular.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareMessage(
BuildContext? context) → Future< void> -
Performs any asynchronous work (asset/network/file IO) needed before
provideSvg can run.
inherited
-
provideSvg(
void message) → String -
Returns the SVG source for the prepared
message.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override