Method to convert Flag object to a map
Map<String, dynamic> toMap() { return { 'isEnabled': _isEnabled, 'variables': variables.map((variable) => variable.toMap()).toList(), }; }