Environment constructor

Environment([
  1. Map<String, dynamic> data = const {}
])

Constructs a new Environment instance with the provided initial data.

The Environment class manages the variable stack and filters used within a code context. This constructor initializes the variable stack with the given data map, which represents the initial variables and their values.

Parameters:

  • data: An optional map of initial variables and their values. Defaults to an empty map.

Implementation

Environment([Map<String, dynamic> data = const {}]) : _variableStack = [data];