QrCodeGraphics class

Picture-recorder-backed canvas for QR raster output. 基于 PictureRecorder 的 QR 光栅输出画布。

Constructors

QrCodeGraphics(int width, int height)
Creates a graphics buffer of width x height pixels. 创建 width x height 像素的图形缓冲区。

Properties

canvas Canvas
Underlying Flutter canvas. 底层 Flutter 画布。
no setter
hashCode int
The hash code for this object.
no setterinherited
height int
Buffer height in pixels. 缓冲区高度(像素)。
final
picture Picture
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
Buffer width in pixels. 缓冲区宽度(像素)。
final

Methods

availableFormats() List<String>
cacheImage(Uint8List rawData) Future<void>
changed() bool
Whether any draw call modified the buffer since last reset. 自上次 reset 以来是否有绘制修改了缓冲区。
dimensions() List<int>
drawEllipse(int x, int y, int width, int height, Color color, double thickness) → void
drawImage(Uint8List? rawData, int x, int y, {int? drawWidth, int? drawHeight}) → void
drawLine(int x1, int y1, int x2, int y2, Color color, double thickness) → void
drawRect(int x, int y, int width, int height, Color color, double thickness) → void
drawRoundRect(int x, int y, int width, int height, int borderRadius, Color color, double thickness) → void
drawUiImage(Image image, int x, int y, {int? drawWidth, int? drawHeight}) → void
fill(Color color) → void
fillEllipse(int x, int y, int width, int height, Color color) → void
fillRect(int x, int y, int width, int height, Color color) → void
fillRoundRect(int x, int y, int width, int height, int borderRadius, Color color) → void
getBytes([String format = 'PNG']) Future<Uint8List>
nativeImage() Future<Image>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
toImage() Future<Image>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

resolveImageProvider(ImageProvider<Object> provider) Future<Image>
Resolves an ImageProvider to a ui.Image. 将 ImageProvider 解析为 ui.Image