addLocalDeclaration method

void addLocalDeclaration(
  1. Context context,
  2. String name,
  3. String declaration
)

Implementation

void addLocalDeclaration(Context context, String name, String declaration) {
  final declarations = context.localDeclarations;
  if (declarations.containsKey(name)) {
    throw StateError("Local declaration $name already exist");
  }

  declarations[name] = declaration;
}