loadLabelsFromFile method
Load label names from a text file on device storage. File format: one label name per line. Returns the list of labels loaded.
Implementation
Future<List<String>> loadLabelsFromFile(String path) async {
final result = await _methodChannel.invokeMapMethod<String, dynamic>('loadLabelsFromFile', {'path': path});
return (result?['labels'] as List?)?.cast<String>() ?? [];
}