operator []= method

void operator []=(
  1. String path,
  2. dynamic value
)

Adds or Updates the given key/value pair.

The value may be a String or a number (int, double);

var settings = SettingsYaml.load('mysettings.yaml');
 settings['password'] = 'a new password';
settings.save();

Implementation

void operator []=(String path, dynamic value) => valueMap[path] = value;