CompressFormat class

Class that represents the known formats a bitmap can be compressed into.

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isSupported() bool
Checks if the value is supported by the defaultTargetPlatform.
name() String
Gets the name of the value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toNativeValue() String?
Gets String native value if supported by the current platform, otherwise null.
toString() String
A string representation of this object.
override
toValue() String
Gets String value.

Operators

operator ==(Object value) bool
The equality operator.
override

Static Properties

JPEG CompressFormat
Compress to the JPEG format. Quality of 0 means compress for the smallest size. 100 means compress for max visual quality.
final
PNG CompressFormat
Compress to the PNG format. PNG is lossless, so quality is ignored.
final
values Set<CompressFormat>
Set of all values of CompressFormat.
final
WEBP CompressFormat
Compress to the WEBP lossy format. Quality of 0 means compress for the smallest size. 100 means compress for max visual quality.
final
WEBP_LOSSLESS CompressFormat
Compress to the WEBP lossless format. Quality refers to how much effort to put into compression. A value of 0 means to compress quickly, resulting in a relatively large file size. 100 means to spend more time compressing, resulting in a smaller file.
final
WEBP_LOSSY CompressFormat
Compress to the WEBP lossy format. Quality of 0 means compress for the smallest size. 100 means compress for max visual quality.
final

Static Methods

asNameMap() Map<String, CompressFormat>
Creates a map from the names of CompressFormat values to the values.
byName(String? name) CompressFormat?
Gets a possible CompressFormat instance value with name name.
fromNativeValue(String? value) CompressFormat?
Gets a possible CompressFormat instance from a native value.
fromValue(String? value) CompressFormat?
Gets a possible CompressFormat instance from String value.