mirror of
https://github.com/0015/ThatProject.git
synced 2026-01-12 09:17:42 +03:00
[Code Fix] Error: A value of type 'Image?' can't be assigned to a variable of type 'Image' because 'Image?' is nullable and 'Image' isn't.
This commit is contained in:
@@ -151,7 +151,7 @@ class _MQTTClientState extends State<MQTTClient> {
|
||||
final recMess =
|
||||
mqttReceivedMessages![0].payload as MqttPublishMessage;
|
||||
|
||||
img.Image jpegImage = img.decodeJpg(recMess.payload.message!);
|
||||
img.Image jpegImage = img.decodeJpg(recMess.payload.message) as img.Image;
|
||||
|
||||
print(
|
||||
'img width = ${jpegImage.width}, height = ${jpegImage.height}');
|
||||
|
||||
Reference in New Issue
Block a user