Code.scope constructor
const
Code.scope(
- String scope(
- Allocate
Create a code based that may use a provided Allocator for scoping:
// Emits `_i123.FooType()`, where `_i123` is the import prefix.
Code.scope((a) {
return '${a.allocate(fooType)}()'
});
Implementation
const factory Code.scope(
String Function(Allocate) scope,
) = ScopedCode._;