loadSync static method

String loadSync(
  1. String name,
  2. Map<String, String> variables
)

Synchronous version is not supported on all platforms.

Use load instead. This method is kept for API compatibility and will throw on platforms where the default loader is asynchronous.

Implementation

static String loadSync(String name, Map<String, String> variables) {
  final cached = _cache[name];
  if (cached != null) {
    return _render(cached, variables);
  }
  throw UnsupportedError(
    'PromptLoader.loadSync is not supported on this platform. Use load().',
  );
}