of static method

List<NmSurface> of(
  1. BuildContext context
)

The six default surfaces, localized.

Implementation

static List<NmSurface> of(BuildContext context) {
  final l = NmMarketing.l10n(context);
  NmSurface s(String id, String label, NmSurfaceKind kind) =>
      NmSurface(id: id, label: label, kind: kind, kindLabel: kind == NmSurfaceKind.position ? l.surfaceKindPosition : l.surfaceKindAnswer);
  return [
    s(yandex, l.surfaceYandex, NmSurfaceKind.position),
    s(google, l.surfaceGoogle, NmSurfaceKind.position),
    s(alice, l.surfaceAlice, NmSurfaceKind.answer),
    s(chatgpt, l.surfaceChatgpt, NmSurfaceKind.answer),
    s(perplexity, l.surfacePerplexity, NmSurfaceKind.answer),
    s(maps, l.surfaceMaps, NmSurfaceKind.position),
  ];
}