scanDocument method
Initiates a document scanning operation from a specified scanner.
sourceIndex
- The index of the scanner in the list of available data sources.
Returns a Future<List<String>>
containing the paths of saved images.
Implementation
@override
Future<List<String>> scanDocument(int sourceIndex) async {
List? results = await methodChannel
.invokeMethod<List<dynamic>>('scanDocument', {'index': sourceIndex});
List<String> fileNames = [];
if (results != null) {
for (var item in results) {
fileNames.add(item.toString());
}
}
return fileNames;
}