updateContextWithMap method
Implementation
void updateContextWithMap(Map<String, Object> context) {
var oldContext = Map.fromEntries(_context.entries);
_context.addAll(context);
if (mapEquals(oldContext, _context) == false) {
// if the context still the same then no need to raise the warning
// Update flagSyncStatus to raise a warning when access to flag
this._flagSyncStatus = FlagSyncStatus.CONTEXT_UPDATED;
flagStatus = FlagStatus.FETCH_REQUIRED;
_fetchReasons = FetchFlagsRequiredStatusReason.VISITOR_CONTEXT_UPDATED;
}
Flagship.logger(
Level.DEBUG, CONTEXT_UPDATE.replaceFirst("%s", "$_context"));
}