getLabels method

  1. @override
Future<Map<String, dynamic>?> getLabels()
override

Implementation

@override
Future<Map<String, dynamic>?> getLabels() async {
  try {
    final labels = await methodChannel.invokeMethod<Map<dynamic, dynamic>>('getLabels');
    if (labels == null) return null;
    return Map<String, dynamic>.from(labels);
  } on PlatformException catch (e) {
    debugPrint('Error getting labels: $e');
    return null;
  }
}