-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
ElevatedButton(
onPressed: () async {
FlutterDocumentPickerParams params =
FlutterDocumentPickerParams(
allowedFileExtensions: ['zip'],
);
path =
(await FlutterDocumentPicker.openDocument(
params: params)
.onError((error, stackTrace) {
print("the error is $error");
return null;
}))!;
if (path.isNotEmpty) {
print('File path : $path');
try{
await NordicDfu().startDfu(
widget.connectedDevice.remoteId.toString(),
path,
fileInAsset: true,
onProgressChanged: (
deviceAddress,
percent,
speed,
avgSpeed,
currentPart,
partsTotal,
) {
print('deviceAddress: $deviceAddress, percent: $percent');
},
);
}catch (e){
print("e");
}
} else {
// User canceled the picker
}
},
child: const Text("Select"),
)
This is my code this is showing the error No implementation found for method startDfu on channel dev.steenbakker.nordic_dfu/method
Metadata
Metadata
Assignees
Labels
No labels