flutterBundlesFirst static method

List<String> flutterBundlesFirst(
  1. List<String> paths, {
  2. required bool isFlutter(
    1. String id
    ),
})

The Flutter apps among paths when there are any: a VM service belongs to one, so another app on the simulator (glint's own XCTest runner host, a system helper) must not make the device ambiguous.

Implementation

static List<String> flutterBundlesFirst(List<String> paths, {required bool Function(String path) isFlutter}) {
  final flutter = paths.where(isFlutter).toList();
  return flutter.isEmpty ? paths : flutter;
}