downloadExcel method
- dynamic context
Downloads the filtered device data as an Excel file.
Implementation
Future<void> downloadExcel(context) async {
try {
await ExcelExportService.exportDevicesToExcel(
context,
state.filteredDevices,
);
} catch (e) {
emit(state.copyWith(errorMessage: e.toString()));
}
}