FlutterNordicDfu.startDfu
在iOS上不起作用,但在Android上。我相信这是由于iOS使用UUID而不是Android这样的MAC地址所致。
FlutterNordicDfu.startDfu(device.id.id,'assets/file.zip',
fileInAsset: true,
enableUnsafeExperimentalButtonlessServiceInSecureDfu: true,
progressListener:
DefaultDfuProgressListenerAdapter(onProgressChangedHandle: (
deviceAddress,
percent,
speed,
avgSpeed,
currentPart,
partsTotal,
) {
print('deviceAddress: $deviceAddress, percent: $percent');
}),
);