AppExports class final

Where synth writes the Dart file application code imports: the Stack's constants, as the static const members of <name>Constants, and a typed reader of its Terraform outputs, <name>Outputs.

final class OrdersStack extends Stack {
  OrdersStack()
    : super(
        providers: [GoogleProvider(project: 'my-project')],
        appExports: AppExports('../app_config/lib/orders.g.dart', name: 'Orders'),
      );
}

path is resolved against the working directory synth runs in — the infra package root for dart run bin/infra.dart. The file imports only dart:convert, so it can live in a small package of its own that both the infra package and the app depend on, keeping the provider packages out of the app's dependencies.

Annotations
  • @immutable

Constructors

AppExports(String path, {String? name})
Throws ArgumentError when path is empty or does not end in .dart, or name is not a Dart type name.

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String?
Prefix of the generated class names; defaults to the Stack's class name (OrdersStack → OrdersStackConstants, OrdersStackOutputs).
final
path → String
The generated file, relative to the directory synth runs in.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited