renderStoreList function

void renderStoreList(
  1. LiveBlock block,
  2. Map<String, Object?> status, {
  3. String use = 'screenshot --store',
})

Adds the stores the app lists in its status to block, with use as how to capture at one, e.g. screenshot --store.

Implementation

void renderStoreList(
  LiveBlock block,
  Map<String, Object?> status, {
  String use = 'screenshot --store',
}) {
  final List<LiveStore> stores = LiveStore.listIn(status);
  block
    ..table(
      ['STORE', 'SIZE', 'NAME'],
      [
        for (final LiveStore store in stores)
          [store.id, store.size, store.label ?? ''],
      ],
    )
    ..note(
      'Capture at one with $use ${stores.isEmpty ? 'ios-6.9' : stores.first.id}',
    );
}