getAvailableProfiles static method

Future<List> getAvailableProfiles()

Implementation

static Future<List<dynamic>> getAvailableProfiles() async {
  /// ensure the capabilities is not empty
  await ensureProfileLoaded();

  final dynamic _profiles = __printCapabilities['profiles'];

  final List<dynamic> res = <dynamic>[];

  _profiles.forEach((dynamic k, dynamic v) {
    res.add(<String, dynamic>{
      'key': k,
      'vendor': v['vendor'] is String ? v['vendor'] : '',
      'name': v['name'] is String ? v['name'] : '',
      'description': v['description'] is String ? v['description'] : '',
    });
  });

  return res;
}