SvgConfig class

Configuration class for SVG rendering options

Constructors

SvgConfig({double? width, double? height, Color? color, BoxFit fit = BoxFit.contain, Alignment alignment = Alignment.center, String? semanticsLabel, Widget? placeholder, Widget? errorWidget, bool allowDrawingOutsideViewBox = false})
Creates an SVG configuration
const

Properties

alignment Alignment
Alignment of the SVG within its bounds
final
allowDrawingOutsideViewBox bool
Whether to allow drawing outside the viewBox
final
color Color?
Color to tint the SVG
final
errorWidget Widget?
Widget to show on load failure
final
fit BoxFit
How the SVG should be inscribed into the space
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Height of the SVG
final
placeholder Widget?
Widget to show while loading (for network SVGs)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel String?
Semantic label for accessibility
final
width double?
Width of the SVG
final

Methods

copyWith({double? width, double? height, Color? color, BoxFit? fit, Alignment? alignment, String? semanticsLabel, Widget? placeholder, Widget? errorWidget, bool? allowDrawingOutsideViewBox}) SvgConfig
Creates a copy of this config with the given fields replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

defaultConfig → const SvgConfig
Default configuration
largeIcon → const SvgConfig
Large icon configuration (48x48)
mediumIcon → const SvgConfig
Medium icon configuration (32x32)
smallIcon → const SvgConfig
Small icon configuration (24x24)