otaUpdatePercentage method
dynamic
otaUpdatePercentage()
Implementation
otaUpdatePercentage() async {
otaTotalLength = deviceController.totalLen;
_otaSubscription = deviceController.otaCount.stream.listen((event) {
firmwareUpdatePercentageController
.add(((event * 100) / otaTotalLength!).ceil());
}, onDone: () {
_otaSubscription!.cancel();
firmwareUpdatePercentageController.close();
}, onError: (e) {
disposeOta();
});
}